/* ══════════════════════════════════════════════════════════
   Water Flow — Home Page 3D Gaming Stylesheet
   Exact recreation of reference casual game UI.
   Uses assets/images/homepage.png background & high-detail SVGs (no emojis).
   ══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@700;900&display=swap');

/* ── Root Container ──
   background-position: center -85px shifts the image up so that:
   1. The mascot drop sits directly below the top currency bar.
   2. The 3D golden/cyan "WATER FLOW" logo text is 100% visible
      and clear in the sunlit upper waters.
   3. The juicy green PLAY button sits right below the logo without
      any overlap or obstruction.                                 */
.home {
    background: transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    width: 100%;
    max-width: 480px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

/* Shimmering homepage art with global underwater video beneath */
.home::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../assets/images/homepage.png') no-repeat center / cover;
    pointer-events: none;
    z-index: 0;
    opacity: 0.84;
    height: 100vh;
}

.home>* {
    position: relative;
    z-index: 2;
}

/* Subtle bottom gradient overlay — only covers the very bottom (mode cards & dock)
   so the WATER FLOW logo and corals above remain 100% bright and vibrant. */

/* ────────────────────────────────────────
   1. Top Currency Bar (Coins · Lives · Gems)
   ──────────────────────────────────────── */

.home__currency-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 5px;
    padding: 8px 8px 10px 8px;
    padding-top: calc(8px + var(--safe-top, 0px));
    position: relative;
    z-index: 20;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    /* Soft dark gradient scrim so currency badges pop over water */
    background: linear-gradient(180deg,
            rgba(0, 8, 22, 0.6) 0%,
            rgba(0, 8, 22, 0.25) 60%,
            transparent 100%);
}

/* Base Currency Pill — Royal Navy Blue with 3D Golden Frame */
.currency-pill {
    height: 34px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 2px 4px 2px 5px;
    gap: 4px;
    position: relative;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(8, 47, 95, 0.92) 0%, rgba(3, 27, 58, 0.98) 100%);
    border: 2px solid #F59E0B;
    outline: 1.5px solid #78350F;
    box-shadow: 0 3px 0 #451A03,
        0 4px 8px rgba(0, 0, 0, 0.5),
        inset 0 2px 2px rgba(255, 255, 255, 0.35);
    transition: transform var(--transition-fast, 0.15s), box-shadow var(--transition-fast, 0.15s);
}

.currency-pill:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #451A03, 0 2px 5px rgba(0, 0, 0, 0.4);
}

.currency-pill .pill__icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-left: -3px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.currency-pill .pill__icon svg {
    width: 100%;
    height: 100%;
}

.currency-pill .pill__val {
    font-family: var(--font-family, 'Outfit', sans-serif);
    font-size: 13px;
    font-weight: 900;
    color: #FFFFFF;
    text-shadow: 0 1.5px 0 #000, 0 2px 4px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Green Tactile Plus Button */
.currency-pill .pill__add-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4));
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.currency-pill .pill__add-btn:active {
    transform: scale(0.85);
}

.currency-pill .pill__add-btn svg {
    width: 100%;
    height: 100%;
}

/* ── Pill Specific Sizing ── */

/* 1. Coins Pill */
.pill--coins {
    flex: 1.1;
    max-width: 128px;
}

/* 2. Lives / Hearts Wrap with Sub-timer */
.currency-pill-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    max-width: 118px;
}

.pill--hearts {
    width: 100%;
    justify-content: space-between;
}

