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

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

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


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

.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; }


/* ========== КАРТОЧКИ ДЛЯ ВАЛЮТ ========== */
.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(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

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

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

.result-stat-label {
    font-size: 10px;
    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: #1a1a2e;
    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;
    position: relative;
}

.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;
}


/* ========== СЕКЦИИ ========== */
.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;
}

.game-stats {
    background: rgba(99,102,241,0.2);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #818cf8;
    display: flex;
    gap: 8px;
}

.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 0;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 2px;
    align-items: center;
    z-index: 2147483647;
    justify-content: flex-start;
}
.bottom-nav::-webkit-scrollbar { display: none; }
.bottom-nav { touch-action: pan-x; }

.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;
    scroll-snap-align: center;
    flex-shrink: 0;
}

.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);
}

.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%;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.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;
}


.bottom-nav {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    border-top: 2px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    z-index: -2; /* ниже всего */
}

body {
    background: transparent;
    margin: 0;
    padding: 0;
}

#tournaments-container {
    padding-bottom: 80px; /* чтобы кнопка не перекрывалась меню */
}

.floating-join-btn-header {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e;
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.floating-join-btn-header:active {
    transform: scale(0.96);
}

.floating-join-btn-header.hidden {
    display: none;
}

/* Для всех контейнеров, где есть прокрутка */
.container {
    padding-bottom: 70px; /* высота твоего меню (подбери значение) */
}

/* ЕГЭ/ОГЭ темы */
body.ege-mode {
    background: #1a1a2e;
    color: #e0e0e0;
}

body.oge-mode {
    background: #1a2e1a;
    color: #e0e0e0;
}
body.oge-mode .gradient-bg {
    background: radial-gradient(circle at 50% 0%, rgba(52, 211, 153, 0.12), transparent 70%);
}

.game-header {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 20px;
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
}
.game-header #game-subject {
    margin-right: auto;
}
.game-header .stats-center {
    display: flex;
    gap: 10px;
    align-items: center;
}
.game-header #timer {
    font-size: 22px;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(0,0,0,0.4);
    padding: 4px 10px;
    border-radius: 16px;
    margin-left: auto;
}
.game-header #correct-count-top { color: #34d399; }
.game-header #wrong-count-top { color: #f87171; }
.game-header #score-top { color: #fbbf24; }
.game-header #total-time-top { color: #94a3b8; }
.game-header #current-q, .game-header #total-q { color: white; }

