:root {
    --primary: #ff9100;                 /* Glowing Sunset Orange */
    --secondary: #00e3fd;               /* Caribbean Sea Bright Cyan */
    --accent: #FFEA00;                  /* Vibrant Yellow */
    --sunset-orange: #FF5722;
    --vibrant-yellow: #FFEA00;
    --tropical-teal: #00BFA5;
    --electric-purple: #D500F9;
    --bg-dark: #130827;
    --surface-container-low: #211635;
    --surface-container-highest: #3a2f50;
    --on-surface: #ebdcff;
    --on-surface-variant: #dcc2ae;
    --glass-white: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.18);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--on-surface);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, #130827 0%, #2f2444 50%, #180d2c 100%);
}

/* Palm tree background elements - Using local offline assets */
.palm-silhouette {
    position: absolute;
    bottom: -15px;
    z-index: 1;
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.88;
}
.palm-left {
    left: -80px;
    width: 320px;
    height: 320px;
    background-image: url('assets/palm_left.png?v=3');
    transform: rotate(15deg);
    animation: swayLeft 14s ease-in-out infinite alternate;
    transform-origin: bottom left;
}
.palm-right {
    right: -80px;
    width: 380px;
    height: 380px;
    background-image: url('assets/palm_right.png?v=3');
    transform: rotate(-15deg);
    animation: swayRight 16s ease-in-out infinite alternate;
    transform-origin: bottom right;
}

@keyframes swayLeft {
    0% { transform: rotate(15deg); }
    100% { transform: rotate(11deg); }
}
@keyframes swayRight {
    0% { transform: rotate(-15deg); }
    100% { transform: rotate(-11deg); }
}

/* Background Dance Floor & Lights */
.dancefloor-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.light {
    position: absolute;
    border-radius: 50%;
    opacity: 0.25;
    mix-blend-mode: screen;
    animation: floatLight 15s infinite alternate ease-in-out;
}

.light-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--sunset-orange) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.light-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

.light-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--electric-purple) 0%, transparent 70%);
    top: 30%;
    left: 40%;
    animation-duration: 20s;
    animation-delay: -10s;
}

@keyframes floatLight {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.15); }
    100% { transform: translate(-40px, -60px) scale(0.9); }
}

/* App Container */
.app-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0; /* Full screen on mobile */
    justify-content: center;
}

/* Bounded padding on tablet and desktop screens */
@media (min-width: 501px) {
    .app-container {
        padding: 16px;
    }
}

/* Screen Management */
.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.screen.active {
    display: flex;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Start Screen */
#start-screen {
    background-image: linear-gradient(to bottom, rgba(19, 8, 39, 0.25) 0%, rgba(24, 13, 44, 0.5) 100%), url('assets/start_screen_bg.png');
    background-size: cover;
    background-position: top center;
    position: relative;
    border-radius: 0; /* Full screen on mobile */
    overflow: hidden;
    box-shadow: none;
    border: none;
    padding: 24px;
}

@media (min-width: 501px) {
    #start-screen {
        border-radius: 24px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Audio Control Container & Mute Button */
.audio-control-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.audio-mute-btn {
    background: rgba(28, 15, 52, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-mute-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

/* Clouds container & individual drifting clouds */
.clouds-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.48);
    border-radius: 100px;
    filter: blur(4px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.48);
    border-radius: 50%;
}

.cloud-1 {
    width: 100px;
    height: 30px;
    top: 15%;
    left: -120px;
    animation: drift 28s linear infinite;
}
.cloud-1::before {
    width: 40px;
    height: 40px;
    top: -15px;
    left: 12px;
}
.cloud-1::after {
    width: 55px;
    height: 55px;
    top: -28px;
    right: 12px;
}

.cloud-2 {
    width: 150px;
    height: 45px;
    top: 32%;
    left: -170px;
    animation: drift 40s linear infinite;
    animation-delay: 4s;
    opacity: 0.8;
}
.cloud-2::before {
    width: 55px;
    height: 55px;
    top: -22px;
    left: 20px;
}
.cloud-2::after {
    width: 75px;
    height: 75px;
    top: -35px;
    right: 20px;
}

.cloud-3 {
    width: 80px;
    height: 25px;
    top: 8%;
    left: -100px;
    animation: drift 20s linear infinite;
    animation-delay: 10s;
    opacity: 0.6;
}
.cloud-3::before {
    width: 32px;
    height: 32px;
    top: -12px;
    left: 8px;
}
.cloud-3::after {
    width: 40px;
    height: 40px;
    top: -20px;
    right: 8px;
}

@keyframes drift {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(650px);
    }
}

