/* ── Тренажёр Позитивного Мышления — стили ─────── */

:root {
    --primary: #FF6B6B;
    --primary-dark: #E84545;
    --gold: #F9CA24;
    --success: #6AB04C;
    --bg-start: #FFF9F0;
    --bg-end: #FFE8D6;
    --card: #FFFFFF;
    --text: #2D3436;
    --text-muted: #8395A7;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 32px;
}

/* ── Screens ──────────────────────────────── */
.screen {
    display: none;
}
.screen.active {
    display: block;
}

/* ── Animations ───────────────────────────── */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 107, 107, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.6); }
}
@keyframes countUp {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-40px); opacity: 0; }
}

/* ── Loading ──────────────────────────────── */
.center-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 16px;
}
.loader {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-end);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.text-muted {
    color: var(--text-muted);
    font-size: 14px;
}

/* ── Welcome ──────────────────────────────── */
.welcome-card {
    text-align: center;
    padding: 32px 20px;
}
.welcome-emoji {
    font-size: 64px;
    margin-bottom: 16px;
}
.welcome-card h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}
.welcome-sub {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}
.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.welcome-feat {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 15px;
    box-shadow: var(--shadow);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}
.welcome-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

/* ── Buttons ──────────────────────────────── */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}
.btn:active {
    transform: scale(0.97);
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius);
}
.btn-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 8px;
}

