/* Scratch Regular Dates Game Styles - LovePlay.io Design System 2025 */
/* Emerald green theme variant */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Utility classes */
.hidden { display: none !important; }

/* CSS Variables - Design System */
:root {
    --background: #09090b;
    --foreground: #fafafa;
    --card: #18181b;
    --card-foreground: #fafafa;
    --secondary: #27272a;
    --secondary-foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --border: #27272a;
    --ring: #f43f5e;
    --rose: #f43f5e;
    --teal: #14b8a6;
    --orange: #f97316;
    --amber: #fbbf24;
    --gold: #10b981;
    --gold-light: #34d399;
    --gold-dark: #059669;
    --radius: 0.75rem;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--background);
    color: var(--foreground);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Dot pattern background */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.025;
    background-image: radial-gradient(circle, #ffffff 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 0;
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--rose), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================ */
/* GAME HEADER - Design System 2025 */
/* ============================================ */
.game-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9,9,11,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
}

.header-top {
    max-width: 540px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--secondary);
    color: var(--muted-foreground);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.back-link:hover {
    background: var(--card);
    color: var(--foreground);
}

.back-link svg {
    width: 20px;
    height: 20px;
}

.header-logo {
    font-size: 1.125rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--rose), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.score-num {
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.25);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--gold-light);
    font-variant-numeric: tabular-nums;
}
.score-rank {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose), var(--teal));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.avatar-btn:hover {
    transform: scale(1.1);
}

/* ===== CONTAINER ===== */
.container {
    max-width: 540px;
    margin: 0 auto;
    padding: 0 0.75rem 2rem;
    position: relative;
    z-index: 1;
}

/* ===== TITLE ===== */
.card-title {
    text-align: center;
    padding: 1.5rem 1rem 0.75rem;
}
.card-title h1 {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.3;
}
.card-title h1 .title-main {
    background: linear-gradient(135deg, #fff 0%, #6ee7b7 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.badge-18 {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--rose);
    margin-left: 0.25rem;
    vertical-align: super;
    -webkit-text-fill-color: var(--rose);
}
.card-title .sub {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.375rem;
    letter-spacing: 0.02em;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0.875rem;
    background: var(--card);
    border-radius: 12px;
    padding: 3px;
    border: 1px solid var(--border);
}
.tab {
    flex: 1;
    padding: 0.5rem 0.25rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    line-height: 1.3;
}
.tab.active {
    background: rgba(16,185,129,0.12);
    color: var(--gold-light);
}
.tab:not(.active):hover { background: rgba(255,255,255,0.04); color: var(--foreground); }
.tab .t-stars { display: block; font-size: 0.5625rem; margin-top: 2px; letter-spacing: 1px; }
.tab .t-count { display: block; font-size: 0.5625rem; opacity: 0.6; font-weight: 400; }

/* ===== LEVEL PANEL ===== */
.panel { display: none; }
.panel.active { display: block; }
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0 0.125rem;
}
.panel-name { font-size: 0.8125rem; font-weight: 700; }
.panel-name .stars { color: var(--gold); margin-left: 0.25rem; }
.panel-counter { font-size: 0.6875rem; color: var(--muted-foreground); }

/* ===== GRID ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 1.25rem;
}

/* ===== CIRCLE (in grid) ===== */
.circle {
    aspect-ratio: 1;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-user-select: none;
    user-select: none;
}
.circle:active { transform: scale(0.93); }

/* Unscratched state — emerald green coating */
.circle .coat {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(ellipse at 35% 30%, #34d399, #10b981 60%, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.75rem, 3vw, 1rem);
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.15), inset 0 -2px 4px rgba(0,0,0,0.2);
    animation: coatPulse 3s ease-in-out infinite;
}

/* Staggered wave delay — columns ripple left-to-right */
.circle:nth-child(5n+1) .coat { animation-delay: 0s; }
.circle:nth-child(5n+2) .coat { animation-delay: 0.3s; }
.circle:nth-child(5n+3) .coat { animation-delay: 0.6s; }
.circle:nth-child(5n+4) .coat { animation-delay: 0.9s; }
.circle:nth-child(5n+5) .coat { animation-delay: 1.2s; }