.start-content-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding-bottom: 20px;
}

.tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    margin-bottom: 45px;
    letter-spacing: 0.5px;
    max-width: 340px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    line-height: 1.4;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #ffa600 0%, #ff1a4d 100%);
    border: 2px solid #ffde7d;
    color: white;
    padding: 12px 32px;
    font-size: 1.05rem;
    font-weight: 800;
    border-radius: 35px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(255, 26, 77, 0.3), inset 0 1.5px 3px rgba(255,255,255,0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 0.8px;
}

.btn-primary:active {
    transform: scale(0.95);
    box-shadow: 0 3px 8px rgba(255, 26, 77, 0.2);
}

/* TopAppBar Styles matching Stitch Design System */
.game-header-new {
    position: absolute; /* Changed from fixed to align with container on tablet/desktop */
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 20px;
    background: rgba(19, 8, 39, 0.75); /* Dark glass for premium contrast */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: start;
}

.heart-moves {
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pulseHeart 2s infinite ease-in-out;
}

@keyframes pulseHeart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.heart-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 4px var(--sunset-orange));
}

.moves-count {
    font-family: 'Anybody', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: white;
}

.header-divider {
    height: 24px;
    width: 1px;
    background: var(--glass-white);
}

.score-container {
    display: flex;
    flex-direction: column;
}

.score-label {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--on-surface-variant);
    text-transform: uppercase;
}

.score-val {
    font-family: 'Anybody', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--vibrant-yellow);
    line-height: 1;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: center;
}

.header-title {
    display: none; /* Hidden by default to prevent overlapping in the header, matches standard gameplay UIs */
    font-family: 'Anybody', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--sunset-orange);
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-mute-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-white);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.header-mute-btn:active {
    transform: scale(0.9);
}

.header-right {
    display: flex;
    flex-direction: column;
    width: 120px;
    gap: 4px;
    justify-self: end;
}

.level-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--on-surface-variant);
}

.progress-val {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--tropical-teal);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--surface-container-highest);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--sunset-orange), var(--vibrant-yellow));
    box-shadow: 0 0 10px rgba(255, 145, 0, 0.6);
    border-radius: 4px;
    transition: width 0.4s ease-out;
}

/* Main Layout */
.game-main-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    margin-top: 92px;   /* Room for TopAppBar */
    margin-bottom: 112px; /* Room for Bottom Boosters shelf */
}

/* Objectives Floating Glass Banner */
.objectives-banner {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.obj-banner-title {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--secondary);
    text-transform: uppercase;
}

.objectives-list {
    display: flex;
    gap: 12px;
}

.obj-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

.obj-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.obj-qty {
    font-weight: 800;
    font-size: 0.95rem;
    color: white;
}

/* Center Board Panel */
.board-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: min(440px, 90vw, calc(100vh - 220px)); /* Dynamically limits width and height so it never overflows vertically */
    padding: 0 16px;
}

.grid-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: rgba(33, 22, 53, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0,0,0,0.3);
    overflow: hidden;
    touch-action: none;
}

.game-grid-2d {
    width: 100%;
    height: 100%;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

/* 3D Crystal Block Styles */
.crystal-block {
    position: absolute;
    width: calc((100% - 16px - (7 * 4px)) / 8); /* 8 columns, 8px padding on sides (16px total), 7 gaps of 4px */
    height: calc((100% - 16px - (7 * 4px)) / 8);
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease-out, top 0.25s cubic-bezier(0.25, 1, 0.5, 1), left 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(43, 31, 65, 0.9);
    border: 1.5px solid var(--border-color, rgba(168, 85, 247, 0.35));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 0 10px var(--inset-glow, rgba(168, 85, 247, 0.25));
    --glow-color: #a855f7;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    z-index: 10;
    touch-action: none;
}

/* Rainbow iridescent/Vibrant Glowing Border Effect */
.crystal-block::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--glow-color, #fff), transparent, var(--glow-color, #fff));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.8;
    z-index: 5;
    pointer-events: none;
}