/* ── Dashboard ────────────────────────────── */
.dash-header {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    text-align: center;
}
.dash-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.dash-day {
    font-size: 22px;
    font-weight: 700;
}
.dash-of {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 400;
}
.dash-streak {
    font-size: 20px;
    font-weight: 600;
}
.dash-level {
    margin-bottom: 10px;
}
.level-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFF3CD, #FFE69C);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}
.xp-bar {
    width: 100%;
    height: 8px;
    background: #F0F0F0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}
.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #F0932B);
    border-radius: 4px;
    transition: width 0.8s ease;
    width: 0%;
}
.xp-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.phase-badge {
    display: inline-block;
    background: linear-gradient(135deg, #E8F8F5, #D1F2EB);
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #1E8449;
}
.graduated-badge {
    background: linear-gradient(135deg, #F9CA24, #F0932B);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-bottom: 16px;
}

/* ── Practice Cards ───────────────────────── */
.practices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.practice-card {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.practice-card:active {
    transform: scale(0.98);
}
.practice-card.done {
    opacity: 0.6;
    border-color: var(--success);
}
.practice-card.available {
    border-color: rgba(255, 107, 107, 0.2);
    animation: glow 2s infinite;
}
.pc-icon {
    font-size: 32px;
    flex-shrink: 0;
}
.pc-info {
    flex: 1;
}
.pc-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}
.pc-desc {
    font-size: 12px;
    color: var(--text-muted);
}
.pc-status {
    font-size: 20px;
    flex-shrink: 0;
}
.pc-status.done {
    color: var(--success);
}

/* ── All Done ─────────────────────────────── */
.all-done {
    text-align: center;
    padding: 32px 16px;
    margin-top: 16px;
}
.all-done-emoji {
    font-size: 56px;
    margin-bottom: 16px;
    animation: pulse 1.5s infinite;
}
.all-done-text {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.all-done-sub {
    font-size: 14px;
    color: var(--text-muted);
}

/* ── Screen Content ───────────────────────── */
.screen-content {
    padding: 4px 0;
}
.practice-header {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}
.practice-sub {
    font-size: 15px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ── Cards ────────────────────────────────── */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

/* ── Morning ──────────────────────────────── */
.affirmation-card {
    text-align: center;
    background: linear-gradient(135deg, #FFEAA7, #FDCB6E);
    border: none;
}
.affirmation-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #B7950B;
    margin-bottom: 12px;
    font-weight: 600;
}
.affirmation-text {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    color: #7D6608;
}
.tip-card {
    background: linear-gradient(135deg, #E8F8F5, #D5F5E3);
    border: none;
}
.tip-label {
    font-size: 13px;
    font-weight: 600;
    color: #1E8449;
    margin-bottom: 8px;
}
.tip-text {
    font-size: 14px;
    line-height: 1.6;
    color: #1E6F3F;
}

/* ── Challenge ────────────────────────────── */
.scenario-card {
    background: linear-gradient(135deg, #EBF5FB, #D6EAF8);
    border: none;
}
.scenario-text {
    font-size: 16px;
    line-height: 1.6;
    color: #1B4F72;
}
.option-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 16px;
    background: var(--card);
    border: 2px solid #E8E8E8;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.2s;
}
.option-btn:hover {
    border-color: var(--primary);
    background: #FFF5F5;
}
.option-btn:active {
    transform: scale(0.98);
}
.option-btn.selected-best {
    border-color: var(--success);
    background: #E8F8E8;
}
.option-btn.selected-mid {
    border-color: var(--gold);
    background: #FFF8E1;
}
.option-btn.selected-low {
    border-color: var(--primary);
    background: #FFF0F0;
}
.feedback-card {
    text-align: center;
}
.feedback-xp {
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 12px;
}
.feedback-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
}

/* ── Gratitude ────────────────────────────── */
.gratitude-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.gratitude-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.g-num {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.gratitude-row input {
    flex: 1;
    padding: 14px;
    border: 2px solid #E8E8E8;
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background: var(--card);
}
.gratitude-row input:focus {
    border-color: var(--primary);
}

/* ── Evening ──────────────────────────────── */
.rating-row {
    text-align: center;
    margin-bottom: 20px;
}
.rating-label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.rating-faces {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.face {
    font-size: 32px;
    background: var(--card);
    border: 3px solid #E8E8E8;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.face:hover,
.face.selected {
    border-color: var(--gold);
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(249, 202, 36, 0.4);
}
textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #E8E8E8;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    margin-bottom: 16px;
    transition: border-color 0.2s;
    background: var(--card);
}
textarea:focus {
    border-color: var(--primary);
}

/* ── XP Popup ─────────────────────────────── */
.xp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--gold);
    color: #7D6608;
    font-size: 24px;
    font-weight: 800;
    padding: 12px 28px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(249, 202, 36, 0.5);
    pointer-events: none;
    opacity: 0;
    z-index: 100;
    transition: none;
}
.xp-popup.show {
    animation: xpPop 1.2s ease-out forwards;
}
@keyframes xpPop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    40% { transform: translate(-50%, -50%) scale(1); }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -70%) scale(0.8); }
}

/* ── Level Up Overlay ─────────────────────── */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.3s;
}
.levelup-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px 32px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 320px;
    width: 90%;
}
.levelup-emoji {
    font-size: 64px;
    margin-bottom: 16px;
    animation: pulse 1s infinite;
}
.levelup-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.levelup-name {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), #F0932B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
}
:root {
    /* ═══ Celestial Sky Theme ═══ */
    --bg: #04081a;
    --bg-warm: #08112a;
    --glass: rgba(190, 160, 80, 0.07);
    --glass-border: rgba(210, 175, 70, 0.16);
    --glass-hover: rgba(210, 175, 70, 0.13);
    --glass-strong: rgba(190, 160, 80, 0.10);
    --text: #f0e8d0;
    --text-secondary: rgba(238, 222, 178, 0.58);
    --accent: #c4880c;
    --accent-light: #e8ae2e;
    --accent-glow: rgba(210, 158, 30, 0.42);
    --accent-gradient: linear-gradient(135deg, #a87010, #d4a020, #f0c840);
    --green: #52c082;
    --green-bg: rgba(82, 192, 130, 0.10);
    --red: #e05252;
    --red-bg: rgba(224, 82, 82, 0.10);
    --orange: #d07828;
    --blue: #3a6cc0;
    --gold: #f0c535;
    --radius: 20px;
    --radius-sm: 14px;
    --radius-xs: 10px;
    --blur: 28px;
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.70);
    --shadow-glow: 0 4px 28px rgba(200, 150, 25, 0.22);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 100% 60% at 50% -5%, #101f48 0%, transparent 55%),
        radial-gradient(ellipse at 50% 0%, #04081a 40%, #020610 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 90px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        /* Divine golden light — центральный источник */
        radial-gradient(ellipse 75% 55% at 58% 4%, rgba(230, 170, 35, 0.28) 0%, rgba(200, 130, 15, 0.12) 28%, transparent 58%),
        /* Golden corona вокруг источника */
        radial-gradient(ellipse 45% 35% at 64% 7%, rgba(255, 220, 75, 0.20) 0%, rgba(220, 160, 25, 0.06) 38%, transparent 62%),
        /* Тёмные тучи слева сверху */
        radial-gradient(ellipse 65% 45% at 8% 20%, rgba(12, 35, 110, 0.45) 0%, transparent 55%),
        /* Тёмные тучи справа */
        radial-gradient(ellipse 55% 40% at 92% 35%, rgba(10, 30, 100, 0.40) 0%, transparent 50%),
        /* Нижний атмосферный слой */
        radial-gradient(ellipse 90% 50% at 40% 85%, rgba(8, 20, 65, 0.25) 0%, transparent 55%),
        /* Глубина слева снизу */
        radial-gradient(ellipse at 0% 80%, rgba(6, 18, 60, 0.30) 0%, transparent 40%),
        /* Правая нижняя туча */
        radial-gradient(ellipse at 100% 90%, rgba(8, 22, 70, 0.25) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: -8%;
    left: -20%;
    width: 140%;
    height: 85%;
    /* Лучи света (кrepuscular rays) из источника */
    background: conic-gradient(
        from 245deg at 75% 0%,
        transparent 0deg,
        rgba(230, 172, 38, 0.045) 3.5deg,
        transparent 7deg,
        transparent 15deg,
        rgba(230, 172, 38, 0.035) 18.5deg,
        transparent 22deg,
        transparent 30deg,
        rgba(230, 172, 38, 0.055) 33.5deg,
        transparent 37deg,
        transparent 46deg,
        rgba(230, 172, 38, 0.040) 50deg,
        transparent 54deg,
        transparent 62deg,
        rgba(230, 172, 38, 0.030) 65.5deg,
        transparent 69deg,
        transparent 78deg,
        rgba(230, 172, 38, 0.045) 82deg,
        transparent 86deg,
        transparent 95deg,
        rgba(230, 172, 38, 0.030) 99deg,
        transparent 103deg,
        transparent 112deg,
        rgba(230, 172, 38, 0.040) 116deg,
        transparent 120deg
    );
    pointer-events: none;
    z-index: 0;
    filter: blur(5px);
}

#app {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Header ── */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 16px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(190, 148, 30, 0.15), rgba(20, 50, 130, 0.20));
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(210, 175, 70, 0.20);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-glow);
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

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

.streak-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(235, 112, 112, 0.2);
    padding: 6px 14px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 15px;
}