.pill--hearts .pill__badge {
    background: linear-gradient(180deg, #EF4444 0%, #DC2626 100%);
    border: 1px solid #FCA5A5;
    border-radius: 10px;
    padding: 1px 5px;
    font-size: 9px;
    font-weight: 900;
    color: #FFFFFF;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hearts__timer {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(12, 74, 110, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.55);
    border-radius: 11px;
    padding: 1px 6px;
    font-size: 9px;
    font-weight: 800;
    color: #ADE8F4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    background: rgba(7, 25, 44, 0.92);
}

.hearts__timer svg {
    width: 10px;
    height: 10px;
}

/* 3. Gems Pill */
.pill--gems {
    flex: 1;
    max-width: 102px;
    justify-content: space-between;
}

/* ────────────────────────────────────────
   2. Hero Mascot + "WATER FLOW" Logo Spacer
   Background image shows the 3D mascot + golden text here.
   ──────────────────────────────────────── */

.home__hero-spacer {
    flex: 1 1 auto;
    min-height: 200px;
    width: 100%;
    cursor: pointer;
    position: relative;
    z-index: 5;
}

/* ────────────────────────────────────────
   3. Bottom Action Section (Play + 4 Modes)
   ──────────────────────────────────────── */

.home__bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 10px 90px 10px;
    position: relative;
    z-index: 20;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* ── Juicy 3D Green PLAY Button (Exact Match to User Reference) ── */
.home__play-btn {
    width: 100%;
    max-width: 326px;
    height: 92px;
    border-radius: 34px;
    border: 4.5px solid #FDE047;
    outline: 2.5px solid #663205;
    background: linear-gradient(180deg, #A8F349 0%, #8FE01C 20%, #68C812 45%, #3BAE08 70%, #20860A 100%);
    box-shadow: 0 7px 0 #451A03,
        0 12px 24px rgba(0, 0, 0, 0.55),
        inset 0 3px 2px rgba(255, 255, 255, 0.75),
        inset 0 -4px 0 #1A4700;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transform: translateY(0);
    transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.12s;
    user-select: none;
    -webkit-user-select: none;
}

.home__play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 0 #451A03,
        0 16px 28px rgba(0, 0, 0, 0.65),
        inset 0 3px 2px rgba(255, 255, 255, 0.8),
        inset 0 -4px 0 #1A4700;
}

.home__play-btn:active {
    transform: translateY(5px);
    box-shadow: 0 2px 0 #451A03,
        0 4px 10px rgba(0, 0, 0, 0.5),
        inset 0 2px 2px rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 #1A4700;
}

/* ── Top-Left Jelly Bean Gloss Highlights ── */
.play-btn__highlights {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
    border-radius: 30px;
}

/* Main elongated pill highlight */
.highlight-bubble.highlight--main {
    position: absolute;
    top: 10px;
    left: 18px;
    width: 32px;
    height: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    transform: rotate(-22deg);
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.4));
}

/* Secondary round highlight dot right next to main */
.highlight-bubble.highlight--dot {
    position: absolute;
    top: 11px;
    left: 56px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
}

/* Tiny circular dot on left curve */
.highlight-bubble.highlight--tiny {
    position: absolute;
    top: 40px;
    left: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
}

/* ── Top-Right Golden Star Sparkle ── */
.play-btn__sparkle {
    position: absolute;
    top: -8px;
    right: 18px;
    width: 26px;
    height: 26px;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(253, 224, 71, 0.9));
    animation: sparkleTwinkle 3s ease-in-out infinite;
}

.play-btn__sparkle svg {
    width: 100%;
    height: 100%;
}

@keyframes sparkleTwinkle {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 6px rgba(253, 224, 71, 0.8));
    }

    50% {
        transform: scale(1.18) rotate(15deg);
        filter: drop-shadow(0 0 14px rgba(255, 255, 255, 1));
    }
}

/* ── Button Inner Text Container ── */
.play-btn__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 5;
    position: relative;
    pointer-events: none;
}