/* High-gloss crystal reflection */
.crystal-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.03) 50%, rgba(255,255,255,0) 100%);
    z-index: 2;
    pointer-events: none;
}

.crystal-block.selected {
    transform: scale(1.08) !important;
    border-color: #ffffff;
    box-shadow: 0 0 25px #ffffff, 0 0 10px var(--glow-color, #fff);
    z-index: 50;
}

.crystal-block:active {
    transform: scale(0.92);
}

/* Color variations for crystals (Unified Theme) */

.gem-glow {
    width: 85%;
    height: 85%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    animation: gem-pulse 2.5s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}

@keyframes gem-pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
}

/* Matching animations */
.crystal-block.match-fade {
    transform: scale(0) !important;
    opacity: 0;
}

/* Combo container under grid */
.combo-container {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 12px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-white);
    border-radius: 12px;
    padding: 6px 12px;
}

.combo-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--sunset-orange);
    margin-right: 8px;
}

.combo-bar-bg {
    flex-grow: 1;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-right: 10px;
}

.combo-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--sunset-orange), var(--secondary));
    border-radius: 3px;
    transition: width 0.3s ease-out;
}

.combo-multiplier-val {
    font-weight: 800;
    color: var(--secondary);
    font-size: 0.95rem;
}

/* Fixed Bottom Boosters Shelf matching Stitch Nav Bar */
.powerups-shelf {
    position: absolute; /* Changed from fixed to align with container on tablet/desktop */
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 16px 24px 16px;
    background: rgba(33, 22, 53, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-white);
    border-radius: 32px 32px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
}

.powerup-btn {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
    width: 58px;
}

.powerup-btn:active {
    transform: scale(0.9);
}

.powerup-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 1.5px 3px rgba(255,255,255,0.2), 0 3px 8px rgba(0,0,0,0.3);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.powerup-btn.selected .powerup-bubble {
    transform: scale(1.1);
    box-shadow: 0 0 12px currentColor;
    border-color: white;
}