.streak-fire { font-size: 16px; }

.points-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(232, 195, 106, 0.25);
    padding: 6px 14px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 15px;
}

.points-icon { font-size: 14px; }

/* ── Tabs ── */
.tabs {
    display: flex;
    gap: 3px;
    background: rgba(8, 14, 35, 0.88);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(210, 175, 70, 0.16);
    border-radius: var(--radius);
    padding: 5px;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(230, 185, 50, 0.08) inset;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
    flex: 1;
    min-width: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 4px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.tab.active {
    background: linear-gradient(135deg, #a87010, #d4a020, #f0c840);
    color: #fff;
    box-shadow: 0 4px 20px rgba(200, 150, 25, 0.45);
}

.tab-icon { font-size: 18px; }
.tab-label { font-size: 10px; font-weight: 600; }

/* ── Tab content ── */
.tab-content {
    display: none;
    animation: fadeUp 0.4s ease;
}

.tab-content.active { display: block; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeUp 0.5s ease; }

/* ── Section title ── */
.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

/* ── Daily affirmation card ── */
.daily-card {
    background: linear-gradient(145deg, rgba(190, 148, 30, 0.10), rgba(15, 40, 110, 0.18));
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(210, 175, 70, 0.18);
    border-radius: var(--radius);
    padding: 28px 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(230, 190, 60, 0.12);
}

.daily-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(230, 175, 40, 0.18) 0%, transparent 70%);
    border-radius: 50%;
}

.daily-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(58, 108, 192, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.daily-card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-light);
    margin-bottom: 14px;
}

.daily-card-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.55;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

/* ── Cards grid ── */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.action-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 22px 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.action-card:active {
    transform: scale(0.96);
    background: var(--glass-hover);
}

