/* ========== ОСНОВНЫЕ СТИЛИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: #0a0c10;
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

/* Градиентный фон */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ========== ХЕДЕР ========== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 12px 0;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: white;
    transform: rotate(10deg);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== РЕАЛЬНЫЙ БАЛАНС ========== */
.real-balance {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.real-balance .rub { color: #60a5fa; }
.real-balance .stars { color: #fbbf24; }
.real-balance .separator { color: #475569; }

/* ========== КНОПКА ПЕРЕКЛЮЧЕНИЯ ТЕМЫ ========== */
.theme-switcher {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    border: 1px solid rgba(255,255,255,0.1);
}

/* ========== КАРТОЧКИ ДЛЯ ВАЛЮТ ========== */
.real-balance-card,
.game-balance-card,
.stats-card,
.referral-card,
.exchange-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Реальный баланс */
.real-balance-row {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}

.balance-item .stars { color: #fbbf24; }
.balance-item .rub { color: #60a5fa; }
.balance-value { font-weight: 700; color: white; }
.balance-label { 
    font-size: 12px; 
    color: #94a3b8;
    margin-left: 4px;
}

/* Игровой баланс */
.game-balance-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.game-balance-row .zlt-icon { 
    font-size: 32px; 
    color: #34d399;
}

.game-balance-row .big-number {
    font-size: 48px;
    font-weight: 800;
    color: #34d399;
}

.game-balance-row .zlt-label {
    font-size: 16px;
    color: #94a3b8;
}

.game-balance-hint {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 11px;
    color: #94a3b8;
}

.stats-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.stat-secondary {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.stat-secondary-value {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.stat-secondary-label {
    font-size: 11px;
    color: #94a3b8;
}

/* Реферальная программа */
.referral-code {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 12px;
    font-family: monospace;
    font-size: 16px;
}

.referral-stats {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.referral-value {
    color: #34d399;
    font-weight: 700;
}

/* Правовая информация */
.legal-section {
    background: rgba(30,41,59,0.5);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.legal-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #94a3b8;
}

.legal-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-link {
    color: #818cf8;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.legal-link:hover {
    color: #a5b4fc;
}

/* Кнопки действий */
.profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.action-button.exchange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.action-button.shop {
    background: linear-gradient(135deg, #10b981, #059669);
}

.action-button.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Обмен валют */
.exchange-balances {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
}

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

.balance-row-value {
    font-weight: 700;
    color: #fbbf24;
}

.rates-card {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    color: white;
}

.rate-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.rate-value {
    color: #34d399;
    font-weight: 700;
}

.exchange-form {
    margin-top: 16px;
}

.exchange-select,
.exchange-input {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    color: white;
    font-size: 16px;
}

.exchange-select option {
    background: #1e293b;
}

.exchange-result {
    background: rgba(99,102,241,0.2);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0;
    color: white;
}

.exchange-result span {
    color: #fbbf24;
    font-size: 24px;
}

/* Быстрый старт */
.quick-start-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.quick-start-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-start-card:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.9);
}

.quick-start-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.quick-start-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.quick-start-badge {
    font-size: 12px;
    color: #34d399;
}

/* Сетка предметов */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

/* Настройки тренировки */
.setup-section {
    margin-bottom: 24px;
}

.setup-label {
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setup-button {
    flex: 1;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.setup-button.active {
    background: rgba(99, 102, 241, 0.3);
    border-color: #6366f1;
}

.setup-button:hover {
    background: rgba(30, 41, 59, 0.8);
}

/* Результаты тренировки */
.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.result-stat {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 16px;
    padding: 16px 8px;
    text-align: center;
}

.result-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.result-stat-label {
    font-size: 11px;
    color: #94a3b8;
}

.results-percent {
    font-size: 18px;
    color: #fbbf24;
    margin-top: 8px;
}

.mistakes-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.mistakes-title {
    font-size: 16px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 12px;
}

.results-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Ожидание турнира */
.waiting-emoji {
    font-size: 48px;
    margin-bottom: 16px;
}

.waiting-info {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 20px;
    padding: 16px;
    margin-top: 20px;
}

.waiting-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.waiting-info-value {
    font-weight: 700;
}

.waiting-info-value.prize {
    color: #fbbf24;
}

/* Профиль */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.profile-id {
    color: #64748b;
    font-size: 14px;
}

/* Промо-карточки */
.promo-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.promo-card:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.9);
}

.promo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.promo-content {
    flex: 1;
}

.promo-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.promo-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
}

.promo-prize {
    color: #fbbf24;
    font-weight: 600;
}

/* ========== СУЩЕСТВУЮЩИЕ СТИЛИ ========== */
/* Здесь оставляем все остальные стили из твоего main.css */
/* ... */
/* ========== ОСНОВНЫЕ СТИЛИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: #0a0c10;
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

/* Градиентный фон */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ========== ХЕДЕР ========== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 12px 0;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: white;
    transform: rotate(10deg);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== БАЛАНС ========== */
.balance-block {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}

.balance-item.stars { color: #fbbf24; }
.balance-item.zlt { color: #34d399; }
.balance-item.rub { color: #60a5fa; }

.zlt-badge {
    font-size: 10px;
    opacity: 0.7;
    margin-left: 2px;
}

/* ========== ПРИВЕТСТВИЕ ========== */
.welcome-section {
    margin-bottom: 24px;
}

.welcome-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-subtitle {
    font-size: 14px;
    color: #64748b;
}

/* ========== КАРТОЧКА РЕЙТИНГА ========== */
.rating-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.rating-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.2), transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.rating-title {
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rating-value {
    font-size: 32px;
    font-weight: 800;
    color: #6366f1;
}

.rating-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    position: relative;
    z-index: 1;
}

.rating-stat-item {
    text-align: center;
}

.rating-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}

.rating-stat-label {
    font-size: 11px;
    color: #94a3b8;
}

/* ========== ФИНАНСОВЫЙ ДАШБОРД ========== */
.finance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.finance-item {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 16px 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.finance-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.finance-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
    color: white;
}

.finance-label {
    font-size: 11px;
    color: #94a3b8;
}

.finance-item.stars .finance-value { color: #fbbf24; }
.finance-item.zlt .finance-value { color: #34d399; }
.finance-item.rub .finance-value { color: #60a5fa; }

/* ========== СЕКЦИИ ========== */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title h2 {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.section-title a {
    color: #818cf8;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

/* ========== КАРТОЧКИ ОБЪЯВЛЕНИЙ ========== */
.announcement-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s;
    cursor: pointer;
    color: white;
}

.announcement-card:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.9);
}

.announcement-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.announcement-content {
    flex: 1;
}

.announcement-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.announcement-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
}

.announcement-prize {
    color: #fbbf24;
    font-weight: 600;
}

/* ========== КАРТОЧКИ ПРЕДМЕТОВ ========== */
.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.subject-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.subject-card:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-2px);
}

.subject-card.active {
    background: rgba(99, 102, 241, 0.3);
    border-color: #6366f1;
}

.subject-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.subject-title {
    font-size: 14px;
    font-weight: 500;
    color: white;
    margin-bottom: 4px;
}

.subject-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 30px;
    display: inline-block;
}

/* ========== КАРТОЧКИ ТУРНИРОВ ========== */
.tournament-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.tournament-card:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.9);
}

.tournament-card.selected {
    border: 2px solid #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.subject-tag {
    background: rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
}

.time-tag {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.stat-item {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 10px 0;
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 11px;
    color: #94a3b8;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.prize-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prize-label {
    font-size: 13px;
    color: #94a3b8;
}

.prize-value {
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
}

/* ========== КНОПКИ ========== */
.action-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border: none;
    border-radius: 30px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
    position: relative;
    z-index: 1000;
}

.action-button:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(99,102,241,0.5);
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.back-button {
    background: none;
    border: none;
    font-size: 16px;
    color: #818cf8;
    cursor: pointer;
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== СЕЛЕКТЫ И ИНПУТЫ ========== */
select.subject-card, input.subject-card {
    width: 100%;
    background: rgba(30, 41, 59, 0.8);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 14px;
    border-radius: 16px;
    font-size: 16px;
    cursor: pointer;
    appearance: none;
}

select.subject-card option {
    background: #1e293b;
    color: white;
}

input.subject-card::placeholder {
    color: #94a3b8;
}

/* ========== ТЕМЫ (ЧИПЫ) ========== */
.topics-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.topic-chip {
    background: rgba(30, 41, 59, 0.5);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s;
}

.topic-chip:hover {
    background: rgba(30, 41, 59, 0.8);
}

.topic-chip.active {
    background: rgba(99, 102, 241, 0.3);
    border-color: #6366f1;
    color: white;
}

/* ========== ГРУППЫ КНОПОК ========== */
.button-group {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.button-group .subject-card {
    flex: 1;
}

/* ========== ЭКРАН ОЖИДАНИЯ ========== */
.waiting-screen {
    text-align: center;
    padding: 40px 0;
}

.loader {
    width: 50px;
    height: 50px;
    margin: 30px auto;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== ЭКРАН ИГРЫ ========== */
.game-header {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-counter {
    background: rgba(99,102,241,0.2);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #818cf8;
}

.timer {
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.timer.warning {
    color: #ef4444;
}

.question-box {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.5;
    font-weight: 500;
    color: white;
}

/* ========== ОПЦИИ ОТВЕТОВ (С НОМЕРАМИ) ========== */
.options-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.option-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 16px 20px;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    width: 100%;
}

.option-button:hover {
    border-color: #6366f1;
    background: rgba(99,102,241,0.1);
}

.option-button.selected {
    background: #6366f1;
    color: white;
}

.option-button.correct {
    background: #34d399;
    color: white;
}

.option-button.correct .option-number {
    background: rgba(255,255,255,0.3);
    color: white;
}

.option-button.incorrect {
    background: #ef4444;
    color: white;
}

.option-button.incorrect .option-number {
    background: rgba(255,255,255,0.3);
    color: white;
}

.option-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.option-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    color: #818cf8;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    line-height: 1.4;
}

.stats-bar {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #94a3b8;
}

/* ========== ЭКРАН РЕЗУЛЬТАТОВ ========== */
.results-screen {
    padding: 20px 0;
}

.result-header {
    text-align: center;
    margin-bottom: 24px;
}

.result-emoji {
    font-size: 64px;
    margin-bottom: 8px;
}

.place-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 30px;
    padding: 30px;
    margin-bottom: 24px;
    text-align: center;
    color: white;
}

.place-value {
    font-size: 72px;
    font-weight: 800;
    color: #6366f1;
}

/* ========== ЛИДЕРБОРД ========== */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.leaderboard-item.current-user {
    background: rgba(99,102,241,0.1);
    border-radius: 12px;
}

.leaderboard-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 12px;
    color: white;
}

.leaderboard-rank.top1 { background: #fbbf24; color: white; }
.leaderboard-rank.top2 { background: #94a3b8; color: white; }
.leaderboard-rank.top3 { background: #b45309; color: white; }

/* ========== РАЗБОР ОШИБОК ========== */
.mistake-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.mistake-question {
    font-weight: 500;
    margin-bottom: 8px;
    color: white;
}

.mistake-answer-wrong {
    color: #ef4444;
    font-size: 14px;
}

.mistake-answer-correct {
    color: #34d399;
    font-size: 14px;
}

.mistake-explanation {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 4px;
}

/* ========== БОТТОМ-НАВИГАЦИЯ ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 12, 16, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 8px 16px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2147483647;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 12px;
    transition: all 0.2s;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 30px;
    position: relative;
    z-index: 10000;
}

.nav-item.active {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.1);
}

.nav-icon {
    font-size: 24px;
}

/* ========== УТИЛИТЫ ========== */
.hidden {
    display: none !important;
}

/* ========== ФИКС ДЛЯ КЛИКАБЕЛЬНОСТИ ========== */
button, .subject-card, .nav-item, .action-button, .tournament-card, .back-button, .topic-chip {
    cursor: pointer;
    position: relative;
    z-index: 1000;
}

.rating-card::before, .gradient-bg {
    pointer-events: none;
}

/* ========== РАЗДЕЛЕНИЕ ВАЛЮТ ========== */

/* Реальный баланс в хедере */
.real-balance {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.real-balance .rub { color: #60a5fa; }
.real-balance .stars { color: #fbbf24; }
.real-balance .separator { color: #475569; }

/* Карточки в профиле */
.real-balance-card,
.game-balance-card,
.stats-card,
.referral-card,
.exchange-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Реальный баланс в профиле */
.real-balance-row {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}

.balance-item .stars { color: #fbbf24; }
.balance-item .rub { color: #60a5fa; }
.balance-item .value { font-weight: 700; }
.balance-item .label { 
    font-size: 12px; 
    color: #94a3b8;
    margin-left: 4px;
}

/* Игровой баланс в профиле */
.game-balance-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.game-balance-row .zlt { 
    font-size: 32px; 
    color: #34d399;
}

.game-balance-row .big-number {
    font-size: 48px;
    font-weight: 800;
    color: #34d399;
}

.game-balance-row .label {
    font-size: 16px;
    color: #94a3b8;
}

.game-balance-hint {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

/* Игровой баланс в тренировках */
.game-balance-card.small {
    padding: 12px;
    margin-bottom: 16px;
}

.game-balance-card.small .game-balance-row .zlt {
    font-size: 24px;
}

.game-balance-card.small .game-balance-row .big-number {
    font-size: 32px;
}

/* Кнопки действий */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.action-button.exchange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.action-button.shop {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* Обмен валют */
.exchange-balances {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.rates-card {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.rate-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.exchange-form {
    margin-top: 16px;
}

.exchange-form select,
.exchange-form input {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    color: white;
    font-size: 16px;
}

.exchange-result {
    background: rgba(99,102,241,0.2);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0;
}

.exchange-result span {
    color: #fbbf24;
    font-size: 24px;
}
/* Экран покупки ZLT */
.buy-zlt-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.current-balance {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
}

.current-balance .zlt-amount {
    font-size: 24px;
    font-weight: 700;
    color: #34d399;
}

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

.package-card {
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.package-card:hover {
    transform: translateY(-2px);
    background: rgba(0,0,0,0.3);
}

.package-card.popular {
    border: 2px solid #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.package-card.vip {
    border: 2px solid #a855f7;
    background: rgba(168, 85, 247, 0.1);
}

.popular-badge, .vip-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 30px;
    font-weight: 600;
}

.popular-badge {
    background: #fbbf24;
    color: #000;
}

.vip-badge {
    background: #a855f7;
    color: white;
}

.package-info {
    flex: 1;
}

.package-amount {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.package-price {
    font-size: 18px;
    font-weight: 600;
    color: #fbbf24;
}

.package-stars {
    font-size: 14px;
    color: #94a3b8;
}

.package-bonus {
    font-size: 12px;
    color: #34d399;
    margin-top: 4px;
}

.package-button {
    background: linear-gradient(135deg, #34d399, #10b981);
    border: none;
    border-radius: 30px;
    padding: 8px 16px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.package-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.5);
}

.selected-package {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 16px;
    margin-top: 16px;
}

.selected-info {
    text-align: center;
    font-size: 18px;
    margin-bottom: 16px;
}

.selected-info span {
    font-weight: 700;
    color: #fbbf24;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.payment-button {
    padding: 14px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-button:first-child {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.payment-button:last-child {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: black;
}

.payment-button:hover {
    transform: scale(1.02);
}

.game-stats {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    margin-bottom: 16px;
}
.stats-item {
    font-size: 16px;
    font-weight: 600;
}


#timer {
    transition: color 0.2s ease;
}

#timer.warning {
    color: #ff4444;
    animation: pulse 0.5s infinite;
}

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

.game-stats-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    margin-bottom: 16px;
    font-size: 12px;
}
.game-stats-bar .stats-item {
    display: flex;
    gap: 4px;
    align-items: center;
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 20px;
}

.game-top-bar {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.4);
    border-radius: 20px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 500;
    flex-wrap: wrap;
}

.game-progress { color: #fbbf24; }
.game-progress span { color: white; }
.game-progress #correct-count-top { color: #34d399; }

.game-time-stats { color: #94a3b8; }
.game-time-stats span { color: white; }

.game-place { color: #f97316; }
.game-place span { color: white; }

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 30px;
}

.question-counter {
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
}

.timer {
    font-size: 24px;
    font-weight: bold;
    font-family: monospace;
    background: rgba(0,0,0,0.5);
    padding: 4px 12px;
    border-radius: 30px;
    letter-spacing: 2px;
}

.tournament-card.disabled {
    opacity: 0.6;
    pointer-events: none;
}
.tournament-active {
    border-left: 3px solid #34d399;
    background: rgba(52, 211, 153, 0.1);
}
.tournament-results {
    border-left: 3px solid #fbbf24;
}
.tournament-ended {
    border-left: 3px solid #ef4444;
}
.status-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}
.status-badge.upcoming {
    background: #3b82f6;
    color: white;
}
.status-badge.active {
    background: #34d399;
    color: white;
}
.status-badge.results {
    background: #fbbf24;
    color: black;
}
.status-badge.ended {
    background: #ef4444;
    color: white;
}
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.countdown-number {
    font-size: 120px;
    font-weight: bold;
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251,191,36,0.5);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
.game-status {
    font-size: 12px;
    font-weight: bold;
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 20px;
}
.announcement-type {
    background: rgba(99,102,241,0.2);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}
.tournament-card .time-tag.countdown {
    background: #fbbf24;
    color: #000;
    font-weight: bold;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
.subject-badge {
    background: rgba(99,102,241,0.2);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    color: #818cf8;
}

/* ========== ПОДПИСКИ ========== */
.subscriptions-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subscription-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.subscription-card:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.9);
}

.subscription-card.vip {
    border: 2px solid #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.subscription-card.premium {
    border: 2px solid #a855f7;
    background: rgba(168, 85, 247, 0.1);
}

.subscription-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
}

.subscription-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subscription-price {
    font-size: 28px;
    font-weight: 800;
    color: #fbbf24;
    margin-bottom: 16px;
}

.subscription-price span {
    font-size: 14px;
    color: #94a3b8;
}

.subscription-bonuses {
    margin: 16px 0;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
}

.subscription-bonus {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.subscription-bonus-value {
    color: #34d399;
    font-weight: 600;
}

.subscription-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border: none;
    border-radius: 30px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
}

.subscription-status-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.subscription-expires {
    color: #94a3b8;
    font-size: 14px;
    margin: 8px 0;
}

.subscription-cancel {
    background: #ef4444;
    border: none;
    border-radius: 30px;
    padding: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    width: 100%;
}
.subscription-info {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.subscription-header span {
    font-weight: 600;
    color: #fbbf24;
}

.subscription-header a {
    color: #818cf8;
    font-size: 12px;
    cursor: pointer;
}

.subscription-details {
    font-size: 14px;
}

.subscription-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.subscription-bonus {
    color: #34d399;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.exam-switch {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2px;
}
.exam-btn {
    background: transparent;
    border: none;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: #aaa;
    cursor: pointer;
}
.exam-btn.active {
    background: #fbbf24;
    color: #1a1a2e;
}