/* Big 3D Golden "PLAY" Text */
.play-btn__title {
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 0.95;
    color: #FFD43F;
    background: linear-gradient(180deg, #FFF9A6 0%, #FED440 38%, #F7A81B 72%, #E68500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 0 #5A2700) drop-shadow(0 2px 0 #5A2700) drop-shadow(0 3px 0 #5A2700) drop-shadow(0 4px 0 #451A03) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55));
}

/* 3D Golden "LEVEL X" Sub-Text */
.play-btn__sub {
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 1.5px;
    line-height: 1;
    margin-top: 3px;
    color: #FFE54C;
    background: linear-gradient(180deg, #FEEF89 0%, #FBD048 50%, #F2B221 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 0 #5A2700) drop-shadow(0 2px 0 #5A2700) drop-shadow(0 3px 0 #451A03) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

/* Shimmer Sheen Sweep */
.play-btn__sheen {
    position: absolute;
    top: -50%;
    left: -80%;
    width: 55%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: rotate(25deg);
    pointer-events: none;
    animation: sheenSweep 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 2;
    border-radius: 30px;
}

/* ── 3 Mode Cards (Aqua Rush, Daily Quest, Settings) ── */
.home__modes-dock {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 440px;
}

.mode-card {
    height: 106px;
    border-radius: 18px;
    border: 3.5px solid #FBBF24;
    outline: 2px solid #5A2700;
    box-shadow: 0 6px 0 #05182D,
        0 10px 18px rgba(0, 0, 0, 0.55),
        inset 0 2.5px 2px rgba(255, 255, 255, 0.4),
        inset 0 -3px 0 rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 7px 4px 6px 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.12s;
    user-select: none;
    -webkit-user-select: none;
}

.mode-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #05182D,
        0 14px 22px rgba(0, 0, 0, 0.65),
        inset 0 2.5px 2px rgba(255, 255, 255, 0.5);
}

.mode-card:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #05182D,
        0 4px 8px rgba(0, 0, 0, 0.45),
        inset 0 1.5px 1px rgba(255, 255, 255, 0.3);
}

/* Card Header Tag — Clean 3D White Typography (No Pill Background) */
.mode-card__header-tag {
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 900;
    color: #FFFFFF;
    text-shadow: 0 1px 0 #000,
        0 2px 0 #000,
        0 2px 4px rgba(0, 0, 0, 0.8);
    background: transparent;
    border: none;
    padding: 0;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    letter-spacing: 0.3px;
    line-height: 1.1;
}

/* Center Icon */
.mode-card__center-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45));
    flex-shrink: 0;
    margin: 1px 0;
}

.mode-card__center-icon svg {
    width: 100%;
    height: 100%;
}

/* Card Footer */
.mode-card__footer-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.mode-card__footer-tag .tag-title {
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 900;
    color: #FFFFFF;
    text-shadow: 0 1px 0 #000,
        0 2px 0 #000,
        0 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    letter-spacing: 0.2px;
    line-height: 1.1;
}

/* Aqua Rush Pill Timer (Clock + 15:00) */
.mode-card__footer-tag .tag-meta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(3, 20, 48, 0.9);
    border: 1.5px solid #0284C7;
    border-radius: 12px;
    padding: 1px 6px;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 9px;
    font-weight: 900;
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.mode-card__footer-tag .tag-meta svg {
    width: 10px;
    height: 10px;
}

/* Progress Bar (Daily Quest) */
.mode-card__progress-track {
    width: 82%;
    height: 7px;
    background: #031B38;
    border-radius: 6px;
    border: 1.5px solid #0284C7;
    overflow: hidden;
    margin-top: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

.mode-card__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ADE80 0%, #22C55E 100%);
    border-radius: 5px;
    box-shadow: 0 0 6px #4ADE80;
}

/* ── Mode Card Theme Gradients & Frames ── */

/* 1. Aqua Rush (Cyan/Blue) */
.mode-card--rush {
    background: linear-gradient(180deg, #0284C7 0%, #0369A1 50%, #075985 100%);
    border-color: #FBBF24;
    outline-color: #5A2700;
    box-shadow: 0 6px 0 #0C2340,
        0 10px 18px rgba(0, 0, 0, 0.55),
        inset 0 2.5px 2px rgba(255, 255, 255, 0.4),
        inset 0 -3px 0 #023E8A;
}

/* 2. Daily Quest (Ocean Blue with Gold Trim) */
.mode-card--daily {
    background: linear-gradient(180deg, #0284C7 0%, #0369A1 50%, #075985 100%);
    border-color: #FBBF24;
    outline-color: #5A2700;
    box-shadow: 0 6px 0 #0C2340,
        0 10px 18px rgba(0, 0, 0, 0.55),
        inset 0 2.5px 2px rgba(255, 255, 255, 0.4),
        inset 0 -3px 0 #023E8A;
}

/* 3. Settings (Deep Oceanic Steel Blue with Golden Trim) */
.mode-card--settings {
    background: linear-gradient(180deg, #1E293B 0%, #0F172A 50%, #07192C 100%);
    border-color: #FBBF24;
    outline-color: #5A2700;
    box-shadow: 0 6px 0 #0C1E36,
        0 10px 18px rgba(0, 0, 0, 0.55),
        inset 0 2.5px 2px rgba(255, 255, 255, 0.4),
        inset 0 -3px 0 #020D1A;
}

/* ────────────────────────────────────────
   4. Bottom Navigation Dock (Hidden)
   ──────────────────────────────────────── */

.home__nav-dock {
    display: none !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    padding-bottom: var(--safe-bottom, 0px);
    height: 74px;
    background: linear-gradient(180deg, #0284C7 0%, #0369A1 50%, #024E82 100%);
    border-top: 3.5px solid #38BDF8;
    border-top-left-radius: 26px;
    border-top-right-radius: 26px;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.45),
        inset 0 2px 0 rgba(255, 255, 255, 0.45),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    overflow: hidden;
}

.nav-dock__btn {
    flex: 1 1 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    padding: 6px 4px 6px 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    transition: transform var(--transition-fast, 0.15s), background var(--transition-fast, 0.2s);
}

.nav-dock__btn:active {
    transform: scale(0.93);
}

/* Active Tab ("Home" in reference) */
.nav-dock__btn.active {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.42) 0%, rgba(2, 132, 199, 0.28) 50%, rgba(2, 78, 130, 0.15) 100%);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4),
        inset -1.5px 0 0 rgba(255, 255, 255, 0.15),
        1.5px 0 0 rgba(2, 60, 100, 0.4);
    border-top-left-radius: 24px;
}