.action-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.card-morning::after { background: linear-gradient(90deg, #f0a060, #e8c36a); }
.card-scenario::after { background: linear-gradient(90deg, #d4915c, #e8b48a); }
.card-technique::after { background: linear-gradient(90deg, #7eb8da, #a8d8ea); }
.card-challenge::after { background: linear-gradient(90deg, #6fcf97, #88e0a5); }

.action-icon { font-size: 28px; margin-bottom: 12px; }
.action-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.action-desc { font-size: 12px; color: var(--text-secondary); }

/* ── Tip card ── */
.tip-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.tip-icon { font-size: 24px; flex-shrink: 0; }
.tip-text { font-size: 14px; line-height: 1.55; color: var(--text-secondary); }

/* ── Evening card ── */
.evening-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius);
    padding: 18px 22px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.evening-card:active { transform: scale(0.98); }

.evening-left { display: flex; align-items: center; gap: 14px; }
.evening-icon { font-size: 28px; }
.evening-title { font-size: 15px; font-weight: 600; }
.evening-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.evening-arrow { font-size: 20px; color: var(--accent-light); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn:active { transform: scale(0.96); }

.btn-primary {
    background: linear-gradient(135deg, #a87010, #d4a020, #f0c840);
    color: #fff;
    box-shadow: 0 4px 22px rgba(200, 150, 25, 0.42);
}

.btn-glass {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    color: var(--text);
}

.btn-block { width: 100%; }

/* ── Trainer ── */
.scenario-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.scenario-badge {
    background: linear-gradient(135deg, #a87010, #d4a020, #f0c840);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 16px;
    border-radius: 24px;
    box-shadow: 0 2px 14px rgba(200, 150, 25, 0.42);
}

.scenario-number {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.scenario-text {
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
    box-shadow: var(--shadow);
}

.responses {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.response-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
}

.response-card:active { transform: scale(0.98); }

.response-toxic {
    background: var(--red-bg);
    border-color: rgba(235, 112, 112, 0.15);
}

.response-calm {
    background: var(--green-bg);
    border-color: rgba(111, 207, 151, 0.15);
}

.response-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.response-toxic .response-marker { background: var(--red); color: #1a1008; }
.response-calm .response-marker { background: var(--green); color: #1a1008; }
.response-text { font-size: 14px; line-height: 1.55; }

.response-card.selected {
    border-color: rgba(255, 200, 140, 0.4);
    transform: scale(1.02);
}

.response-card.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.explanation-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeUp 0.4s ease;
    box-shadow: var(--shadow);
}

.explanation-icon { font-size: 40px; margin-bottom: 10px; }
.explanation-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.explanation-text { font-size: 14px; line-height: 1.65; color: var(--text-secondary); }

.trainer-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 20px;
    padding: 18px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-item { text-align: center; }
.stat-value { font-size: 24px; font-weight: 800; }
.stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Techniques ── */
.techniques-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.technique-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.technique-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    cursor: pointer;
}

.technique-name { font-size: 15px; font-weight: 600; }

.technique-arrow {
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.technique-card.open .technique-arrow { transform: rotate(180deg); }

.technique-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.technique-body-inner {
    padding: 0 20px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-line;
}

.technique-card.open .technique-body { max-height: 500px; }

/* ── Tips carousel ── */
.tips-carousel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip-mini {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
    box-shadow: var(--shadow);
}

/* ── Progress ── */
.progress-hero {
    display: flex;
    justify-content: center;
    padding: 24px 0;
}

.progress-circle {
    position: relative;
    width: 150px;
    height: 150px;
}

.progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: rgba(255, 200, 140, 0.08);
    stroke-width: 8;
}

.progress-fill {
    fill: none;
    stroke: url(#goldGrad) var(--accent);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
    stroke: var(--gold);
    filter: drop-shadow(0 0 4px rgba(240, 197, 53, 0.5));
}

.progress-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-level { font-size: 32px; }
.progress-level-name { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-top: 4px; }

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 22px 16px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card-icon { font-size: 24px; margin-bottom: 8px; }
.stat-card-value { font-size: 28px; font-weight: 800; }
.stat-card-label { font-size: 11px; color: var(--text-secondary); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.stat-card-accent {
    background: linear-gradient(135deg, rgba(232, 195, 106, 0.12), rgba(212, 145, 92, 0.08));
    border-color: rgba(232, 195, 106, 0.2);
}

.stat-card-accent .stat-card-value { color: var(--gold); }

.motivation-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
    box-shadow: var(--shadow);
}

.motivation-text { font-size: 15px; line-height: 1.65; font-weight: 500; }

/* ── Points info card ── */
.points-info-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.points-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 200, 140, 0.06);
}

.points-row:last-child { border-bottom: none; }
.points-val { font-weight: 700; color: var(--gold); }

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2, 5, 18, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeBg 0.3s ease;
}

.modal-overlay.hidden { display: none; }

@keyframes fadeBg {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: #080f22;
    border: 1px solid rgba(210, 175, 70, 0.18);
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 28px 24px;
    box-shadow: 0 -8px 50px rgba(0, 0, 0, 0.65), 0 -2px 20px rgba(200, 150, 25, 0.08);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-icon { font-size: 28px; }
.modal-title { flex: 1; font-size: 18px; font-weight: 700; }

.modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
    white-space: pre-line;
}

.modal-actions { padding-bottom: 16px; }

/* ── Rating tab ── */
.rating-toggle {
    display: flex;
    gap: 4px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 16px;
}

.rating-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: var(--transition);
}

.rating-btn.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 2px 12px var(--accent-glow);
}

.my-rank-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(212, 145, 92, 0.2);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.my-rank-pos { font-size: 20px; font-weight: 800; color: var(--accent-light); min-width: 40px; }
.my-rank-info { flex: 1; }
.my-rank-name { font-size: 15px; font-weight: 600; }
.my-rank-pts { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.my-rank-badge { font-size: 28px; }

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.lb-row.me {
    border-color: rgba(212, 145, 92, 0.3);
    background: rgba(212, 145, 92, 0.08);
}

.lb-row.top-1 {
    background: linear-gradient(135deg, rgba(232, 195, 106, 0.12), rgba(212, 145, 92, 0.06));
    border-color: rgba(232, 195, 106, 0.25);
}

.lb-row.top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.08), rgba(169, 169, 169, 0.04));
    border-color: rgba(192, 192, 192, 0.15);
}

.lb-row.top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.08), rgba(180, 83, 9, 0.04));
    border-color: rgba(205, 127, 50, 0.15);
}

.lb-pos { font-size: 14px; font-weight: 800; min-width: 28px; text-align: center; }
.lb-pos-medal { font-size: 20px; min-width: 28px; text-align: center; }
.lb-info { flex: 1; }
.lb-name { font-size: 14px; font-weight: 600; }
.lb-meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.lb-pts { font-size: 15px; font-weight: 700; color: var(--gold); }
.lb-rank { font-size: 20px; }

.leaderboard-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.online-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.online-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(111, 207, 151, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Referral / Team tab ── */
.ref-stats-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(212, 145, 92, 0.2);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.ref-stats-header { display: flex; align-items: center; gap: 14px; }
.ref-stats-icon { font-size: 36px; }
.ref-stats-title { font-size: 13px; color: var(--text-secondary); margin-bottom: 2px; }
.ref-stats-value { font-size: 28px; font-weight: 800; color: var(--gold); }

.ref-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.ref-stat-mini {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 6px;
    text-align: center;
    box-shadow: var(--shadow);
}

.ref-stat-num { font-size: 20px; font-weight: 800; color: var(--text); }
.ref-stat-lbl { font-size: 10px; color: var(--text-secondary); margin-top: 2px; }

.ref-referrer-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(111, 207, 151, 0.15);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: 14px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.ref-referrer-card strong { color: var(--green); }

.ref-invite-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.ref-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    margin-top: 12px;
}

.ref-link-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xs);
    padding: 12px 14px;
    font-size: 12px;
    color: var(--text);
    font-family: monospace;
    outline: none;
}