@keyframes coatPulse {
    0%, 100% {
        box-shadow: inset 0 2px 4px rgba(255,255,255,0.15), inset 0 -2px 4px rgba(0,0,0,0.2),
                    0 0 6px rgba(16,185,129,0.15);
    }
    50% {
        box-shadow: inset 0 2px 4px rgba(255,255,255,0.2), inset 0 -2px 4px rgba(0,0,0,0.2),
                    0 0 14px rgba(16,185,129,0.35), 0 0 28px rgba(16,185,129,0.12);
    }
}

/* Shimmer sweep on coat */
.circle .coat::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255,255,255,0.12) 45%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0.12) 55%,
        transparent 65%
    );
    background-size: 250% 100%;
    animation: coatShimmer 4.5s ease-in-out infinite;
    pointer-events: none;
}
.circle:nth-child(5n+2) .coat::after { animation-delay: 0.4s; }
.circle:nth-child(5n+3) .coat::after { animation-delay: 0.8s; }
.circle:nth-child(5n+4) .coat::after { animation-delay: 1.2s; }
.circle:nth-child(5n+5) .coat::after { animation-delay: 1.6s; }

@keyframes coatShimmer {
    0%, 100% { background-position: 200% center; }
    50% { background-position: -50% center; }
}

/* Revealed state */
.circle.done .coat { display: none; }
.circle.done {
    background: var(--card);
    border: 2px solid rgba(16,185,129,0.4);
    overflow: hidden;
    animation: popIn 0.35s ease;
}
.circle.done .p-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    z-index: 1;
}
.circle.done .pose-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 0;
}
.circle.done .p-content { display: none; }

/* Partial scratch */
.circle.partial .coat { display: none; }
.circle.partial {
    background: var(--card);
    overflow: hidden;
}
.circle.partial .pose-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 0;
    opacity: 0.5;
}
.circle.partial .p-content { display: none; }
.scratch-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0.4; }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

/* ===== RANK BAR ===== */
.rank-box {
    margin-top: 1.25rem;
    padding: 0.875rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.rank-title { font-size: 0.75rem; font-weight: 600; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.625rem; }
.rank-track { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; margin-bottom: 0.375rem; }
.rank-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); transition: width 0.5s ease; min-width: 2px; }
.rank-labels { display: flex; justify-content: space-between; font-size: 0.5rem; color: var(--muted-foreground); }
.rank-labels .cur { color: var(--gold-light); font-weight: 700; }

/* ===== RESET ===== */
.reset { text-align: center; margin-top: 1.5rem; }
.btn-reset {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted-foreground);
    font-family: inherit;
    font-size: 0.6875rem;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    cursor: pointer;
}
.btn-reset:hover { border-color: var(--rose); color: var(--rose); }

/* ==============================
   SCRATCH MODAL
   ============================== */
.scratch-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1.5rem;
}
.scratch-modal.open { display: flex; }

.sm-card {
    width: 100%;
    max-width: 340px;
    text-align: center;
    animation: smIn 0.3s ease;
}
@keyframes smIn { from { transform: scale(0.92) translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.sm-number {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
}

/* Big scratch ring */
.sm-ring-wrap {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto 1rem;
}
@media (min-width: 400px) {
    .sm-ring-wrap { width: 280px; height: 280px; }
}

/* Content behind the scratch */
.sm-behind {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--card);
    border: 3px solid var(--border);
    overflow: hidden;
    transition: border-color 0.4s, box-shadow 0.4s;
}
.sm-behind .sm-pose-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 0;
}
.sm-behind .sm-icon { width: 64px; height: 64px; position: relative; z-index: 1; display: none; }
.sm-behind .sm-icon svg { width: 100%; height: 100%; }
.sm-text-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    border-radius: 0 0 50% 50%;
    padding: 2.5rem 1rem 1.2rem;
    text-align: center;
}
.sm-behind .sm-label { font-size: 0.9375rem; font-weight: 700; position: relative; z-index: 1; text-shadow: 0 1px 6px rgba(0,0,0,0.9); line-height: 1.2; }
.sm-behind .sm-pts { font-size: 0.8125rem; color: var(--gold); font-weight: 600; position: relative; z-index: 1; text-shadow: 0 1px 6px rgba(0,0,0,0.9); margin-top: 0.15rem; }
.sm-details {
    display: none;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--foreground);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.625rem 2.5rem;
    border-radius: 10px;
    cursor: pointer;
    margin: 0.5rem auto 0;
    transition: all 0.15s;
}
.sm-details.visible { display: block; }
.sm-details:hover { background: rgba(255,255,255,0.1); }