.nav-dock__icon-wrap {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform var(--transition-fast, 0.15s);
}

.nav-dock__icon-wrap svg {
    width: 42px;
    height: 42px;
    display: block;
    overflow: visible;
    filter: drop-shadow(0 2.5px 3.5px rgba(0, 0, 0, 0.55));
}

/* Home active tab glowing aura */
.nav-dock__btn.active .nav-dock__icon-wrap svg {
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.95)) drop-shadow(0 0 4px rgba(255, 255, 255, 0.75)) drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
    transform: scale(1.06);
}

.nav-dock__label {
    font-family: 'Fredoka', 'Outfit', var(--font-family, system-ui), sans-serif;
    font-size: 13.5px;
    font-weight: 900;
    letter-spacing: 0.3px;
    color: #FFFFFF;
    text-shadow: 0 1.8px 0 #02365A,
        0 2.5px 0 #01243D,
        0 3px 6px rgba(0, 0, 0, 0.75);
    line-height: 1.1;
    transition: color var(--transition-fast, 0.15s), transform var(--transition-fast, 0.15s);
}

.nav-dock__btn.active .nav-dock__label {
    color: #FFFFFF;
    text-shadow: 0 1.8px 0 #012B48,
        0 2.5px 0 #001C30,
        0 0 10px rgba(56, 189, 248, 0.85),
        0 3px 6px rgba(0, 0, 0, 0.75);
    transform: scale(1.03);
}

/* ────────────────────────────────────────
   Responsive Breakpoints
   ──────────────────────────────────────── */

/* Short screens */
@media (max-height: 680px) {
    .home {
        /* background-position: center -95px; */
    }

    .home__hero-spacer {
        min-height: 160px;
    }

    .home__play-btn {
        height: 74px;
        max-width: 290px;
    }

    .play-btn__title {
        font-size: 34px;
    }

    .play-btn__sub {
        font-size: 15px;
    }

    .highlight-bubble.highlight--main {
        width: 24px;
        height: 12px;
        top: 8px;
        left: 14px;
    }

    .highlight-bubble.highlight--dot {
        top: 9px;
        left: 44px;
        width: 8px;
        height: 8px;
    }

    .highlight-bubble.highlight--tiny {
        top: 32px;
        left: 9px;
        width: 5px;
        height: 5px;
    }

    .play-btn__sparkle {
        top: -6px;
        right: 14px;
        width: 20px;
        height: 20px;
    }

    .mode-card {
        height: 94px;
        padding: 5px 3px 4px 3px;
    }

    .mode-card__center-icon {
        width: 38px;
        height: 38px;
    }

    .mode-card__header-tag {
        font-size: 9.5px;
    }

    .mode-card__footer-tag .tag-title {
        font-size: 8.5px;
    }

    .home__nav-dock {
        height: 66px;
    }

    .nav-dock__icon-wrap {
        width: 38px;
        height: 38px;
    }

    .nav-dock__icon-wrap svg {
        width: 36px;
        height: 36px;
    }

    .nav-dock__label {
        font-size: 11.5px;
    }
}

/* Tall screens */
@media (min-height: 820px) {
    .home {
        background-position: center -65px;
    }
}

@media (min-height: 920px) {
    .home {
        background-position: center -45px;
    }
}