.ref-copy-btn {
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-xs);
    padding: 12px 16px;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 12px var(--accent-glow);
}

.ref-copy-btn:active { transform: scale(0.95); }

.ref-levels { margin-bottom: 20px; }

.ref-level {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.ref-level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    transition: var(--transition);
}

.ref-level-header:hover { background: var(--glass-hover); }
.ref-level-title { font-weight: 700; font-size: 14px; }
.ref-level-count { font-size: 13px; color: var(--accent-light); font-weight: 600; }
.ref-level-bonus { font-size: 11px; color: var(--text-secondary); }

.ref-level-members { display: none; padding: 0 18px 14px; }
.ref-level.open .ref-level-members { display: block; }

.ref-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 200, 140, 0.06);
    font-size: 13px;
}

.ref-member:last-child { border-bottom: none; }
.ref-member-name { color: var(--text); }
.ref-member-pts { color: var(--gold); font-weight: 600; }

.ref-level-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 24px;
    font-size: 14px;
}

.ref-info-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.ref-info-row {
    padding: 9px 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 200, 140, 0.06);
}

.ref-info-row:last-child { border-bottom: none; }

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

/* ── Responsive ── */
@media (max-width: 360px) {
    .header-title { font-size: 16px; }
    .daily-card-text { font-size: 16px; }
    .cards-grid { gap: 8px; }
    .action-card { padding: 18px 12px; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(210, 175, 70, 0.18); border-radius: 4px; }

/* ══════════════════════════════════════════════ */
/* ── Celestial Sparkles (Golden Stars) ── */
/* ══════════════════════════════════════════════ */

.stars-layer {
    position: fixed;
    top: 0; left: 0;
    width: 2px; height: 2px;
    background: transparent;
    pointer-events: none;
    z-index: 0;
    box-shadow:
        /* Bright golden core sparks */
        128px 62px 2px 1px rgba(250, 210, 60, 0.80),
        340px 38px 2px 1px rgba(240, 195, 45, 0.70),
        218px 108px 1px 1px rgba(255, 225, 85, 0.60),
        78px 175px 1px 1px rgba(235, 185, 35, 0.65),
        385px 142px 2px 1px rgba(248, 208, 58, 0.55),
        475px 68px 1px 1px rgba(230, 175, 40, 0.65),
        52px 290px 1px 1px rgba(245, 215, 68, 0.45),
        295px 230px 2px 1px rgba(252, 215, 62, 0.55),
        160px 330px 1px 1px rgba(240, 200, 52, 0.40),
        410px 280px 1px 1px rgba(232, 188, 42, 0.45),
        /* Faint distant sparkles */
        190px 55px 1px 0px rgba(255, 230, 100, 0.50),
        265px 185px 1px 0px rgba(240, 200, 65, 0.40),
        430px 195px 1px 0px rgba(228, 180, 38, 0.45),
        95px 390px 1px 0px rgba(244, 210, 60, 0.35),
        350px 360px 1px 0px rgba(235, 195, 48, 0.38);
    animation: sparkleGlow 2.8s ease-in-out infinite alternate;
}

.stars-layer-2 {
    position: fixed;
    top: 0; left: 0;
    width: 2px; height: 2px;
    background: transparent;
    pointer-events: none;
    z-index: 0;
    box-shadow:
        205px 92px 2px 1px rgba(248, 208, 55, 0.60),
        310px 148px 1px 1px rgba(238, 192, 40, 0.50),
        460px 122px 2px 1px rgba(252, 218, 70, 0.55),
        140px 248px 1px 1px rgba(232, 184, 38, 0.48),
        380px 322px 1px 1px rgba(244, 204, 58, 0.42),
        30px 142px 2px 1px rgba(248, 214, 65, 0.52),
        258px 312px 1px 0px rgba(235, 190, 44, 0.38),
        435px 378px 1px 0px rgba(240, 202, 54, 0.35);
    animation: sparkleGlow 3.5s ease-in-out 1.4s infinite alternate;
}

@keyframes sparkleGlow {
    0%   { opacity: 0.45; transform: scale(0.92); }
    40%  { opacity: 0.85; transform: scale(1.04); }
    70%  { opacity: 0.65; transform: scale(0.98); }
    100% { opacity: 1.00; transform: scale(1.08); }
}

/* ── Top Divine Glow Bar ── */
.divine-glow {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(190, 140, 20, 0.5) 20%,
        rgba(240, 200, 55, 0.90) 45%,
        rgba(255, 220, 80, 1.00) 55%,
        rgba(220, 165, 35, 0.80) 70%,
        rgba(150, 100, 10, 0.4) 85%,
        transparent 100%
    );
    z-index: 500;
    pointer-events: none;
    box-shadow: 0 0 18px rgba(240, 197, 53, 0.60), 0 0 40px rgba(200, 155, 25, 0.30);
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.80; }
    50%       { opacity: 1.00; box-shadow: 0 0 28px rgba(240, 197, 53, 0.80), 0 0 55px rgba(200, 155, 25, 0.45); }
}