.sm-behind.glow {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(16,185,129,0.25), 0 0 60px rgba(16,185,129,0.1);
}

/* Canvas on top */
.sm-ring-wrap canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    touch-action: none;
    z-index: 2;
    cursor: grab;
}
.sm-ring-wrap canvas:active { cursor: grabbing; }

/* Hint */
.sm-hint {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
    transition: opacity 0.3s;
}
.sm-hint.hidden { opacity: 0; }

/* Close btn */
.sm-close {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--foreground);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.625rem 2.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 0.5rem;
}
.sm-close:hover { background: rgba(255,255,255,0.1); }

/* Celebration particles */
.confetti-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
    border-radius: 50%;
}
.confetti-dot {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    animation: confettiFly 0.8s ease-out forwards;
    opacity: 0;
}
@keyframes confettiFly {
    0% { transform: translate(0, 0) scale(0); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(1); opacity: 0; }
}

/* ===== RESULT MODAL ===== */
.result-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 350;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.result-overlay.open { display: flex; }
.result-card {
    background: var(--card);
    border: 1px solid var(--gold);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 300px;
    width: 100%;
    text-align: center;
    animation: smIn 0.3s ease;
    box-shadow: 0 0 40px rgba(16,185,129,0.15);
}
.result-card .r-big-icon { width: 64px; height: 64px; margin: 0 auto 0.75rem; }
.result-card .r-big-icon svg { width: 100%; height: 100%; }
.result-card .r-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.25rem; }
.result-card .r-score { font-size: 1rem; color: var(--gold-light); font-weight: 700; margin-bottom: 1rem; }
.result-card .r-btn {
    background: linear-gradient(135deg, var(--gold), #047857);
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: filter 0.15s;
}
.result-card .r-btn:active { filter: brightness(0.9); transform: scale(0.98); }

/* ===== DESKTOP ===== */
@media (min-width: 768px) {
    .container { max-width: 720px; padding: 0 1.5rem 3rem; }
    .header-top { max-width: 720px; }
    .game-header { padding: 1rem 1.5rem; }

    /* Title */
    .card-title { padding: 2rem 1rem 1rem; }
    .card-title h1 { font-size: 1.75rem; }
    .badge-18 { font-size: 0.875rem; }
    .card-title .sub { font-size: 0.9375rem; margin-top: 0.5rem; }

    /* Header elements */
    .header-logo { font-size: 1.25rem; }
    .score-num { font-size: 0.9375rem; padding: 0.375rem 1rem; }
    .score-rank { font-size: 0.875rem; }
    .avatar-btn { width: 42px; height: 42px; font-size: 0.875rem; }
    .back-link { width: 42px; height: 42px; }
    .back-link svg { width: 22px; height: 22px; }

    /* Tabs */
    .tabs { margin-bottom: 1.25rem; padding: 4px; border-radius: 14px; }
    .tab { padding: 0.75rem 0.5rem; font-size: 0.875rem; border-radius: 12px; }
    .tab .t-stars { font-size: 0.75rem; margin-top: 3px; }
    .tab .t-count { font-size: 0.75rem; }

    /* Panel head */
    .panel-head { margin-bottom: 0.75rem; }
    .panel-name { font-size: 1rem; }
    .panel-counter { font-size: 0.875rem; }

    /* Grid */
    .grid { grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 1.5rem; }
    .circle .coat { font-size: 1.125rem; }
    /* 6-column wave on desktop */
    .circle:nth-child(6n+1) .coat { animation-delay: 0s; }
    .circle:nth-child(6n+2) .coat { animation-delay: 0.25s; }
    .circle:nth-child(6n+3) .coat { animation-delay: 0.5s; }
    .circle:nth-child(6n+4) .coat { animation-delay: 0.75s; }
    .circle:nth-child(6n+5) .coat { animation-delay: 1s; }
    .circle:nth-child(6n+6) .coat { animation-delay: 1.25s; }

    /* Rank */
    .rank-box { margin-top: 1.75rem; padding: 1.25rem; border-radius: 14px; }
    .rank-title { font-size: 0.875rem; margin-bottom: 0.75rem; }
    .rank-track { height: 8px; border-radius: 4px; margin-bottom: 0.5rem; }
    .rank-labels { font-size: 0.6875rem; }

    /* Reset */
    .reset { margin-top: 2rem; }
    .btn-reset { font-size: 0.8125rem; padding: 0.5rem 1.25rem; }

    /* Scratch modal */
    .sm-ring-wrap { width: 320px; height: 320px; }
    .sm-number { font-size: 0.9375rem; }
    .sm-close { font-size: 0.9375rem; padding: 0.75rem 3rem; }
    .sm-details { font-size: 0.9375rem; padding: 0.75rem 3rem; }
    .sm-hint { font-size: 0.875rem; }

    /* Result modal */
    .result-card { max-width: 360px; padding: 2rem; }
    .result-card .r-title { font-size: 1.25rem; }
    .result-card .r-score { font-size: 1.125rem; }

    /* Details modal */
    .dm-card { max-width: 400px; padding: 2rem 1.75rem; }
    .dm-pose-img { width: 200px; height: 200px; }
    .dm-name { font-size: 1.25rem; }
    .dm-pts { font-size: 1rem; }
    .dm-desc { font-size: 0.9375rem; }

    /* Welcome modal */
    .wm-card { max-width: 420px; padding: 2.5rem 2rem 2rem; }
    .wm-title { font-size: 1.5rem; }
    .wm-text { font-size: 0.9375rem; }
    .wm-step-text { font-size: 0.8125rem; }
    .wm-btn { font-size: 1rem; padding: 1rem; }

    /* Paywall modal */
    .pw-card { max-width: 420px; padding: 2.5rem 2rem 2rem; }
    .pw-title { font-size: 1.25rem; }
    .pw-text { font-size: 0.9375rem; }
    .pw-feature { font-size: 0.9375rem; }
    .pw-cta { font-size: 1rem; padding: 1rem; }
}

/* Large desktop */
@media (min-width: 1200px) {
    .container { max-width: 820px; }
    .header-top { max-width: 820px; }
    .card-title h1 { font-size: 2rem; }
    .card-title .sub { font-size: 1rem; }
    .grid { gap: 14px; }
    .circle .coat { font-size: 1.25rem; }
    .tab { font-size: 0.9375rem; }
    .panel-name { font-size: 1.0625rem; }
}

/* ===== DETAILS MODAL ===== */
.details-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.details-modal.open { display: flex; }

.dm-card {
    background: var(--card);
    border: 1px solid var(--gold);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    max-width: 340px;
    width: 100%;
    text-align: center;
    animation: smIn 0.3s ease;
    box-shadow: 0 0 40px rgba(16,185,129,0.12);
}
.dm-pose-img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--gold);
    margin: 0 auto 0.75rem;
    display: block;
    background: var(--background);
}
.dm-icon { width: 56px; height: 56px; margin: 0 auto 0.75rem; display: none; }
.dm-icon svg { width: 100%; height: 100%; }
.dm-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.dm-pts {
    font-size: 0.875rem;
    color: var(--gold-light);
    font-weight: 600;
    margin-bottom: 1rem;
}
.dm-desc {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--muted-foreground);
    text-align: left;
    margin-bottom: 1.25rem;
    padding: 0 0.25rem;
}
.dm-close {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--foreground);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.625rem 2.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}
.dm-close:hover { background: rgba(255,255,255,0.1); }