/* Bubble colors matching Stitch Palette */
.spin-bubble { background: radial-gradient(circle at 35% 35%, var(--secondary) 0%, #004f58 100%); color: var(--secondary); }
.bomb-bubble { background: radial-gradient(circle at 35% 35%, var(--sunset-orange) 0%, #690005 100%); color: var(--sunset-orange); }
.color-bubble { background: radial-gradient(circle at 35% 35%, var(--electric-purple) 0%, #362b4b 100%); color: var(--electric-purple); }
.swap-bubble { background: radial-gradient(circle at 35% 35%, var(--vibrant-yellow) 0%, #6c3a00 100%); color: var(--vibrant-yellow); }

.powerup-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.48rem;
    font-weight: 800;
    color: #dcc2ae;
    margin-top: 4px;
    text-align: center;
    line-height: 1.1;
    letter-spacing: 0.4px;
}

.powerup-count {
    position: absolute;
    top: -4px;
    right: 4px;
    background: var(--sunset-orange);
    border: 1px solid #ffdcc1;
    color: white;
    font-family: 'Anybody', sans-serif;
    font-weight: 800;
    font-size: 0.58rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 1.5px 4px rgba(0,0,0,0.3);
}

/* Game Over Screen */
.game-over-title {
    font-family: 'Anybody', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--sunset-orange);
    text-shadow: 0 0 20px rgba(255, 87, 34, 0.4);
    margin-bottom: 25px;
    text-align: center;
}

.results-box {
    background: rgba(33, 22, 53, 0.8);
    border: 1px solid var(--glass-white);
    border-radius: 24px;
    width: 100%;
    max-width: 380px;
    padding: 30px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 16px 32px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.1);
}

.results-box p {
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.final-score-val {
    font-size: 4rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
    margin: 10px 0 20px 0;
}

.rank-label {
    margin-top: 15px;
}

.rank-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--secondary);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    margin-top: 5px;
}

/* Modern Icons styling */
.modern-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.powerup-bubble .modern-icon {
    width: 22px;
    height: 22px;
}

/* Language Selector styles */
.lang-selector-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.lang-select {
    background: rgba(28, 15, 52, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.lang-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.lang-select option {
    background: #1c0e35;
    color: white;
}

/* Responsive design for Mobile Viewports */
@media (max-width: 480px) {
    .app-container {
        padding: 0;
    }
    
    .game-main-layout {
        margin-top: 76px;
        margin-bottom: 96px;
        gap: 12px;
    }
    
    .objectives-banner {
        padding: 8px 14px;
        gap: 8px;
    }

    .obj-item {
        padding: 3px 8px;
        gap: 4px;
    }

    .obj-qty {
        font-size: 0.85rem;
    }

    .obj-img {
        width: 16px;
        height: 16px;
    }
    
    .grid-wrapper {
        border-radius: 20px;
    }

    .powerups-shelf {
        padding: 6px 6px 18px 6px;
        border-radius: 20px 20px 0 0;
    }

    .powerup-btn {
        width: 48px;
    }

    .powerup-bubble {
        width: 32px;
        height: 32px;
    }
    
    .powerup-bubble .modern-icon {
        width: 18px;
        height: 18px;
    }

    .powerup-label {
        font-size: 0.44rem;
        margin-top: 4px;
    }

    .powerup-count {
        top: -5px;
        right: 2px;
        font-size: 0.52rem;
        width: 13px;
        height: 13px;
        border-radius: 50%;
    }

    .logo-text { font-size: 3.5rem; }
    .logo-subtext { font-size: 3.8rem; }
    .tagline { margin-bottom: 30px; font-size: 1rem; }
    
    .game-header-new {
        height: 64px;
        padding: 0 12px;
    }
    .header-title {
        display: none; /* Hide logo title on mobile header to avoid overlap */
    }
    .header-left {
        gap: 8px;
    }
    .header-right {
        width: 90px;
    }
}

/* Bomb badge overlay on tile */
.bomb-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 1.25rem;
    z-index: 15;
    filter: drop-shadow(0 0 5px #ff5722) drop-shadow(0 0 2px #ffea00);
    animation: bomb-wiggle 1.2s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes bomb-wiggle {
    0% { transform: scale(0.9) rotate(-8deg); }
    100% { transform: scale(1.15) rotate(8deg); }
}

@media (max-width: 480px) {
    .bomb-badge {
        font-size: 0.95rem;
        bottom: 2px;
        right: 2px;
    }
}

/* SVG Icon styles */
.svg-icon-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
}

.svg-icon-img {
    width: 70%;
    height: 70%;
    display: block;
    filter: drop-shadow(0 0 5px var(--icon-glow)) drop-shadow(0 0 1px var(--icon-glow));
    transition: filter 0.3s ease;
}

.obj-icon-svg {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.obj-icon-svg .svg-icon-img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 4px var(--icon-glow));
}

@media (max-width: 480px) {
    .obj-icon-svg {
        width: 16px;
        height: 16px;
    }
}

/* Level Cleared Screen Styles */
.level-cleared-title {
    font-family: 'Anybody', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(135deg, #00FFCC 0%, #00a2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    text-align: center;
    filter: drop-shadow(0 2px 10px rgba(0, 255, 204, 0.3));
    letter-spacing: -0.02em;
}

.level-badge-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    margin: 12px 0;
    text-shadow: 0 0 10px rgba(255, 234, 0, 0.4);
}

.score-bonus-info {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00FFCC;
    margin-top: 8px;
}

/* Secondary Buttons on Start Screen */
.start-secondary-buttons {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    width: 90%;
    max-width: 440px;
    justify-content: center;
}

.btn-secondary {
    background: rgba(33, 22, 53, 0.85); /* Solid glass background for better contrast */
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.25s ease-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-secondary:hover, .btn-secondary:active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.25);
}

.btn-icon {
    font-size: 1.25rem;
    color: #ffa600;
}

/* Premium Titles & Subtitles for overlays */
.screen-title-premium {
    font-family: 'Anybody', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(135deg, #FF007F 0%, #7F00FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    text-align: center;
    filter: drop-shadow(0 2px 10px rgba(255, 0, 127, 0.3));
    letter-spacing: -0.01em;
}

.screen-subtitle-premium {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    text-align: center;
    max-width: 80%;
}

/* Daily Reward Grid */
.daily-reward-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 90%;
    max-width: 480px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

@media (max-width: 400px) {
    .daily-reward-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.reward-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    aspect-ratio: 1 / 1.2;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.reward-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.reward-card .card-day {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.reward-card .card-icon {
    font-size: 1.8rem;
    margin: 8px 0;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.reward-card .card-qty {
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
}

/* States */
.reward-card.claimed {
    background: rgba(0, 255, 204, 0.08);
    border-color: rgba(0, 255, 204, 0.25);
    opacity: 0.7;
}

.reward-card.claimed .card-day {
    color: #00FFCC;
}

.reward-card.claimed .card-qty {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.4);
}

.reward-card.current {
    background: rgba(168, 85, 247, 0.2);
    border: 2px solid #a855f7;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.6), inset 0 0 10px rgba(168, 85, 247, 0.4);
    transform: scale(1.08);
    z-index: 10;
    animation: pulseGlow 2s infinite ease-in-out;
}

.reward-card.current .card-day {
    color: #ffa600;
}

.reward-card.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.8); }
}

/* Daily Challenge elements */
.challenge-info-box {
    width: 90%;
    max-width: 440px;
    margin-bottom: 24px;
    padding: 24px;
    box-sizing: border-box;
}

.challenge-date {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffa600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
    text-shadow: 0 0 8px rgba(254, 166, 0, 0.3);
}

.challenge-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin-bottom: 16px;
}

.challenge-objectives-summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 16px 0;
}

.challenge-reward-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
}

.challenge-reward-badge .reward-val {
    color: #00FFCC;
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.4);
}