/* ── Points popup ── */
.points-popup {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 200;
    pointer-events: none;
}

.points-popup.hidden { display: none; }

.points-popup-text {
    display: inline-block;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    padding: 8px 18px;
    border-radius: 24px;
    animation: popFloat 1.2s ease forwards;
    box-shadow: 0 4px 24px var(--accent-glow);
}

@keyframes popFloat {
    0% { opacity: 0; transform: translateY(10px) scale(0.8); }
    20% { opacity: 1; transform: translateY(0) scale(1.1); }
    40% { transform: translateY(-5px) scale(1); }
    100% { opacity: 0; transform: translateY(-40px) scale(0.8); }
}

/* ── Name prompt ── */
.name-prompt {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2, 5, 18, 0.90);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.name-prompt.hidden { display: none; }

.name-prompt-card {
    background: #080f22;
    border: 1px solid rgba(210, 175, 70, 0.18);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    max-width: 340px;
    width: 100%;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.70), 0 0 40px rgba(200, 150, 25, 0.08);
}

.name-prompt-icon { font-size: 48px; margin-bottom: 16px; }
.name-prompt-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.name-prompt-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }

.name-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(255, 200, 140, 0.15);
    border-radius: var(--radius-sm);
    background: var(--glass);
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    text-align: center;
    outline: none;
    margin-bottom: 18px;
    transition: var(--transition);
}

.name-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ─── Binary Tree User View ─── */

.binary-balance-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(111, 207, 151, 0.15);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.binary-balance-icon { font-size: 36px; }
.binary-balance-label { font-size: 13px; color: var(--text-secondary); }
.binary-balance-value { font-size: 28px; font-weight: 800; color: var(--green); }

.binary-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.binary-stat-item {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
}

.binary-stat-num { font-size: 22px; font-weight: 800; }
.binary-stat-lbl { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.binary-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xs);
    margin-bottom: 8px;
    font-size: 13px;
    box-shadow: var(--shadow);
}

.binary-info-row span { color: var(--text-secondary); }
.binary-info-row strong { color: var(--text); }

.binary-tree-user {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 18px 10px;
    overflow-x: auto;
    min-height: 200px;
    box-shadow: var(--shadow);
}

/* CSS Binary tree (user view) */
.bin-tree ul {
    padding-top: 16px;
    position: relative;
    display: flex;
    justify-content: center;
    list-style: none;
}

.bin-tree li {
    text-align: center;
    list-style: none;
    position: relative;
    padding: 16px 4px 0 4px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.bin-tree li::before, .bin-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid rgba(210, 175, 70, 0.18);
    width: 50%;
    height: 16px;
}

.bin-tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid rgba(210, 175, 70, 0.18);
}

.bin-tree li::before {
    border-right: 2px solid rgba(210, 175, 70, 0.18);
}

.bin-tree li:only-child::before, .bin-tree li:only-child::after { display: none; }
.bin-tree li:first-child::before { border: none; }
.bin-tree li:last-child::after { border: none; }
.bin-tree li:first-child::after { border-radius: 5px 0 0 0; }
.bin-tree li:last-child::before { border-radius: 0 5px 0 0; }

.bin-tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid rgba(210, 175, 70, 0.18);
    width: 0;
    height: 16px;
}

.bin-node {
    display: inline-block;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xs);
    padding: 8px 12px;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    min-width: 70px;
    text-align: center;
    box-shadow: var(--shadow);
}

.bin-node.me {
    border-color: var(--accent);
    background: rgba(212, 145, 92, 0.12);
    box-shadow: 0 0 16px var(--accent-glow);
}

.bin-node.empty {
    border: 2px dashed rgba(255, 200, 140, 0.1);
    background: transparent;
    min-width: 60px;
    padding: 6px 10px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.bin-node-name { font-size: 10px; font-weight: 700; white-space: nowrap; }
.bin-node-bal { font-size: 9px; color: var(--green); font-weight: 600; }
.bin-node-pairs { font-size: 8px; color: var(--orange); }

/* Direction toggle */
.binary-direction-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.binary-direction-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
}

.binary-direction-toggle {
    display: flex;
    gap: 8px;
}

