/* =========================================
   HABITQUEST THEMES PAGE
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #061317;
    --surface: rgba(255, 255, 255, .045);
    --surface-strong: #0d2025;
    --border: rgba(255, 255, 255, .09);

    --text: #f5fbfc;
    --muted: #82999f;

    --accent: #35d6e4;
    --accent-soft: rgba(53, 214, 228, .15);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 85% 5%,
            rgba(35, 184, 201, .10),
            transparent 28%
        ),
        radial-gradient(
            circle at 10% 90%,
            rgba(31, 112, 125, .08),
            transparent 30%
        ),
        var(--bg);
}

button,
a {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================
   TOP BAR
========================================= */

.topbar {
    height: 70px;

    padding: 0 28px;

    display: flex;
    align-items: center;

    gap: 18px;

    position: sticky;
    top: 0;

    z-index: 100;

    background: rgba(6, 19, 23, .82);

    border-bottom:
        1px solid var(--border);

    backdrop-filter: blur(18px);
}

.back-btn {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background:
        rgba(255, 255, 255, .055);

    border:
        1px solid var(--border);

    font-size: 20px;

    transition:
        transform .2s ease,
        background .2s ease;
}

.back-btn:hover {
    transform: translateX(-3px);

    background:
        rgba(53, 214, 228, .12);
}

.brand {
    font-size: 20px;
    font-weight: 800;
}

.header-title {
    margin-left: auto;

    color: var(--muted);

    font-size: 13px;

    letter-spacing: .5px;
}


/* =========================================
   MAIN
========================================= */

.themes-page {
    width: min(1180px, 92%);

    margin: 0 auto;

    padding: 42px 0 80px;
}


/* =========================================
   INTRO
========================================= */

.themes-header {
    margin-bottom: 28px;
}

.themes-header > span {
    color: var(--accent);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 1.8px;
}

.themes-header h1 {
    margin-top: 7px;

    font-size: clamp(
        30px,
        5vw,
        44px
    );

    line-height: 1.1;
}

.themes-header p {
    margin-top: 10px;

    color: var(--muted);

    font-size: 14px;
}


/* =========================================
   CURRENT THEME
========================================= */

.current-theme-card {
    min-height: 92px;

    margin-bottom: 22px;
    padding: 20px 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            rgba(53, 214, 228, .08),
            rgba(255, 255, 255, .025)
        );

    border:
        1px solid rgba(53, 214, 228, .18);

    box-shadow:
        0 15px 40px rgba(0, 0, 0, .18);
}

.current-theme-card span {
    color: var(--muted);

    font-size: 10px;

    letter-spacing: 1.5px;
}

.current-theme-card h2 {
    margin-top: 6px;

    font-size: 20px;
}

.current-theme-status {
    padding: 8px 13px;

    border-radius: 999px;

    color: #76f5c4;

    background:
        rgba(52, 211, 153, .09);

    border:
        1px solid rgba(52, 211, 153, .18);

    font-size: 11px;
    font-weight: 700;
}


/* =========================================
   THEME GRID
========================================= */

.theme-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================
   THEME CARD
========================================= */

.theme-card {
    position: relative;

    overflow: hidden;

    border-radius: 22px;

    background: var(--surface);

    border:
        1px solid var(--border);

    box-shadow:
        0 16px 40px rgba(0, 0, 0, .20);

    transition:
        transform .3s ease,
        border-color .3s ease,
        box-shadow .3s ease;
}

.theme-card:hover {
    transform: translateY(-6px);

    border-color:
        rgba(53, 214, 228, .25);

    box-shadow:
        0 22px 50px rgba(0, 0, 0, .30);
}

.theme-card.active-theme {
    border-color: var(--accent);

    box-shadow:
        0 0 0 1px
        rgba(53, 214, 228, .22),
        0 20px 50px
        rgba(0, 0, 0, .30);
}


/* =========================================
   PREVIEW AREA
========================================= */

.theme-preview {
    height: 230px;

    position: relative;

    overflow: hidden;

    border-bottom:
        1px solid rgba(255, 255, 255, .07);
}


/* Fake dashboard pieces */