/* ===== WELCOME MODAL ===== */
.welcome-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.welcome-modal.open { display: flex; }
.wm-card {
    background: var(--card);
    border: 1px solid var(--gold);
    border-radius: 20px;
    padding: 2rem 1.5rem 1.75rem;
    max-width: 360px;
    width: 100%;
    text-align: center;
    animation: smIn 0.4s ease;
    box-shadow: 0 0 60px rgba(16,185,129,0.15);
}
.wm-emoji { font-size: 2.5rem; margin-bottom: 0.75rem; line-height: 1; }
.wm-title {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}
.wm-title span {
    background: linear-gradient(135deg, #fff, #6ee7b7, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.wm-age {
    font-size: 0.75rem;
    color: var(--rose);
    font-weight: 700;
    margin-bottom: 1rem;
}
.wm-text {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: left;
}
.wm-text b { color: var(--foreground); font-weight: 600; }
.wm-steps {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.wm-step {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    text-align: center;
}
.wm-step-icon { font-size: 1.25rem; margin-bottom: 0.25rem; }
.wm-step-text { font-size: 0.6875rem; color: var(--muted-foreground); line-height: 1.3; }
.wm-btn {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    background: linear-gradient(135deg, var(--gold), #047857);
    color: #fff;
}
.wm-btn:hover { filter: brightness(1.1); }
.wm-btn:active { transform: scale(0.98); }

/* ===== RESET CONFIRM MODAL ===== */
.reset-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.reset-modal.open { display: flex; }
.rm-card {
    background: var(--card);
    border: 1px solid var(--gold);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    max-width: 320px;
    width: 100%;
    text-align: center;
    animation: smIn 0.3s ease;
    box-shadow: 0 0 40px rgba(16,185,129,0.12);
}
.rm-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.rm-text {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}
.rm-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
.rm-btn {
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid var(--border);
}
.rm-cancel {
    background: rgba(255,255,255,0.06);
    color: var(--foreground);
}
.rm-cancel:hover { background: rgba(255,255,255,0.1); }
.rm-confirm {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}
.rm-confirm:hover { background: #b91c1c; }

/* ===== PAYWALL MODAL ===== */
.paywall-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 550;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.paywall-modal.open { display: flex; }
.pw-card {
    background: var(--card);
    border: 1px solid var(--gold);
    border-radius: 20px;
    padding: 2rem 1.5rem 1.75rem;
    max-width: 360px;
    width: 100%;
    text-align: center;
    animation: smIn 0.4s ease;
    box-shadow: 0 0 60px rgba(16,185,129,0.15);
}
.pw-star { font-size: 2.5rem; margin-bottom: 0.5rem; }
.pw-title {
    font-size: 1.125rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.pw-text {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    line-height: 1.5;
    margin-bottom: 1rem;
}
.pw-features {
    text-align: left;
    margin-bottom: 1.25rem;
}
.pw-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    font-size: 0.8125rem;
    color: var(--foreground);
}
.pw-feature .check {
    color: var(--teal);
    font-weight: 700;
}
.pw-cta {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--gold), #047857);
    color: #fff;
    transition: all 0.15s;
    margin-bottom: 0.5rem;
}
.pw-cta:hover { filter: brightness(1.1); }
.pw-cta:active { transform: scale(0.98); }
.pw-later {
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    font-family: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
}
.pw-later:hover { color: var(--foreground); }

/* ===== LOADING SCREENS ===== */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-screen .text-center { text-align: center; }
.loading-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.loading-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rose);
    animation: bounce 1.4s infinite ease-in-out both;
}
.loading-dots .dot:nth-child(1) { animation-delay: 0s; }
.loading-dots .dot:nth-child(2) { animation-delay: 0.1s; }
.loading-dots .dot:nth-child(3) { animation-delay: 0.2s; }
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
.loading-screen .msg {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-top: 1rem;
}