.direction-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.direction-btn.active {
    border-color: var(--accent);
    background: rgba(212, 145, 92, 0.12);
    color: var(--text);
    box-shadow: 0 0 16px var(--accent-glow);
}

.direction-btn:active { transform: scale(0.97); }

/* ── Telegram theme integration ── */
body.tg-theme {
    --bg: var(--tg-theme-bg-color, #1a1008);
    --text: var(--tg-theme-text-color, #f5ece3);
}

/* ══════════════════════════════════════════════ */
/* ────────── GAME: Путь Добра ────────── */
/* ══════════════════════════════════════════════ */

/* ── Pet Card ── */
.game-pet-card {
    background: linear-gradient(145deg, rgba(190, 148, 30, 0.14), rgba(20, 50, 130, 0.18), rgba(10, 30, 90, 0.12));
    border: 1px solid rgba(220, 178, 50, 0.22);
    border-radius: var(--radius);
    padding: 28px 22px 22px;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow), 0 0 50px rgba(210, 155, 25, 0.10);
}

.game-pet-card::before {
    content: '';
    position: absolute;
    top: -70px; right: -70px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(240, 200, 55, 0.14) 0%, transparent 65%);
    border-radius: 50%;
}

.game-pet-aura {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px; height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 197, 53, 0.20) 0%, rgba(180, 130, 20, 0.08) 50%, transparent 70%);
    box-shadow: 0 0 30px rgba(220, 172, 35, 0.25), 0 0 60px rgba(170, 120, 15, 0.12);
    margin-bottom: 12px;
    animation: petFloat 3s ease-in-out infinite;
}

@keyframes petFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.game-pet-emoji { font-size: 52px; }

.game-pet-info { margin-bottom: 10px; }
.game-pet-name { font-size: 18px; font-weight: 800; }
.game-pet-stage { font-size: 12px; color: var(--accent-light); font-weight: 600; margin-top: 2px; }

.game-pet-speech {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
    font-style: italic;
    padding: 10px 16px;
    background: var(--glass);
    border-radius: var(--radius-sm);
    margin: 12px 0;
    position: relative;
}

.game-pet-progress { margin-top: 8px; }