.preview-card {
    position: absolute;

    left: 9%;
    top: 25%;

    width: 62%;
    height: 54px;

    z-index: 5;

    border-radius: 13px;

    background:
        rgba(255, 255, 255, .11);

    border:
        1px solid
        rgba(255, 255, 255, .14);

    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, .15);
}

.preview-card::before {
    content: "";

    position: absolute;

    left: 13px;
    top: 13px;

    width: 45%;
    height: 7px;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, .35);
}

.preview-card::after {
    content: "";

    position: absolute;

    left: 13px;
    top: 29px;

    width: 70%;
    height: 5px;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, .13);
}

.preview-card.small {
    top: 57%;

    width: 42%;
    height: 43px;
}


/* =========================================
   ORBS
========================================= */

.preview-orb {
    position: absolute;

    border-radius: 50%;

    filter: blur(25px);

    opacity: .8;

    animation:
        previewFloat 6s
        ease-in-out infinite alternate;
}

@keyframes previewFloat {

    from {
        transform:
            translate3d(0, 0, 0)
            scale(1);
    }

    to {
        transform:
            translate3d(16px, -12px, 0)
            scale(1.12);
    }

}


/* =========================================
   DEFAULT HABITQUEST
========================================= */

.preview-default {
    background:
        linear-gradient(
            145deg,
            #051317,
            #0b2b32
        );
}

.preview-default .preview-glow {
    position: absolute;

    width: 190px;
    height: 190px;

    right: -50px;
    top: -60px;

    border-radius: 50%;

    background: #1bd4e3;

    filter: blur(55px);

    opacity: .25;
}

.preview-default .preview-card {
    border-color:
        rgba(77, 229, 239, .22);

    background:
        rgba(10, 60, 69, .62);
}


/* =========================================
   NEON COSMOS
========================================= */

.preview-cosmos {
    background:
        radial-gradient(
            circle at 80% 15%,
            rgba(34, 211, 238, .14),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #050510,
            #100b28
        );
}

.preview-cosmos::after {
    content: "";

    position: absolute;
    inset: 0;

    opacity: .35;

    background-image:
        radial-gradient(
            white 1px,
            transparent 1px
        );

    background-size:
        28px 28px;
}

.preview-cosmos .orb-one {
    width: 170px;
    height: 170px;

    left: -60px;
    bottom: -70px;

    background: #7c3aed;
}

.preview-cosmos .orb-two {
    width: 140px;
    height: 140px;

    right: -40px;
    top: -45px;

    background: #22d3ee;

    animation-delay: -2s;
}

.preview-cosmos .preview-card {
    background:
        rgba(86, 54, 180, .20);

    border-color:
        rgba(143, 112, 255, .38);

    box-shadow:
        0 0 25px
        rgba(124, 58, 237, .18);
}


/* =========================================
   EMERALD FOCUS
========================================= */

.preview-emerald {
    background:
        radial-gradient(
            circle at 80% 70%,
            rgba(16, 185, 129, .15),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #03110c,
            #08271c
        );
}

.preview-emerald .orb-one {
    width: 190px;
    height: 190px;

    right: -55px;
    bottom: -70px;

    background: #10b981;
}

.preview-emerald .preview-card {
    background:
        rgba(12, 83, 59, .28);

    border-color:
        rgba(52, 211, 153, .32);

    box-shadow:
        0 0 25px
        rgba(16, 185, 129, .13);
}


/* =========================================
   SUNSET PULSE
========================================= */

.preview-sunset {
    background:
        linear-gradient(
            145deg,
            #170911,
            #281020,
            #181027
        );
}

.preview-sunset .orb-one {
    width: 190px;
    height: 190px;

    left: -65px;
    bottom: -80px;

    background: #ff5c68;
}

.preview-sunset .orb-two {
    width: 170px;
    height: 170px;

    right: -55px;
    top: -60px;

    background: #9333ea;

    animation-delay: -2.5s;
}

.preview-sunset .preview-card {
    background:
        linear-gradient(
            135deg,
            rgba(255, 89, 106, .16),
            rgba(147, 51, 234, .14)
        );

    border-color:
        rgba(255, 130, 103, .30);

    box-shadow:
        0 0 30px
        rgba(255, 92, 104, .12);
}


/* =========================================
   LIQUID GLASS
========================================= */