/* --- DANCER PROFILE SCREEN --- */
.profile-header-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 16px;
    width: 90%;
    max-width: 440px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.profile-avatar-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    font-size: 2.2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--secondary);
    box-shadow: 0 0 10px rgba(0, 227, 253, 0.2);
}

.profile-name-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-name-input {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
    width: 100px;
    outline: none;
    padding: 2px 0;
}

.profile-name-input:focus {
    border-bottom-color: var(--secondary);
    text-shadow: 0 0 8px rgba(0, 227, 253, 0.5);
}

.edit-name-icon {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.profile-level-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.profile-level-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--on-surface-variant);
    letter-spacing: 0.1em;
}

.profile-level-val {
    font-family: 'Anybody', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 234, 0, 0.4);
}

.profile-rank-val {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--secondary);
    text-transform: uppercase;
    margin-top: 2px;
}

/* Tabs */
.profile-tabs {
    display: flex;
    width: 90%;
    max-width: 440px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.profile-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    padding: 8px 0;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.profile-tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    text-shadow: 0 0 8px white;
}

/* Tab Panels */
.profile-tab-content {
    width: 90%;
    max-width: 440px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100vh - 280px);
    padding-right: 4px;
}

.tab-panel {
    display: none;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.tab-panel.active {
    display: flex;
}

/* Style Progression Cards */
.style-prog-card {
    background: rgba(33, 22, 53, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.05);
}

.style-prog-card.locked {
    opacity: 0.5;
    background: rgba(0, 0, 0, 0.4);
    border-style: dashed;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: rgba(255,255,255,0.4);
}

.style-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.style-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: white;
}

.style-perc {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--secondary);
}

.style-progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.style-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sunset-orange), var(--accent));
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.style-figures-checklist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

.style-figures-checklist div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.check-box {
    color: var(--secondary);
    font-weight: bold;
    display: inline-block;
    width: 14px;
}

.check-box.checked {
    color: #00FFCC;
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.5);
}