.game-pet-bar {
    height: 8px;
    background: rgba(255, 200, 140, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.game-pet-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #a87010, #d4a020, #f0c840);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(220, 172, 35, 0.50);
}

.game-pet-next {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ── Game Stats Row ── */
.game-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.game-stat-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.game-stat-icon { font-size: 22px; margin-bottom: 4px; }
.game-stat-value { font-size: 24px; font-weight: 800; }
.game-stat-label { font-size: 10px; color: var(--text-secondary); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

.game-karma-card { border-color: rgba(232, 195, 106, 0.2); }
.game-karma-card .game-stat-value { color: var(--gold); }
.game-streak-card .game-stat-value { color: var(--orange); }

/* ── Principles Grid ── */
.principles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.principle-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.principle-card-wide {
    grid-column: 1 / -1;
}

.principle-icon { font-size: 24px; margin-bottom: 4px; }
.principle-name { font-size: 11px; font-weight: 700; margin-bottom: 6px; }

.principle-bar {
    height: 6px;
    background: rgba(255, 200, 140, 0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.principle-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
    width: 0%;
}

[data-p="protection"] .principle-fill { background: linear-gradient(90deg, #7eb8da, #5a9fcf); }
[data-p="justice"] .principle-fill { background: linear-gradient(90deg, #e8c36a, #d4a830); }
[data-p="opportunities"] .principle-fill { background: linear-gradient(90deg, #d4915c, #c07848); }
[data-p="happiness"] .principle-fill { background: linear-gradient(90deg, #f0a060, #e88040); }
[data-p="future"] .principle-fill { background: linear-gradient(90deg, #6fcf97, #4fb87a); }

.principle-level { font-size: 11px; color: var(--text-secondary); font-weight: 600; }

/* ── Game Actions Grid ── */
.game-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.game-action-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 22px 14px 18px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.game-action-card:active { transform: scale(0.96); }

.game-action-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.ga-missions::after { background: linear-gradient(90deg, #eb7070, #f09060); }
.ga-care::after { background: linear-gradient(90deg, #6fcf97, #4fb87a); }
.ga-circle::after { background: linear-gradient(90deg, #7eb8da, #a8d8ea); }
.ga-wisdom::after { background: linear-gradient(90deg, #e8c36a, #d4a830); }

.game-action-icon { font-size: 30px; margin-bottom: 8px; }
.game-action-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.game-action-desc { font-size: 11px; color: var(--text-secondary); }

.game-action-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* ── Thought Card ── */
.game-thought-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(145deg, rgba(58, 108, 192, 0.08), rgba(20, 50, 130, 0.06));
    border: 1px solid rgba(58, 108, 192, 0.16);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.game-thought-icon { font-size: 22px; flex-shrink: 0; }
.game-thought-text { font-size: 14px; line-height: 1.6; color: var(--text-secondary); font-style: italic; }

/* ── Game Screens (sub-navigation) ── */
.game-screen { animation: fadeUp 0.3s ease; }

.game-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 16px;
    transition: var(--transition);
}

.game-back-btn:active { transform: scale(0.96); }

/* ── Missions ── */
.game-mission-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.game-mission-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
}

.game-mission-card:active { transform: scale(0.98); }

.game-mission-card.done {
    opacity: 0.5;
    pointer-events: none;
}

.game-mission-card.done::after {
    content: '✅';
    position: absolute;
    right: 14px;
    font-size: 18px;
}

.game-mission-card { position: relative; }

.gmc-icon { font-size: 28px; flex-shrink: 0; }
.gmc-info { flex: 1; }
.gmc-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.gmc-principle { font-size: 11px; color: var(--accent-light); font-weight: 600; }
.gmc-karma { font-size: 12px; color: var(--gold); font-weight: 700; }

/* ── Mission Detail ── */
.game-mission-scenario {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.game-mission-principle-badge {
    display: inline-block;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.game-mission-text {
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(0,0,0,0.15);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}

.game-mission-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-choice-btn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid rgba(255,200,140,0.1);
    background: var(--glass);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    text-align: left;
    width: 100%;
}

.game-choice-btn:active { transform: scale(0.98); }

.game-choice-btn.correct {
    border-color: var(--green);
    background: var(--green-bg);
}

.game-choice-btn.wrong {
    border-color: var(--red);
    background: var(--red-bg);
    opacity: 0.6;
}

.game-choice-marker {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,200,140,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    color: var(--accent-light);
}

.game-mission-result {
    margin-top: 20px;
    padding: 22px;
    background: rgba(0,0,0,0.15);
    border-radius: var(--radius-sm);
    text-align: center;
    animation: fadeUp 0.4s ease;
}

.gmr-icon { font-size: 40px; margin-bottom: 8px; }
.gmr-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.gmr-text { font-size: 14px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 10px; }
.gmr-karma { font-size: 18px; font-weight: 800; color: var(--gold); }

/* ── Care Events ── */
.game-care-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

.game-care-emoji { font-size: 64px; margin-bottom: 14px; animation: petFloat 2s ease-in-out infinite; }
.game-care-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.game-care-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 18px; }

.game-care-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-care-btn {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255,200,140,0.1);
    background: var(--glass);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.game-care-btn:active { transform: scale(0.97); }

.game-care-btn.best {
    border-color: var(--green);
    background: var(--green-bg);
}

.game-care-btn.ok {
    border-color: var(--orange);
    background: rgba(240, 160, 96, 0.08);
}

.game-care-btn.bad {
    border-color: var(--red);
    background: var(--red-bg);
    opacity: 0.6;
}

.game-care-result {
    margin-top: 16px;
    padding: 18px;
    background: rgba(0,0,0,0.15);
    border-radius: var(--radius-sm);
    text-align: center;
    animation: fadeUp 0.3s ease;
}

.game-care-result-emoji { font-size: 36px; margin-bottom: 6px; }
.game-care-result-text { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 6px; }
.game-care-result-karma { font-size: 16px; font-weight: 800; color: var(--gold); }
.game-care-circle-msg { font-size: 12px; color: var(--blue); margin-top: 6px; font-style: italic; }

/* ── Circle of Kindness ── */
.game-circle-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.game-circle-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.game-circle-stat {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
}

.gcs-value { font-size: 26px; font-weight: 800; color: var(--gold); }
.gcs-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.game-gift-card {
    background: linear-gradient(145deg, rgba(58, 108, 192, 0.10), rgba(20, 50, 130, 0.08));
    border: 1px solid rgba(58, 108, 192, 0.18);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-gift-emoji { font-size: 28px; flex-shrink: 0; }
.game-gift-info { flex: 1; }
.game-gift-from { font-size: 12px; color: var(--accent-light); font-weight: 600; }
.game-gift-text { font-size: 13px; color: var(--text-secondary); }
.game-gift-karma { font-size: 14px; font-weight: 700; color: var(--gold); flex-shrink: 0; }

/* ── Wisdom Cards ── */
.game-wisdom-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.game-wisdom-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.game-wisdom-card.locked {
    opacity: 0.4;
    filter: blur(2px);
    pointer-events: none;
    position: relative;
}

.game-wisdom-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    filter: blur(0);
}

.gwc-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gwc-text {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.gwc-principle {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-light);
    margin-top: 10px;
}

/* ── Karma popup (shared) ── */
.karma-popup {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    pointer-events: none;
}

.karma-popup-text {
    display: inline-block;
    background: linear-gradient(135deg, #a87010, #d4a020, #f0c840);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    padding: 10px 22px;
    border-radius: 28px;
    animation: popFloat 1.4s ease forwards;
    box-shadow: 0 4px 28px rgba(210, 155, 25, 0.50), 0 0 40px rgba(240, 200, 55, 0.25);
}

.game-circle-explain {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.game-circle-cap-info {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 12px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    text-align: center;
}