/* ===== ГЛОБАЛЬНЫЙ ЧАТ ===== */
.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid #1e293b; margin-bottom: 12px;
}
.chat-header .back-button { font-size: 14px; padding: 8px 0; flex-shrink: 0; }
.chat-title { flex: 1; font-size: 16px; font-weight: 600; }
.chat-counter {
  background: #6366f1; color: white;
  font-size: 12px; padding: 2px 10px; border-radius: 12px; font-weight: 600;
}
.chat-messages {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column;
  gap: 6px; padding: 4px 0; min-height: 200px; max-height: 60vh;
}
.chat-message {
  background: #1e293b; border-radius: 12px; padding: 10px 14px;
  max-width: 85%; align-self: flex-start;
}
.chat-message.own {
  background: #6366f122; align-self: flex-end;
  border: 1px solid #6366f144;
}
.chat-msg-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.chat-msg-user { font-size: 12px; font-weight: 600; color: #6366f1; }
.chat-msg-time { font-size: 10px; color: #64748b; }
.chat-msg-text { font-size: 14px; line-height: 1.4; word-break: break-word; }
.chat-system {
  text-align: center; font-size: 12px; color: #64748b;
  padding: 8px 0; font-style: italic;
}
.chat-loading { text-align: center; color: #64748b; padding: 40px 0; font-size: 14px; }
.chat-input-bar {
  display: flex; gap: 8px; padding: 12px 0;
  border-top: 1px solid #1e293b; margin-top: 12px;
}
.chat-input {
  flex: 1; padding: 10px 16px; border-radius: 24px; border: 1px solid #334155;
  background: #1e293b; color: #e2e8f0; font-size: 14px; outline: none;
}
.chat-input:focus { border-color: #6366f1; }
.chat-send-btn {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: #6366f1; color: white; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.chat-send-btn:hover { background: #4f46e5; }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-float-timer {
  position: fixed; bottom: 80px; right: 16px;
  background: #6366f1; color: white; padding: 8px 16px;
  border-radius: 20px; font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(99,102,241,0.4); z-index: 100;
}
.chat-unread {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: white; font-size: 10px;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* ========== ЛИДЕРБОРД ========== */
.rating-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.rating-tab {
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.rating-tab.active {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e293b;
  border-radius: 10px;
  padding: 10px 12px;
}
.leaderboard-item.current-user {
  border: 1px solid #6366f144;
  background: linear-gradient(135deg, #1e293b, #1e1b4b);
}
.leaderboard-rank {
  width: 28px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  text-align: center;
  flex-shrink: 0;
}
.leaderboard-rank.top1 { color: #fbbf24; font-size: 16px; }
.leaderboard-rank.top2 { color: #94a3b8; font-size: 15px; }
.leaderboard-rank.top3 { color: #d97706; font-size: 14px; }
.leaderboard-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard-rp {
  font-size: 12px;
  font-weight: 700;
  color: #a855f7;
  flex-shrink: 0;
}
.leaderboard-my-rank {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(99,102,241,0.3);
}
.my-rank-pos {
  width: 28px;
  font-size: 16px;
  font-weight: 700;
  color: #6366f1;
  text-align: center;
}
.my-rank-info {
  flex: 1;
}
.my-rank-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}
.my-rank-rp {
  font-size: 11px;
  color: #a855f7;
  font-weight: 600;
  margin-top: 2px;
}

/* ========== ДОСТИЖЕНИЯ ========== */
.achievements-section {
  margin-top: 20px;
}
.achievements-section .section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.achievements-section .section-title {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
}
.achievements-section .section-badge {
  background: #6366f1;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
}
.achievement-card {
  background: #1e293b;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  transition: all 0.2s;
}
.achievement-card.unlocked {
  border: 1px solid rgba(99,102,241,0.3);
  background: linear-gradient(135deg, #1e293b, #1e1b4b);
}
.achievement-card.claimed-ach {
  opacity: 0.6;
  border: 1px solid rgba(34,197,94,0.2);
}
.achievement-icon {
  font-size: 28px;
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}
.achievement-info {
  flex: 1;
  min-width: 0;
}
.achievement-title {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}
.achievement-desc {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
.achievement-progress-text {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}
.achievement-progress-bar {
  height: 4px;
  background: #334155;
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.achievement-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 2px;
  transition: width 0.3s;
}
.achievement-progress-fill.complete {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}
.achievement-reward {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  white-space: nowrap;
}
.achievement-claim-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #22c55e;
  color: white;
  flex-shrink: 0;
}
.achievement-claim-btn:disabled {
  background: #334155;
  color: #64748b;
  cursor: not-allowed;
}
.achievement-claimed-label {
  font-size: 11px;
  color: #22c55e;
  font-weight: 600;
  white-space: nowrap;
}

/* ========== ЭКРАН ДОСТИЖЕНИЙ ========== */
.ach-full-header {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.ach-full-stat {
  flex: 1;
  background: #1e293b;
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  border: 1px solid #334155;
}
.ach-full-stat-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #6366f1;
  line-height: 1.2;
}
.ach-full-stat-label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* ========== ВОПРОС ДНЯ ========== */
.qod-section {
  margin-bottom: 24px;
}
.qod-card {
  background: linear-gradient(135deg, #1e293b, #1a1a2e);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
}
.qod-text {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 12px;
  line-height: 1.4;
}
.qod-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qod-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  font-size: 14px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
}
.qod-option:hover {
  border-color: #6366f1;
  background: #2a2a3e;
}
.qod-option.selected {
  border-color: #6366f1;
  background: #6366f122;
}
.qod-option.correct {
  border-color: #22c55e;
  background: #22c55e22;
  color: #22c55e;
}
.qod-option.wrong {
  border-color: #ef4444;
  background: #ef444422;
  color: #ef4444;
}
.qod-option.disabled {
  cursor: default;
  opacity: 0.7;
}
.qod-option-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  flex-shrink: 0;
}
.qod-option.correct .qod-option-letter {
  background: #22c55e;
  color: white;
}
.qod-option.wrong .qod-option-letter {
  background: #ef4444;
  color: white;
}
.qod-reward {
  font-size: 12px;
  color: #fbbf24;
  font-weight: 600;
  margin-top: 12px;
  text-align: center;
}
.qod-loader {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #94a3b8;
  z-index: 10;
  backdrop-filter: blur(4px);
}
@keyframes qodFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.qod-loader::after {
  content: 'Отправка...';
}
.qod-result {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.qod-result.correct {
  background: #22c55e22;
  color: #22c55e;
  border: 1px solid #22c55e44;
}
.qod-result.wrong {
  background: #ef444422;
  color: #ef4444;
  border: 1px solid #ef444444;
}
.qod-answered {
  margin-top: 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  line-height: 1.5;
}
.qod-answered.correct {
  background: #22c55e22;
  color: #22c55e;
  border: 1px solid #22c55e44;
}
.qod-answered.wrong {
  background: #ef444422;
  color: #ef4444;
  border: 1px solid #ef444444;
}

/* ========== ЕГЭ-КЛУБ ========== */
.club-tabs {
  display: flex;
  gap: 4px;
  background: #1e293b;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}
.club-tab {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}
.club-tab.active {
  background: #6366f1;
  color: white;
}
.club-tab-content { display: none; }
.club-tab-content.active { display: block; }
.club-form-card {
  background: #1e293b;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.club-field { margin-bottom: 12px; }
.club-field label {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px;
  font-weight: 600;
}
.club-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}
.club-input:focus { border-color: #6366f1; }
.club-textarea { resize: vertical; min-height: 60px; }
.club-questions-editor { font-family: monospace; font-size: 13px; line-height: 1.5; }
.club-field-row { display: flex; gap: 8px; }
.club-cost-badge {
  text-align: center;
  font-size: 14px;
  color: #fbbf24;
  font-weight: 600;
  padding: 8px;
  background: #fbbf2411;
  border-radius: 8px;
  margin-top: 8px;
}
.club-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}
.club-result.success { background: #22c55e22; color: #22c55e; border: 1px solid #22c55e44; }
.club-result.error { background: #ef444422; color: #ef4444; border: 1px solid #ef444444; }
.club-result.info { background: #6366f122; color: #818cf8; border: 1px solid #6366f144; }
.club-result.hidden { display: none; }
.club-preview {
  background: #0f172a;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #94a3b8;
}
.club-preview .highlight { color: #22c55e; font-weight: 600; }
.club-code-input { font-family: monospace; }
.ct-my-card {
  background: #0f172a;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid #1e293b;
}
.ct-my-card .ct-title { font-size: 14px; font-weight: 600; color: #e2e8f0; }
.ct-my-card .ct-meta { font-size: 12px; color: #64748b; margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.ct-my-card .ct-code { color: #fbbf24; font-weight: 700; letter-spacing: 2px; }

/* Переключатель режима вопросов */
.club-mode-toggle {
  display: flex;
  gap: 4px;
  background: #0f172a;
  border-radius: 10px;
  padding: 3px;
}
.club-mode-btn {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}
.club-mode-btn.active {
  background: #6366f1;
  color: white;
}
.club-mode-section { margin-top: 12px; }
.club-mode-section.hidden { display: none; }

/* Range slider */
.club-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #334155;
  outline: none;
  margin: 8px 0;
}
.club-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #6366f1;
  cursor: pointer;
  border: 2px solid #4f46e5;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.club-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #6366f1;
  cursor: pointer;
  border: 2px solid #4f46e5;
}

/* Select styling */
.club-input select, .club-input[type="number"] {
  width: 100%;
}

/* Кнопки на карточках турниров */
.ct-start-btn, .ct-play-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
}
.ct-start-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}
.ct-start-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ct-play-btn {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
}