/* ===== Friends System Styles ===== */
.friends-stats {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(56, 189, 248, 0.3);
}

.stats-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

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

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
}

.referral-section {
    text-align: center;
}

.referral-label {
    color: #94a3b8;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.referral-link-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.referral-link {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.8rem;
    color: white;
    font-size: 0.9rem;
}

.copy-btn {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    padding: 0.8rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: scale(1.05);
    background: var(--secondary);
}

.referral-bonus {
    color: #ffd700;
    font-size: 0.9rem;
    font-weight: 600;
}

.friends-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary);
}

.friends-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.friends-tab.active {
    background: rgba(129, 140, 248, 0.1);
    color: var(--primary);
}

.friends-tab-content {
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

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

/* Запросы в друзья */
.requests-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.friend-request-item {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid rgba(56, 189, 248, 0.2);
}

.request-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.request-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.request-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.request-actions {
    display: flex;
    gap: 0.5rem;
}

.request-btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.accept-btn {
    background: #10b981;
    color: white;
}

.accept-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.reject-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.reject-btn:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
}

/* Поиск игроков */
.add-friend-container {
    padding: 1rem;
}

.search-section {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: white;
    font-size: 1rem;
}

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

.search-btn {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-result-item {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.player-result-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.player-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.player-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.player-id {
    font-size: 0.8rem;
    color: #94a3b8;
}

.add-friend-btn {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-friend-btn:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

.add-friend-btn:disabled {
    background: #6b7280;
    cursor: not-allowed;
    transform: none;
}

/* Список друзей */
.friends-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.friend-item {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.friend-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.friend-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.friend-details {
    flex: 1;
}

.friend-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.friend-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.status-online {
    color: #10b981;
}

.status-offline {
    color: #94a3b8;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background: #10b981;
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: #6b7280;
}

.friend-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.friend-coins {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #ffd700;
    font-weight: 600;
}

.remove-friend-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.remove-friend-btn:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #94a3b8;
}

.empty-state .material-symbols-rounded {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .friends-tabs {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .friends-tab {
        padding: 0.8rem;
        font-size: 0.8rem;
    }
    
    .friend-request-item,
    .player-result-item,
    .friend-item {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .request-actions,
    .friend-stats {
        width: 100%;
        justify-content: center;
    }
    
    .search-section {
        flex-direction: column;
    }
}

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


/* Обновленные стили для карточек игроков в поиске */
.player-result-item {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.player-result-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.player-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.player-details {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.player-id {
    font-size: 0.8rem;
    color: #94a3b8;
}

.player-title {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
}

/* Стили титулов как в лидерборде */
.player-title-default {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.player-title-admin {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.player-title-tester {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.player-title-special {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.player-username {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

/* Стили для карточек друзей */
.friend-item .friend-details {
    flex: 1;
}

.friend-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.friend-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.friend-title {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
}

.friend-title-default {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.friend-title-admin {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.friend-title-tester {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.friend-title-special {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.friend-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.status-online {
    color: #10b981;
}

.status-offline {
    color: #94a3b8;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background: #10b981;
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: #6b7280;
}

/* Кнопки действий */
.player-actions {
    display: flex;
    gap: 0.5rem;
}

.add-friend-btn {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.add-friend-btn:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

.add-friend-btn:disabled {
    background: #6b7280 !important;
    cursor: not-allowed;
    transform: none !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .player-result-item,
    .friend-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .player-info,
    .friend-info {
        flex-direction: column;
        text-align: center;
    }
    
    .player-meta,
    .friend-meta {
        justify-content: center;
    }
    
    .player-actions,
    .friend-stats {
        width: 100%;
        justify-content: center;
    }
}


/* Стили для кнопки игры с другом */
.friend-actions {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
    align-items: flex-end;
}

.play-friend-btn {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.play-friend-btn:hover:not(.disabled) {
    background: var(--secondary);
    transform: translateY(-2px);
}

.play-friend-btn.disabled {
    background: #6b7280;
    cursor: not-allowed;
    opacity: 0.5;
}

.play-friend-btn.disabled:hover {
    transform: none;
}

/* Модальное окно игры */
.game-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.game-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    text-align: center;
}

.game-timer {
    font-size: 3rem;
    font-weight: bold;
    color: #4fc3f7;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
}

.game-progress {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
}

.player-score {
    text-align: center;
    flex: 1;
}

.player-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.player-clicks {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
}

.game-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.bet-input {
    background: rgba(255,255,255,0.1);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 0.8rem;
    color: white;
    font-size: 1.1rem;
    text-align: center;
    width: 120px;
}

.time-select {
    background: rgba(255,255,255,0.1);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 0.8rem;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
}

.game-result {
    text-align: center;
    padding: 2rem;
}

.winner-badge {
    background: linear-gradient(45deg, #FFD700, #FFAA00);
    color: #8B6508;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1rem 0;
}

.prize-amount {
    color: #ffd700;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 1rem 0;
}


/* Дополнительные стили для игровой системы */
.game-settings {
    margin: 1.5rem 0;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 600;
}

.bet-info {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.3rem;
}

.invite-info {
    text-align: center;
    margin: 1.5rem 0;
}

.invite-details {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
}

.invite-details div {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.bet-amount {
    color: #ffd700;
    font-weight: bold;
}

.duration {
    color: #4fc3f7;
    font-weight: bold;
}

.vs-separator {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.game-instructions {
    text-align: center;
    margin: 1rem 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.final-scores {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
}

.final-scores div {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.winner-badge.winner {
    background: linear-gradient(45deg, #FFD700, #FFAA00);
    color: #8B6508;
}

.winner-badge.loser {
    background: linear-gradient(45deg, #6b7280, #9ca3af);
    color: white;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .game-progress {
        flex-direction: column;
        gap: 1rem;
    }
    
    .vs-separator {
        padding: 1rem 0;
    }
    
    .friend-actions {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }
    
    .play-friend-btn,
    .remove-friend-btn {
        font-size: 0.7rem;
        padding: 0.5rem 0.8rem;
    }
}

/* Анимации для игры */
@keyframes pulse-gold {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
    }
}

.game-coin {
    animation: pulse-gold 2s infinite;
}

.game-coin:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}


/* Стили для игровой кнопки */
.game-click-area {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    border: 2px solid var(--primary);
}

.game-coin {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    background: linear-gradient(145deg, #FFD700, #FFAA00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.game-coin:active {
    transform: scale(0.95);
}

.game-coin .coin-icon {
    font-size: 3rem;
    color: #8B6508;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.game-coin::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
}

/* Анимация пульсации для игровой кнопки */
@keyframes gameCoinPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
        transform: scale(1.05);
    }
}

.game-coin {
    animation: gameCoinPulse 2s infinite;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .game-coin {
        width: 100px;
        height: 100px;
    }
    
    .game-coin .coin-icon {
        font-size: 2.5rem;
    }
}


/* ===== Enhanced Game Settings Styles ===== */
.game-settings {
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid rgba(56, 189, 248, 0.2);
    backdrop-filter: blur(10px);
}

.setting-group {
    margin-bottom: 2rem;
    position: relative;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    display: block;
    margin-bottom: 1rem;
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-group label .material-symbols-rounded {
    color: var(--primary);
    font-size: 1.3rem;
}

/* Enhanced Bet Input */
.bet-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.bet-input-container:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

.bet-input {
    background: transparent;
    border: none;
    padding: 1rem;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    outline: none;
    font-family: 'Space Grotesk', monospace;
}

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

.bet-currency {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.bet-currency img {
    width: 20px;
    height: 20px;
}

/* Enhanced Time Select */
.time-select-container {
    position: relative;
}

.time-select {
    width: 100%;
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
}

.time-select:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.time-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

/* Time Options Grid */
.time-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.time-option {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(56, 189, 248, 0.3);
    border-radius: 10px;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text);
}

.time-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    background: rgba(56, 189, 248, 0.1);
}

.time-option.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.time-option .time-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.time-option .time-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Bet Quick Selection */
.bet-quick-options {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.bet-quick-option {
    flex: 1;
    min-width: 60px;
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(56, 189, 248, 0.3);
    border-radius: 10px;
    padding: 0.8rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text);
}

.bet-quick-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    background: rgba(56, 189, 248, 0.1);
}

.bet-quick-option.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

/* Slider for Bet Amount */
.bet-slider-container {
    margin-top: 1rem;
    padding: 1rem 0;
}

.bet-slider {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    background-size: 0% 100%;
    background-repeat: no-repeat;
}

.bet-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--primary);
    transition: all 0.3s ease;
}

.bet-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.6);
}

.bet-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.bet-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.6);
}

.bet-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Enhanced Game Controls */
.game-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.control-button {
    flex: 1;
    min-width: 140px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    padding: 1.2rem 2rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
}

.control-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.control-button:hover::before {
    left: 100%;
}

.control-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
}

.control-button:active {
    transform: translateY(-1px);
}

.control-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary);
    color: var(--text);
}

.control-button.secondary:hover {
    background: rgba(56, 189, 248, 0.1);
}

.control-button:disabled {
    background: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.control-button:disabled:hover::before {
    left: -100%;
}

/* Bet Info Styling */
.bet-info {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 0.8rem;
    text-align: center;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

/* Invite Section Styling */
.invite-section {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px solid rgba(56, 189, 248, 0.3);
    text-align: center;
}

.invite-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.invite-details {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.invite-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.invite-detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.invite-detail-label {
    color: #94a3b8;
    font-weight: 500;
}

.invite-detail-value {
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
}

.bet-amount {
    color: #ffd700;
}

.duration {
    color: #4fc3f7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-settings {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .time-options-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .bet-quick-options {
        gap: 0.5rem;
    }
    
    .bet-quick-option {
        min-width: 50px;
        padding: 0.6rem 0.3rem;
        font-size: 0.9rem;
    }
    
    .control-button {
        min-width: 120px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .bet-input {
        font-size: 1.1rem;
        padding: 0.8rem;
    }
    
    .bet-currency {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .time-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-controls {
        flex-direction: column;
    }
    
    .control-button {
        min-width: 100%;
    }
    
    .setting-group label {
        font-size: 1rem;
    }
    
    .invite-detail-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Animation for value changes */
@keyframes valueUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.value-updated {
    animation: valueUpdate 0.3s ease;
}

/* Glow effect for active elements */
.glow-effect {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

/* Loading state for buttons */
.control-button.loading {
    position: relative;
    color: transparent;
}

.control-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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


/* Добавить в существующие CSS стили */

/* Стили для игровых модальных окон */
.game-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.game-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    text-align: center;
    border: 3px solid var(--primary);
    animation: modalEnter 0.3s ease;
}

.game-timer {
    font-size: 3rem;
    font-weight: bold;
    color: #4fc3f7;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 20px rgba(79, 195, 247, 0.5);
}

.game-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
}

.player-score {
    text-align: center;
    flex: 1;
}

.player-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 1.1rem;
}

.player-clicks {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.vs-separator {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    padding: 0 1rem;
    text-shadow: 0 0 10px rgba(129, 140, 248, 0.3);
}

.game-click-area {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    border: 2px solid var(--primary);
}

.game-coin {
    width: 120px;
    height: 120px;
    margin: 1rem auto;
    background: linear-gradient(145deg, #FFD700, #FFAA00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
    animation: gameCoinPulse 2s infinite;
}

.game-coin:active {
    transform: scale(0.95);
}

.game-coin .coin-icon {
    font-size: 3rem;
    color: #8B6508;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

@keyframes gameCoinPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
        transform: scale(1.05);
    }
}

.game-instructions {
    text-align: center;
    margin: 1rem 0;
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.4;
}

.winner-badge {
    background: linear-gradient(45deg, #FFD700, #FFAA00);
    color: #8B6508;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.winner-badge.loser {
    background: linear-gradient(45deg, #6b7280, #9ca3af);
    color: white;
}

.prize-amount {
    color: #ffd700;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 1rem 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.final-scores {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: left;
}

.final-scores div {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .game-progress {
        flex-direction: column;
        gap: 1rem;
    }
    
    .vs-separator {
        padding: 1rem 0;
    }
    
    .game-coin {
        width: 100px;
        height: 100px;
    }
    
    .game-coin .coin-icon {
        font-size: 2.5rem;
    }
    
    .player-clicks {
        font-size: 2rem;
    }
    
    .game-timer {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .game-modal-content {
        padding: 1.5rem;
    }
    
    .game-timer {
        font-size: 2rem;
    }
    
    .winner-badge {
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
    }
}

/* Добавить в CSS если еще нет */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #94a3b8;
}

.empty-state .material-symbols-rounded {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

.empty-state p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Стили для уведомлений с красными точками */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
    animation: pulse 2s infinite;
}

.notification-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    border: 2px solid var(--surface);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Стили для кнопки друзей в меню */
.menu-item.notification {
    position: relative;
}

.menu-item.notification .notification-badge {
    top: 5px;
    right: 5px;
}

/* Стили для вкладок с уведомлениями */
.friends-tab.notification {
    position: relative;
}

.friends-tab.notification .notification-badge {
    top: 8px;
    right: 8px;
}


/* Стили для скрытия лишнего контента при открытой клавиатуре */
.keyboard-open .game-controls,
.keyboard-open .invite-section {
    display: none;
}

.keyboard-open .setting-group {
    margin-bottom: 1rem;
}
/* Добавьте в существующие стили */
.simple-game-settings {
    padding: 1rem;
}

.time-buttons, .bet-buttons {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.time-btn, .bet-btn {
    flex: 1;
    min-width: 80px;
    padding: 1rem 0.5rem;
    border: 2px solid var(--primary);
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.time-btn.active, .bet-btn.active {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.time-btn:hover, .bet-btn:hover {
    background: rgba(129, 140, 248, 0.2);
}

.game-info {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.info-item span:last-child {
    font-weight: 600;
    color: #ffd700;
}
.crystal-input {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 0.8rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.crystal-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.quick-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-btn {
    flex: 1;
    min-width: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.quick-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.balance-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.balance-info div {
    margin: 0.3rem 0;
}

.bet-slider {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

.bet-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.bet-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.slider-value-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.slider-min-max {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #94a3b8;
}
.bet-buttons {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.bet-btn {
    flex: 1;
    min-width: 80px;
    padding: 0.8rem 0.5rem;
    border: 2px solid var(--primary);
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.bet-btn.active {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.bet-btn:hover {
    background: rgba(129, 140, 248, 0.2);
}


/* Добавьте в существующие стили */
.invitations-container {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
    padding-right: 5px;
}

.invitations-container::-webkit-scrollbar {
    width: 6px;
}

.invitations-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.invitations-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.invitation-item {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border: 2px solid rgba(56, 189, 248, 0.3);
    transition: all 0.3s ease;
}

.invitation-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.invitation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.invitation-player {
    font-weight: 600;
    font-size: 1.1rem;
}

.invitation-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.invitation-detail {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.invitation-label {
    font-size: 0.8rem;
    color: #94a3b8;
}

.invitation-value {
    font-weight: 600;
    font-size: 1rem;
}

.invitation-actions {
    display: flex;
    gap: 0.5rem;
}
.final-scores {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.final-scores div {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
}

.winner-badge.winner {
    background: linear-gradient(45deg, #FFD700, #FFAA00);
    color: #8B6508;
}

.winner-badge.loser {
    background: linear-gradient(45deg, #6b7280, #9ca3af);
    color: white;
}

.prize-amount {
    color: #ffd700;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 1rem 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