.preview-glass {
    background:
        linear-gradient(
            135deg,
            #17233e,
            #3b2357,
            #0d6570
        );
}

.preview-glass .orb-one {
    width: 190px;
    height: 190px;

    left: -55px;
    top: -70px;

    background: #72d7ff;
}

.preview-glass .orb-two {
    width: 190px;
    height: 190px;

    right: -60px;
    bottom: -80px;

    background: #c084fc;

    animation-delay: -2s;
}

.preview-glass .glass-card {
    background:
        rgba(255, 255, 255, .11);

    border:
        1px solid
        rgba(255, 255, 255, .30);

    backdrop-filter:
        blur(18px);

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, .25),
        0 15px 35px
        rgba(0, 0, 0, .16);
}


/* =========================================
   CARD CONTENT
========================================= */

.theme-content {
    padding: 19px;
}

.theme-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 15px;
}

.theme-title h2 {
    font-size: 17px;
}

.theme-title p {
    margin-top: 6px;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.5;
}


/* =========================================
   BADGES
========================================= */

.free-badge,
.premium-badge {
    flex-shrink: 0;

    padding: 6px 8px;

    border-radius: 8px;

    font-size: 9px;
    font-weight: 800;
}

.free-badge {
    color: #73e9ba;

    background:
        rgba(52, 211, 153, .09);

    border:
        1px solid
        rgba(52, 211, 153, .16);
}

.premium-badge {
    color: #dbc7ff;

    background:
        rgba(139, 92, 246, .10);

    border:
        1px solid
        rgba(139, 92, 246, .20);
}


/* =========================================
   APPLY BUTTON
========================================= */

.apply-theme-btn {
    width: 100%;

    margin-top: 17px;

    padding: 11px 14px;

    border: 0;
    border-radius: 11px;

    color: #021114;

    background:
        linear-gradient(
            135deg,
            #4de5ef,
            #32bdca
        );

    font-size: 12px;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform .2s ease,
        filter .2s ease,
        opacity .2s ease;
}

.apply-theme-btn:hover {
    transform: translateY(-2px);

    filter: brightness(1.08);
}

.apply-theme-btn:active {
    transform: scale(.97);
}

.apply-theme-btn.active {
    color: #7ff4c9;

    background:
        rgba(52, 211, 153, .08);

    border:
        1px solid
        rgba(52, 211, 153, .18);

    cursor: default;
}


/* =========================================
   LOCKED PREMIUM CARD
========================================= */

.theme-card.locked
.apply-theme-btn {
    color: #b9c2c5;

    background:
        rgba(255, 255, 255, .055);

    border:
        1px solid
        rgba(255, 255, 255, .08);
}


/* =========================================
   PREMIUM NOTICE
========================================= */

.premium-notice {
    margin-top: 24px;

    padding: 23px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            rgba(124, 58, 237, .12),
            rgba(34, 211, 238, .06)
        );

    border:
        1px solid
        rgba(139, 92, 246, .20);
}

.premium-notice span {
    color: #c8b2ff;

    font-size: 10px;

    letter-spacing: 1.4px;
}

.premium-notice h2 {
    margin-top: 6px;

    font-size: 20px;
}

.premium-notice p {
    max-width: 650px;

    margin-top: 7px;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.6;
}

.premium-notice a {
    flex-shrink: 0;

    padding: 11px 15px;

    border-radius: 11px;

    background: white;

    color: #071417;

    font-size: 11px;
    font-weight: 800;

    transition:
        transform .2s ease;
}

.premium-notice a:hover {
    transform: translateY(-2px);
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 800px) {

    .theme-grid {
        grid-template-columns: 1fr;
    }

    .theme-preview {
        height: 200px;
    }

}

@media (max-width: 600px) {

    .topbar {
        padding: 0 16px;
    }

    .themes-page {
        width: 94%;

        padding-top: 28px;
    }

    .current-theme-card {
        align-items: flex-start;

        flex-direction: column;
    }

    .premium-notice {
        align-items: flex-start;

        flex-direction: column;
    }

    .premium-notice a {
        width: 100%;

        text-align: center;
    }

}

@media (max-width: 420px) {

    .theme-preview {
        height: 175px;
    }

    .theme-title {
        flex-direction: column;
    }

}