.lock-indicator {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Skills Cards */
.skills-upgrade-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dance-stars-bank {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.stars-qty-glow {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(255, 234, 0, 0.5);
}

.skill-card {
    background: rgba(33, 22, 53, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 60%;
}

.skill-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: white;
}

.skill-desc {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.2;
}

.skill-stars {
    display: flex;
    gap: 4px;
    font-size: 1.25rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.2);
}

.upgrade-star {
    transition: transform 0.2s, color 0.2s;
}

.upgrade-star:hover {
    transform: scale(1.2);
}

.upgrade-star.filled {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(255, 234, 0, 0.6);
}

/* Choreography Sequencer */
.choreography-sequencer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    text-align: center;
}

.sequencer-timeline {
    background: rgba(0,0,0,0.4);
    border: 1.5px dashed rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: auto;
    width: 100%;
}

.timeline-empty-msg {
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
    text-align: center;
    width: 100%;
}

.timeline-step-badge {
    background: linear-gradient(135deg, #a855f7 0%, #d500f9 100%);
    color: white;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(213, 0, 249, 0.3);
    animation: pop-in 0.2s forwards;
    cursor: pointer;
}

.timeline-step-remove {
    font-weight: bold;
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
}

.timeline-step-remove:hover {
    color: white;
}

.sequencer-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.unlocked-steps-palette, .audio-tracks-unlocker {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 12px;
}

.unlocked-steps-palette h4, .audio-tracks-unlocker h4 {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.steps-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.step-pool-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255,255,255,0.8);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.step-pool-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--secondary);
    color: white;
    transform: translateY(-1px);
}

.tracks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.track-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.track-item-row.unlocked {
    cursor: pointer;
}

.track-item-row.unlocked:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.track-item-row.active {
    background: rgba(213, 0, 249, 0.15) !important;
    border-color: var(--secondary) !important;
    box-shadow: 0 0 10px rgba(213, 0, 249, 0.2);
}

.track-name {
    font-weight: 700;
    color: white;
}

.track-status {
    color: var(--secondary);
    font-weight: 700;
}

.track-status.locked {
    color: rgba(255,255,255,0.3);
}

/* --- LESSON SCREEN --- */
.lesson-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 440px;
    padding: 20px;
}

.teacher-avatar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 16px;
}

.teacher-avatar {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 0, 127, 0.4));
    animation: dance-wiggle 1.5s infinite alternate ease-in-out;
}

.teacher-speech {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 12px 12px 12px 0;
    font-size: 0.8rem;
    color: white;
    line-height: 1.3;
    flex-grow: 1;
}

.simon-display {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.3);
    width: 100%;
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}

.simon-flash-indicator {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
    animation: flash-grow 0.4s ease-out;
    text-shadow: 0 0 10px var(--secondary);
}

.simon-pad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.simon-mid-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.simon-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 2.5px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.15s ease-out;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.simon-btn:active, .simon-btn.active {
    transform: scale(0.9);
    background: var(--secondary);
    border-color: white;
    color: #130827;
    box-shadow: 0 0 20px var(--secondary);
}

