﻿/* ===== ПОЛНЫЙ CSS ДЛЯ STARCOIN CLICKER ===== */
/* ===== ОБНОВЛЁННЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
    /* Основные цвета - светлая тема */
    --bg-main: #F5F7FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-hover: #F0F2F5;
    
    /* Акцентные цвета */
    --accent-blue: #3D7FFF;
    --accent-purple: #8B5CF6;
    --accent-green: #10B981;
    --accent-yellow: #F59E0B;
    --accent-red: #EF4444;
    --accent-pink: #EC4899;
    
    /* Текст */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    
    /* Границы */
    --border-color: #E5E7EB;
    --border-glow: rgba(61, 127, 255, 0.2);
    
    /* Тени */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    
    /* Градиенты */
    --gradient-main: linear-gradient(135deg, #8B5CF6, #3D7FFF);
    --gradient-gold: linear-gradient(135deg, #F59E0B, #F97316);
    --gradient-success: linear-gradient(135deg, #10B981, #059669);
    --gradient-danger: linear-gradient(135deg, #EF4444, #DC2626);
    --gradient-purple: linear-gradient(135deg, #8B5CF6, #7C3AED);
    --gradient-blue: linear-gradient(135deg, #3D7FFF, #2563EB);
    --gradient-blue-hover: linear-gradient(135deg, #2563EB, #1D4ED8);
    --gradient-green: linear-gradient(135deg, #10B981, #059669);
    --gradient-green-hover: linear-gradient(135deg, #059669, #047857);
    --gradient-sun: linear-gradient(135deg, #FFD700, #FF8C00);
    
    /* Дополнительные переменные для HTML элементов */
    --primary-color: var(--accent-blue);
    --primary-dark: #2563EB;
}

/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.4;
    touch-action: manipulation;
    -ms-touch-action: manipulation;
    touch-action: pan-y pan-x pinch-zoom;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    position: fixed;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Отключаем выделение текста */
* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Разрешаем выделение для input и textarea */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Отключаем двойной тап для зума */
button, a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Фикс для iOS Safari */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
.container {
    max-width: 400px;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    margin: 0 auto;
    background: var(--bg-main);
    position: relative;
    overflow: hidden;
}

.main-content {
    flex: 1;
    margin-bottom: 70px;
    height: calc(100vh - 70px);
    height: calc(var(--vh, 1vh) * 100 - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 15px;
}

/* Фикс для Safari */
@supports (-webkit-touch-callout: none) {
    .container {
        height: -webkit-fill-available;
    }
    
    .main-content {
        height: calc(-webkit-fill-available - 70px);
    }
}

/* ===== СТРАНИЦЫ ===== */
.page {
    display: none;
    height: 100%;
    overflow-y: auto;
    padding-top: 15px;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@keyframes starGlow {
    0% {
        transform: scale(1);
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.1);
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 0.8),
            0 0 30px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 170, 0, 0.4);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
}

@keyframes buttonGlow {
    0% {
        box-shadow: 
            2px 2px 16px 6px rgba(122, 162, 247, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 0 40px rgba(255, 215, 0, 0.5),
            2px 2px 16px 6px rgba(122, 162, 247, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    100% {
        box-shadow: 
            2px 2px 16px 6px rgba(122, 162, 247, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

@keyframes pulseStar {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes starFloat1 {
    0% {
        transform: translate(0, 0) scale(0.5) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx1), var(--ty1)) scale(0) rotate(180deg);
        opacity: 0;
    }
}

@keyframes starFloat2 {
    0% {
        transform: translate(0, 0) scale(0.5) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx2), var(--ty2)) scale(0) rotate(-180deg);
        opacity: 0;
    }
}

@keyframes starFloat3 {
    0% {
        transform: translate(0, 0) scale(0.5) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx3), var(--ty3)) scale(0) rotate(90deg);
        opacity: 0;
    }
}

@keyframes starFloat4 {
    0% {
        transform: translate(0, 0) scale(0.8) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx4), var(--ty4)) scale(0.2) rotate(270deg);
        opacity: 0;
    }
}

@keyframes starFloat5 {
    0% {
        transform: translate(0, 0) scale(0.6) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx5), var(--ty5)) scale(0.1) rotate(360deg);
        opacity: 0;
    }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

@keyframes badgeAppear {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

@keyframes notificationPulse {
    0%, 100% {
        opacity: 0.1;
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }
    50% {
        opacity: 0.3;
        box-shadow: 0 0 0 4px rgba(255, 215, 0, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalAppear {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes balancePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes rotateShine {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideInItem {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rankAppear {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== ГЛАВНАЯ СТРАНИЦА ===== */
.click-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 150px);
    padding: 20px 0;
}

.balance-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

.balance-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.balance-amount {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* ГЛАВНАЯ КНОПКА */
.click-button-large {
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: var(--gradient-sun);
    border: 6px solid #FFB700;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 30px 0 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(255, 183, 0, 0.3),
        0 20px 60px rgba(255, 183, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.click-button-large:hover {
    transform: scale(1.02);
    box-shadow: 
        0 15px 50px rgba(255, 183, 0, 0.4),
        0 25px 70px rgba(255, 183, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.click-button-large:active {
    transform: scale(0.95);
    box-shadow: 
        0 5px 20px rgba(255, 183, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.click-button-large::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 70%
    );
    animation: rotateShine 20s linear infinite;
    pointer-events: none;
}

.click-icon-large {
    font-size: 72px;
    margin-bottom: 12px;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.2),
        0 4px 20px rgba(255, 183, 0, 0.4);
    animation: pulseStar 2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.click-text {
    font-size: 14px;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 2;
}

.online-text {
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* ЭФФЕКТЫ КЛИКА */
.click-pulse {
    animation: buttonPulse 0.2s ease;
}

.star-glow {
    animation: starGlow 0.3s ease;
}

.button-glow {
    animation: buttonGlow 0.4s ease;
}

.star-particle {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 183, 0, 0.4);
    opacity: 0;
}

.click-effect {
    animation: clickEffect 0.2s ease;
}

@keyframes clickEffect {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* СТАТИСТИКА */
.horizontal-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.stat-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.stat-line span {
    color: var(--text-primary);
    font-weight: 600;
}

.stat-line i {
    color: var(--accent-blue);
    font-size: 14px;
}

/* ===== НАВИГАЦИЯ ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0;
    max-width: 400px;
    margin: 0 auto;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.5s ease 0.2s both;
}

.nav-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 12px 0;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.nav-button.active {
    color: var(--accent-blue);
    background: rgba(61, 127, 255, 0.08);
}

.nav-button.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-blue);
    animation: slideIn 0.3s ease;
}

.nav-button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-button:hover:not(.active) .nav-icon {
    transform: translateY(-1px);
}

.nav-button:active {
    transform: scale(0.98);
}

.nav-button.has-notification::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 20px;
    width: 6px;
    height: 6px;
    background: var(--accent-red);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 0 0 2px var(--accent-red);
    animation: pulse 2s infinite;
}

.nav-button.loading .nav-icon {
    animation: spin 1s linear infinite;
}

.nav-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-button:disabled .nav-icon {
    filter: grayscale(1);
}

/* Разделители между кнопками */
.nav-button:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--border-color);
    opacity: 0.3;
}

.nav-button.active:not(:last-child)::after {
    background: rgba(255, 215, 0, 0.3);
}

/* Эффект свечения для активной кнопки */
.nav-button.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 215, 0, 0.1) 0%,
        transparent 70%
    );
    z-index: -1;
    opacity: 0;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.nav-button.has-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 0;
    animation: notificationPulse 2s infinite;
}

.nav-icon {
    font-size: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-button.active .nav-icon {
    transform: translateY(-2px) scale(1.1);
    color: var(--accent-blue);
    filter: drop-shadow(0 2px 8px rgba(61, 127, 255, 0.4));
}

.nav-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.nav-button.active .nav-label {
    opacity: 1;
    color: var(--accent-blue);
    transform: translateY(1px);
}

/* БЕЙДЖИ НАВИГАЦИИ */
.nav-badge {
    position: absolute;
    top: 10px;
    right: 20px;
    background: var(--accent-red);
    color: white;
    font-size: 9px;
    font-weight: 900;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-secondary);
    animation: bounce 1s infinite alternate;
}

.nav-badge.badge-appear {
    animation: badgeAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-button[data-page="rewards-page"] .nav-badge {
    background: var(--accent-yellow);
    color: #000;
}

/* ТЕМНАЯ ТЕМА ДЛЯ НАВИГАЦИИ */
@media (prefers-color-scheme: dark) {
    .bottom-nav {
        background: rgba(20, 21, 38, 0.95);
        border-top-color: rgba(65, 72, 104, 0.5);
    }
    
    .nav-button.active {
        background: rgba(255, 215, 0, 0.08);
    }
}

/* ПРЕМИУМ ПОЛЬЗОВАТЕЛИ */
.premium-user .bottom-nav {
    border-top: 2px solid;
    border-image: linear-gradient(90deg, #ffd700, #ffa500, #ff6b00) 1;
}

.premium-user .nav-button.active::before {
    background: linear-gradient(90deg, #ffd700, #ffa500, #ff6b00);
}

/* ===== ВКЛАДКИ ===== */
/* ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ ВКЛАДОК */
.shop-tabs, .rewards-tabs, .leaderboard-tabs, .profile-tabs {
    display: flex;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.shop-tab, .rewards-tab, .leaderboard-tab, .profile-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.shop-tab.active, .rewards-tab.active, .leaderboard-tab.active, .profile-tab.active {
    background: var(--gradient-blue);
    color: white;
    box-shadow: var(--shadow-sm);
}

.shop-tab:hover:not(.active), 
.rewards-tab:hover:not(.active), 
.leaderboard-tab:hover:not(.active), 
.profile-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
}

.rewards-tab i {
    font-size: 14px;
}

/* ===== МАГАЗИН ===== */
.shop-content {
    padding-bottom: 20px;
}

.shop-tab-content {
    display: none;
}

.shop-tab-content.active {
    display: block;
}

.shop-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* КАРТОЧКИ ТОВАРОВ */
.shop-item-compact {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.shop-item-compact:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.item-header-compact {
    flex: 1;
    min-width: 0;
}

.item-title-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.item-icon-compact {
    font-size: 16px;
    flex-shrink: 0;
}

.item-desc-compact {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.item-stats-compact {
    font-size: 11px;
    color: var(--accent-green);
    font-weight: 500;
}

.item-price-compact {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-left: auto;
    padding-left: 10px;
}

/* КНОПКИ ПОКУПКИ */
.buy-button-compact {
    background: var(--gradient-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
}

.buy-button-compact:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 127, 255, 0.3);
}

.buy-button-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== ПЛАТЕЖИ ===== */
.payment-info-section {
    padding: 15px 0;
}

.payment-header {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.payment-header h4 {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.custom-purchase-section {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.custom-purchase-section h4 {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-purchase-input {
    margin-bottom: 20px;
}

.custom-purchase-input input {
    width: 100%;
    padding: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.custom-purchase-input input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(61, 127, 255, 0.2);
}

.purchase-info {
    background: rgba(61, 127, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border-glow);
}

.purchase-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item span:first-child {
    color: var(--text-secondary);
    font-size: 12px;
}

.detail-item span:last-child {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
}

.purchase-action-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-blue);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.purchase-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.purchase-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-terms {
    margin-top: 15px;
}

.payment-terms p {
    color: var(--text-secondary);
    font-size: 11px;
    text-align: center;
}

/* ===== НАГРАДЫ ===== */
.rewards-content {
    padding: 0 0 20px 0;
    height: calc(100vh - 140px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.rewards-tab-content {
    display: none;
    animation: slideUp 0.3s ease;
}

.rewards-tab-content.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* КАНАЛЫ */
.channel-rewards-section {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.channel-rewards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.channel-rewards-header h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.channel-rewards-header h3 i {
    color: var(--accent-yellow);
}

.total-reward-info {
    background: var(--gradient-gold);
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rewards-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

/* СПИСОК КАНАЛОВ */
.channel-rewards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* КАРТОЧКА КАНАЛА */
.channel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.channel-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
}

/* ШАПКА КАНАЛА */
.channel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.channel-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 11px;
    color: var(--text-secondary);
}

.channel-members {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* НАГРАДА КАНАЛА */
.channel-reward-badge {
    background: var(--gradient-gold);
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
    justify-content: center;
}

/* СТАТУС И ДЕЙСТВИЯ */
.channel-status-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.channel-status {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-available {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-claimed {
    background: rgba(61, 127, 255, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(61, 127, 255, 0.3);
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-yellow);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.channel-actions {
    display: flex;
    gap: 10px;
}

/* КНОПКИ ДЕЙСТВИЙ */
.channel-subscribe-btn, 
.channel-claim-btn,
.channel-retry-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 100px;
    border: none;
    text-decoration: none;
}

.channel-subscribe-btn {
    background: var(--gradient-blue);
    color: white;
}

.channel-subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 127, 255, 0.3);
}

.channel-claim-btn {
    background: var(--gradient-gold);
    color: white;
}

.channel-claim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.channel-retry-btn {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.channel-retry-btn:hover {
    background: var(--accent-purple);
    color: white;
    border-color: var(--accent-purple);
}

/* КНОПКА "ЗАБРАТЬ ВСЕ" */
.claim-all-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.claim-all-btn {
    width: 100%;
    padding: 18px;
    background: var(--gradient-blue);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(61, 127, 255, 0.3);
}

.claim-all-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(61, 127, 255, 0.4);
}

.claim-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* КНОПКА ОБНОВЛЕНИЯ */
.refresh-section {
    margin-top: 15px;
}

.refresh-btn {
    width: 100%;
    padding: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.refresh-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
}

/* ===== ЕЖЕДНЕВНЫЕ НАГРАДЫ ===== */
.daily-rewards-section {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.daily-rewards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.daily-rewards-header h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.daily-rewards-header h3 i {
    color: var(--accent-yellow);
}

.streak-info {
    background: var(--gradient-gold);
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* КАРТОЧКА ТЕКУЩЕЙ НАГРАДЫ */
.current-reward-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(61, 127, 255, 0.1));
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--border-glow);
    text-align: center;
}

.reward-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-gold);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px auto;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
    color: white;
}

.reward-info {
    text-align: center;
}

.reward-title {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 600;
}

.reward-amount {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 20px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* КНОПКА ПОЛУЧЕНИЯ НАГРАДЫ */
.claim-daily-btn {
    background: var(--gradient-gold);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
    min-width: 180px;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.claim-daily-btn:hover:not(.disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.4);
}

.claim-daily-btn.disabled {
    background: var(--bg-hover);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

/* ПРОГРЕСС СЕРИИ */
.rewards-progress {
    margin-bottom: 25px;
}

.rewards-progress h4 {
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-hover);
    border-radius: 3px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.streak-bonus {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--accent-yellow);
    font-size: 14px;
}

.rewards-info {
    background: rgba(61, 127, 255, 0.1);
    border-radius: 14px;
    padding: 20px;
    margin-top: 25px;
    border: 1px solid var(--border-glow);
}

.rewards-info p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 10px 0;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.rewards-info p i {
    color: var(--accent-yellow);
    margin-top: 2px;
    flex-shrink: 0;
}

/* ===== ЛИДЕРБОРД ===== */
.leaderboard-content {
    padding-bottom: 20px;
}

.leaderboard-tab-content {
    display: none;
}

.leaderboard-tab-content.active {
    display: block;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.leaderboard-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.leaderboard-title i {
    color: var(--accent-yellow);
}

.leaderboard-total {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* КАРТОЧКА ИГРОКА */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    min-height: 68px;
    animation: rankAppear 0.3s ease backwards;
}

.leaderboard-item:hover {
    border-color: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* МЕСТО В РЕЙТИНГЕ */
.leaderboard-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    margin-right: 14px;
    flex-shrink: 0;
}

.leaderboard-item:nth-child(1) .leaderboard-rank {
    background: var(--gradient-gold);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.leaderboard-item:nth-child(2) .leaderboard-rank {
    background: var(--gradient-blue);
    color: white;
}

.leaderboard-item:nth-child(3) .leaderboard-rank {
    background: var(--gradient-purple);
    color: white;
}

/* АВАТАРКА */
.leaderboard-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    margin-right: 14px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-secondary);
    border: 2px solid transparent;
}

.leaderboard-item:nth-child(1) .leaderboard-avatar {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.leaderboard-item:nth-child(2) .leaderboard-avatar {
    border-color: var(--accent-blue);
}

.leaderboard-item:nth-child(3) .leaderboard-avatar {
    border-color: var(--accent-purple);
}

.leaderboard-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: white;
    border-radius: 10px;
}

.leaderboard-item:nth-child(1) .leaderboard-avatar .avatar-fallback {
    background: var(--gradient-gold);
    color: white;
}

.leaderboard-item:nth-child(2) .leaderboard-avatar .avatar-fallback {
    background: var(--gradient-blue);
}

.leaderboard-item:nth-child(3) .leaderboard-avatar .avatar-fallback {
    background: var(--gradient-purple);
}

.leaderboard-avatar .avatar-fallback:not([class*="nth-child"]) {
    background: var(--gradient-blue);
}

/* ИНФОРМАЦИЯ ОБ ИГРОКЕ */
.leaderboard-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leaderboard-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: color 0.2s;
    padding: 2px 0;
}

.leaderboard-name:hover {
    color: var(--accent-blue);
}

.leaderboard-balance {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-yellow);
    display: flex;
    align-items: center;
    gap: 6px;
}

.leaderboard-balance i {
    font-size: 16px;
}

.leaderboard-stats {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.leaderboard-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.leaderboard-item.online .leaderboard-name::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
}

.leaderboard-item.current-user {
    background: rgba(61, 127, 255, 0.1);
    border-color: var(--accent-blue);
    position: relative;
}

.leaderboard-item.current-user::before {
    content: 'Вы';
    position: absolute;
    top: -8px;
    right: 16px;
    background: var(--accent-blue);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ЗАДЕРЖКИ АНИМАЦИЙ */
.leaderboard-item:nth-child(1) { animation-delay: 0.1s; }
.leaderboard-item:nth-child(2) { animation-delay: 0.15s; }
.leaderboard-item:nth-child(3) { animation-delay: 0.2s; }
.leaderboard-item:nth-child(4) { animation-delay: 0.25s; }
.leaderboard-item:nth-child(5) { animation-delay: 0.3s; }

/* ===== ПРОФИЛЬ ===== */
.profile-content {
    padding-bottom: 20px;
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

/* Статистика профиля */
.profile-stats-simple {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item-simple {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.stat-label-simple {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-value-simple {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ПЕРЕВОДЫ */
.transfer-section-enhanced {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.transfer-section-enhanced h3 {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transfer-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.transfer-btn-main {
    flex: 1;
    padding: 20px;
    border: none;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.transfer-blue-btn {
    background: var(--gradient-blue);
    color: white;
}

.transfer-blue-btn:hover {
    background: var(--gradient-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 127, 255, 0.3);
}

.buy-green-btn {
    background: var(--gradient-green);
    color: white;
}

.buy-green-btn:hover {
    background: var(--gradient-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.transfer-history-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Кнопка покупки SC */
.buy-sc-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.buy-sc-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* РЕФЕРАЛЬНАЯ СИСТЕМА */
.referral-stats-clean {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.referral-stat-clean {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--accent-blue);
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.referral-link-clean {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.referral-link-clean h4 {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-box-clean-expanded {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.link-box-clean-expanded input {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    text-align: center;
    cursor: pointer;
}

/* КНОПКА ПРИГЛАШЕНИЯ ДРУГА */
.invite-friend-btn {
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: background 0.2s ease;
}

.invite-friend-btn:hover {
    background: var(--primary-dark);
}

.referral-bonuses-clean {
    background: rgba(61, 127, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-glow);
}

.referral-bonuses-clean h4 {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bonus-item-clean {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.bonus-item-clean:last-child {
    border-bottom: none;
}

.bonus-amount {
    font-weight: 700;
    color: var(--accent-yellow);
    font-size: 13px;
}

.bonus-desc {
    color: var(--text-secondary);
    font-size: 12px;
}

.referral-list-clean {
    display: none;
}

.referral-list-clean h4 {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    animation: modalAppear 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.close-modal {
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent-blue);
}

.modal-body {
    padding: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(61, 127, 255, 0.2);
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.cancel-btn, .transfer-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cancel-btn:hover {
    background: var(--bg-hover);
}

.transfer-btn {
    background: var(--gradient-blue);
    color: white;
}

.transfer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 127, 255, 0.3);
}

/* МОДАЛЬНОЕ ОКНО ИСТОРИИ ПЕРЕВОДОВ */
.transfer-history-modal {
    max-width: 450px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.transfer-history-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.transfer-stats {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.transfer-stat-item {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.transfer-stat-item .stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}

.transfer-stat-item .stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    font-family: 'SF Pro Display', -apple-system, sans-serif;
}

.transfer-stat-item .stat-value.positive {
    color: #10B981;
}

.transfer-stat-item .stat-value.negative {
    color: #EF4444;
}

.transfer-history-list {
    flex: 1;
    overflow-y: auto;
    max-height: 50vh;
    padding-right: 5px;
    margin-bottom: 15px;
}

.transfer-history-list::-webkit-scrollbar {
    width: 6px;
}

.transfer-history-list::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.1);
    border-radius: 3px;
}

.transfer-history-list::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 3px;
}

.transfer-history-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    animation: slideInItem 0.3s ease forwards;
}

.transfer-history-item:hover {
    background: rgba(139, 92, 246, 0.08);
    transform: translateX(2px);
    border-color: rgba(139, 92, 246, 0.3);
}

.transfer-history-item.incoming {
    border-left: 3px solid #10B981;
}

.transfer-history-item.outgoing {
    border-left: 3px solid #EF4444;
}

.transfer-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 18px;
    flex-shrink: 0;
}

.transfer-history-item.incoming .transfer-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.transfer-history-item.outgoing .transfer-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.transfer-details {
    flex: 1;
    min-width: 0;
}

.transfer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.transfer-username {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.transfer-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--bg-secondary);
}

.transfer-history-item.incoming .transfer-type {
    color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}

.transfer-history-item.outgoing .transfer-type {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
}

.transfer-time {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.transfer-amount {
    font-size: 18px;
    font-weight: 800;
    font-family: 'SF Pro Display', -apple-system, sans-serif;
    margin-left: 15px;
    flex-shrink: 0;
}

.transfer-history-item.incoming .transfer-amount {
    color: #10B981;
}

.transfer-history-item.outgoing .transfer-amount {
    color: #EF4444;
}

.transfer-history-footer {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.transactions-count {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 8px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
}

.transactions-count i {
    margin-right: 6px;
    color: var(--accent-purple);
}

.transactions-count span {
    color: var(--text-primary);
    font-weight: 600;
}

/* КНОПКА ИСТОРИИ В МОДАЛКЕ */
.history-btn-bottom {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.history-btn-bottom:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

/* ===== УТИЛИТЫ ===== */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.loading:before {
    content: "⏳";
    display: block;
    font-size: 32px;
    margin-bottom: 15px;
    animation: pulse 1.5s infinite;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

.notification.success { 
    background: var(--gradient-success); 
}
.notification.error { 
    background: var(--gradient-danger); 
}
.notification.warning { 
    background: var(--gradient-gold); 
}
.notification.info { 
    background: var(--gradient-blue); 
}

/* ===== ПУСТЫЕ СОСТОЯНИЯ ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 16px;
}

.empty-state p {
    font-size: 13px;
    max-width: 280px;
    margin: 0 auto;
    line-height: 1.6;
}

.empty-rewards,
.empty-leaderboard {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-rewards i,
.empty-leaderboard i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-rewards h4,
.empty-leaderboard h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 16px;
}

.empty-rewards p,
.empty-leaderboard p {
    font-size: 13px;
    max-width: 280px;
    margin: 0 auto;
    line-height: 1.6;
}

.no-transfers {
    text-align: center;
    padding: 50px 20px;
}

.no-transfers-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
    color: var(--text-secondary);
}

.no-transfers-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-transfers-subtext {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 250px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 380px) {
    .main-content {
        padding: 0 12px;
    }
    
    .click-button-large {
        width: 340px;
        height: 340px;
    }
    
    .click-icon-large {
        font-size: 72px;
    }
    
    .balance-amount {
        font-size: 32px;
    }
    
    .shop-tab, .rewards-tab, .leaderboard-tab, .profile-tab {
        font-size: 10px;
        padding: 8px 6px;
    }
    
    .nav-icon {
        font-size: 20px;
    }
    
    .nav-label {
        font-size: 9px;
    }
    
    .channel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .channel-status-section {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .channel-actions {
        flex-direction: column;
    }
    
    .channel-subscribe-btn,
    .channel-claim-btn {
        width: 100%;
    }
    
    .current-reward-card {
        padding: 20px;
    }
    
    .reward-amount {
        font-size: 28px;
    }
    
    .claim-daily-btn {
        width: 100%;
        min-width: auto;
    }
    
    .rewards-list {
        gap: 10px;
    }
    
    .reward-day {
        padding: 15px;
    }
    
    .leaderboard-item {
        padding: 12px 14px;
        min-height: 64px;
    }
    
    .leaderboard-avatar {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .leaderboard-rank {
        width: 28px;
        height: 28px;
        margin-right: 12px;
        font-size: 12px;
    }
    
    .leaderboard-name {
        font-size: 14px;
    }
    
    .leaderboard-balance {
        font-size: 13px;
    }
    
    .leaderboard-avatar .avatar-fallback {
        font-size: 16px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 340px) {
    .channel-rewards-header,
    .daily-rewards-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .total-reward-info,
    .streak-info {
        width: 100%;
        justify-content: center;
    }
    
    .rewards-info p {
        font-size: 12px;
    }
    
    .leaderboard-item {
        padding: 10px 12px;
        min-height: 60px;
    }
    
    .leaderboard-avatar {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .leaderboard-rank {
        width: 26px;
        height: 26px;
        margin-right: 10px;
    }
    
    .leaderboard-name {
        font-size: 13px;
    }
    
    .leaderboard-balance {
        font-size: 12px;
    }
}

/* Фикс для телеграм кнопки из HTML */
.telegram-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #0088cc, #00aced);
    color: white;
    padding: 16px 32px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.3);
    margin: 10px 0;
}

.telegram-play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 136, 204, 0.4);
}

/* Эффект для обновления баланса */
.balance-update {
    animation: balancePulse 0.5s ease;
}

/* Скрыть скроллбар */
::-webkit-scrollbar {
    width: 0;
    background: transparent;
}