.simon-btn.btn-up { color: #ff5722; }
.simon-btn.btn-down { color: #00BFA5; }
.simon-btn.btn-left { color: #FFEA00; }
.simon-btn.btn-right { color: #D500F9; }

.simon-center-gem {
    font-size: 1.25rem;
    color: var(--secondary);
    filter: drop-shadow(0 0 8px var(--secondary));
    width: 44px;
    text-align: center;
}

.lesson-progress-indicator {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
}

#lesson-step-count {
    color: var(--secondary);
}

/* Animations */
@keyframes pop-in {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes flash-grow {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; filter: brightness(1.5); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes dance-wiggle {
    0% { transform: rotate(-5deg) translateY(0); }
    100% { transform: rotate(5deg) translateY(-4px); }
}

/* Maestro and Couple crystals */
.crystal-block.crystal-maestro {
    background: radial-gradient(circle, #ff007f 0%, #36113b 100%);
    border-color: #ff007f;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.4);
    --glow-color: #ff007f;
}

.crystal-block.crystal-lead {
    background: radial-gradient(circle, #00BFA5 0%, #153b35 100%);
    border-color: #00BFA5;
    box-shadow: 0 0 12px rgba(0, 191, 165, 0.3);
    --glow-color: #00BFA5;
}

.crystal-block.crystal-follow {
    background: radial-gradient(circle, #ff9100 0%, #3a2205 100%);
    border-color: #ff9100;
    box-shadow: 0 0 12px rgba(255, 145, 0, 0.3);
    --glow-color: #ff9100;
}

/* Start Screen Menu scaling down */
#start-screen .btn-primary {
    padding: 12px 30px;
    font-size: 1.05rem;
    border-radius: 30px;
    border-width: 2px;
}

#start-screen .btn-secondary {
    padding: 9px 18px;
    font-size: 0.82rem;
    border-radius: 20px;
}

#start-screen .tagline {
    font-size: 0.92rem;
    margin-bottom: 24px;
    max-width: 300px;
}

#start-screen .start-secondary-buttons {
    margin-top: 16px;
    gap: 10px;
}

/* Travel Map Screen Styles */
.travel-map-box {
    width: 92%;
    max-width: 440px;
    aspect-ratio: 1 / 1;
    position: relative;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-bottom: 16px;
    padding: 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 8px 32px rgba(0, 0, 0, 0.6);
}

.travel-map-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.85) contrast(1.05);
}

/* SVG Path Overlay Styles */
.map-path-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.map-path-line-bg {
    stroke: rgba(255, 255, 255, 0.22);
    stroke-width: 2.5;
    stroke-dasharray: 4, 4;
    fill: none;
}

.map-path-line-active {
    stroke: #00BFA5;
    stroke-width: 3.5;
    stroke-dasharray: 6, 4;
    stroke-linecap: round;
    fill: none;
    animation: dashMove 1.5s linear infinite;
    filter: drop-shadow(0 0 5px #00BFA5);
}

@keyframes dashMove {
    to {
        stroke-dashoffset: -20;
    }
}

.map-step-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.marker-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(19, 8, 39, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    z-index: 2;
}

.map-step-marker.selected-glow .marker-dot {
    border-color: #ff9100;
    box-shadow: 0 0 15px #ff9100, 0 0 5px #ffffff;
    transform: scale(1.15);
}

.marker-label {
    margin-top: 4px;
    font-size: 0.6rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.9);
    background: rgba(19, 8, 39, 0.8);
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

/* Active State */
.map-step-marker.active {
    z-index: 20;
}

.map-step-marker.active .marker-dot {
    background: #00BFA5;
    border-color: #ffffff;
    transform: scale(1.18);
    box-shadow: 0 0 15px #00BFA5, 0 0 5px #ffffff;
    animation: markerBounce 1.5s infinite alternate ease-in-out;
    color: #110c1f;
}

.map-step-marker.active .marker-label {
    background: #00BFA5;
    color: #110c1f;
    border-color: #ffffff;
    text-shadow: none;
    font-weight: 800;
    transform: scale(1.05);
}

/* Completed State */
.map-step-marker.completed .marker-dot {
    background: #00e676;
    border-color: #00e676;
    color: #110c1f;
}

.map-step-marker.completed .marker-label {
    background: rgba(0, 230, 118, 0.25);
    color: #00e676;
    border-color: rgba(0, 230, 118, 0.4);
}

/* Locked State */
.map-step-marker.locked {
    opacity: 0.55;
}

.map-step-marker.locked .marker-dot {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.4);
}

.map-step-marker.locked .marker-label {
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.4);
}

@keyframes markerBounce {
    0% { transform: translateY(0) scale(1.18); }
    100% { transform: translateY(-5px) scale(1.18); }
}

/* Map Details Card Styles */
.map-details-card {
    width: 92%;
    max-width: 440px;
    background: rgba(27, 18, 44, 0.95);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 12px 18px;
    margin-top: 2px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.map-details-card.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.details-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.details-text {
    flex-grow: 1;
}

.details-city {
    font-family: 'Anybody', sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    color: white;
    margin: 0;
}

.details-desc {
    font-size: 0.7rem;
    color: var(--on-surface-variant);
    margin: 0;
    margin-top: 1px;
}

.details-status {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.details-status.completed {
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
    border-color: rgba(0, 230, 118, 0.3);
}

.details-status.active {
    background: rgba(0, 191, 165, 0.15);
    color: #00BFA5;
    border-color: rgba(0, 191, 165, 0.3);
}

.details-status.locked {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

