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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: white;
    padding: 0;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 15px;
}

.header {
    text-align: center;
    margin-bottom: 15px;
    padding-top: 10px;
}

.header h1 {
    font-size: 24px;
    font-weight: bold;
    color: #4CC9F0;
    margin-bottom: 5px;
}

.balance-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid rgba(76, 201, 240, 0.3);
    position: relative;
}

.balance-amount {
    font-size: 28px;
    font-weight: bold;
    color: #4CC9F0;
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
}

.coin-section {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.click-coin {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: 
        0 15px 35px rgba(33, 150, 243, 0.4),
        inset 0 -8px 15px rgba(0,0,0,0.3),
        inset 0 8px 15px rgba(255,255,255,0.3);
    border: 4px solid #64B5F6;
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    will-change: transform;
    backface-visibility: hidden;
}

.click-coin:active {
    transform: scale(0.95);
    box-shadow: 
        0 8px 25px rgba(33, 150, 243, 0.6),
        inset 0 -5px 12px rgba(0,0,0,0.4);
}

.click-coin::before {
    content: '';
    position: absolute;
    width: 92%;
    height: 92%;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
}

.coin-letter {
    font-size: 72px;
    font-weight: bold;
    color: white;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
    font-family: 'Arial', sans-serif;
}

.click-info {
    margin-top: 15px;
    font-size: 16px;
    color: rgba(255,255,255,0.9);
}

.click-value {
    font-weight: bold;
    color: #4CAF50;
    font-size: 18px;
}

.income-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
}

.stat-value {
    color: #4CAF50;
    font-weight: bold;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

/* Исправленные стили для 6 плашек главного меню */
.main-menu {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.menu-button {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(76, 201, 240, 0.3);
    border-radius: 12px;
    padding: 12px 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 70px;
    backdrop-filter: blur(10px);
    font-size: 12px;
}

.menu-button:hover {
    background: rgba(76, 201, 240, 0.15);
    transform: translateY(-2px);
    border-color: #4CC9F0;
}

.menu-icon {
    font-size: 20px;
}

.menu-text {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.shop-tabs {
    display: flex;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 5px;
    gap: 5px;
}

.shop-tab {
    flex: 1;
    background: none;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.shop-tab.active {
    background: #2196F3;
    font-weight: bold;
}

.shop-category {
    margin-bottom: 20px;
}

.category-title {
    font-size: 16px;
    font-weight: bold;
    color: #2196F3;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(33, 150, 243, 0.3);
}

.upgrade-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

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

.upgrade-name {
    font-weight: bold;
    color: #2196F3;
    font-size: 14px;
}

.upgrade-owned {
    color: #FF9800;
    font-size: 12px;
}

.upgrade-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 10px;
}

.upgrade-bonus {
    color: #4CAF50;
}

.upgrade-price {
    color: #F44336;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.buy-button {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    width: 100%;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.buy-button:hover {
    background: linear-gradient(135deg, #1976D2, #2196F3);
}

.buy-button:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.hidden {
    display: none;
}

.tab-content {
    max-height: 500px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

.back-button {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 15px;
    width: 100%;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.cooldown {
    pointer-events: none;
    opacity: 0.7;
}

.leaderboard {
    max-height: 500px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

.rating-tabs {
    display: flex;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 5px;
    gap: 5px;
}

.rating-tab {
    flex: 1;
    background: none;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s ease;
}

.rating-tab.active {
    background: #2196F3;
    font-weight: bold;
}

.leader-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    margin: 6px 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.leader-item.current-player {
    background: rgba(76, 201, 240, 0.2);
    border: 2px solid #4CC9F0;
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.5);
    transform: scale(1.02);
}

.leader-rank {
    font-weight: bold;
    color: #2196F3;
    margin-bottom: 5px;
    font-size: 14px;
}

.leader-name {
    font-weight: bold;
    color: #4CC9F0;
    margin-bottom: 3px;
}

.leader-name.current-player {
    color: #4CC9F0;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(76, 201, 240, 0.7);
}

.leader-balance {
    color: #4CAF50;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 14px;
}

.leader-speed {
    color: #FF9800;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.lottery-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.lottery-title {
    font-size: 18px;
    font-weight: bold;
    color: #2196F3;
    margin-bottom: 10px;
    text-align: center;
}

.team-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.team-button {
    background: rgba(255,255,255,0.1);
    border: 2px solid #2196F3;
    color: white;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.team-button.active {
    background: #2196F3;
    transform: scale(1.05);
}

.team-button.eagle {
    border-color: #FF5722;
}

.team-button.eagle.active {
    background: #FF5722;
}

.team-button.tails {
    border-color: #4CAF50;
}

.team-button.tails.active {
    background: #4CAF50;
}

.bet-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #2196F3;
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    margin-bottom: 10px;
    outline: none;
}

.play-button {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.lottery-timer {
    background: rgba(255, 165, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin: 10px 0;
    font-weight: bold;
    color: #FFA500;
}

.lottery-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
}

.lottery-stat {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.lottery-stat.eagle {
    border-left: 3px solid #FF5722;
}

.lottery-stat.tails {
    border-left: 3px solid #4CAF50;
}

.stat-percentage {
    font-size: 18px;
    font-weight: bold;
    margin: 5px 0;
}

.stat-amount {
    font-size: 14px;
    color: #ccc;
}

.participants {
    max-height: 200px;
    overflow-y: auto;
    margin: 10px 0;
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

.participant-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    margin: 5px 0;
    border-radius: 6px;
    font-size: 12px;
    border-left: 3px solid #2196F3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.participant-item.current-player {
    border: 2px solid #4CC9F0;
    background: rgba(76, 201, 240, 0.1);
    transform: scale(1.02);
}

.participant-item.eagle {
    border-left-color: #FF5722;
}

.participant-item.tails {
    border-left-color: #4CAF50;
}

.participant-bet {
    color: #4CAF50;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.last-winner {
    background: rgba(255, 215, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
    border: 1px solid #FFD700;
}

.winner-team {
    font-weight: bold;
    color: #FFD700;
    margin: 5px 0;
}

.winner-prize {
    color: #4CAF50;
    font-weight: bold;
}

.click-popup {
    position: fixed !important;
    color: #4CAF50;
    font-weight: bold;
    font-size: 18px;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
    font-family: 'Courier New', monospace;
    z-index: 10000;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    -webkit-user-select: none;
    user-select: none;
    transform: translate(-50%, -50%);
}

.transfer-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #2196F3;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    margin-bottom: 15px;
    outline: none;
}

.users-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

.user-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.user-item.selected {
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196F3;
}

.user-name {
    font-weight: bold;
    color: #4CC9F0;
    margin-bottom: 5px;
}

.user-balance {
    color: #4CAF50;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.transfer-amount-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #2196F3;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
    margin-bottom: 15px;
    outline: none;
    text-align: center;
}

.transfer-button {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    border: none;
    color: white;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: bold;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.transfer-button:hover {
    background: linear-gradient(135deg, #F57C00, #FF9800);
}

.transfer-button:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

@keyframes floatUp {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -100%) scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -150%) scale(1.2);
        opacity: 0;
    }
}

.anti-cheat {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    flex-direction: column;
}

.anti-cheat-message {
    background: #f44336;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
    margin: 20px;
}

.api-status {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 10px;
    z-index: 1000;
}

.api-status.connected {
    background: #4CAF50;
    color: white;
}

.api-status.disconnected {
    background: #f44336;
    color: white;
}

.api-status.syncing {
    background: #FF9800;
    color: white;
}

.participant-time {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.games-tabs {
    display: flex;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 5px;
    gap: 5px;
}

.game-tab {
    flex: 1;
    background: none;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.game-tab.active {
    background: #2196F3;
    font-weight: bold;
}

.game-section {
    display: none;
}

.game-section.active {
    display: block;
}

.lottery-game {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.lottery-timer-large {
    background: linear-gradient(135deg, #FF5722, #FF9800);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin: 15px 0;
    font-weight: bold;
    color: white;
    font-size: 18px;
}

.lottery-pot {
    background: rgba(255, 215, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin: 10px 0;
    border: 1px solid #FFD700;
}

.lottery-history {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    margin: 5px 0;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.history-item.lost {
    border-left-color: #f44336;
}

.result-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 10000;
    border: 3px solid #FFD700;
    display: none;
}

.result-popup.win {
    border-color: #4CAF50;
}

.result-popup.lose {
    border-color: #f44336;
}

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

.result-text {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-amount {
    font-size: 20px;
    color: #4CAF50;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.referral-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.referral-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
}

.referral-stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.referral-link {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

.share-button {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.top-winners {
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

.winner-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.winner-rank {
    font-weight: bold;
    color: #FFD700;
    font-size: 16px;
    min-width: 30px;
}

.winner-name {
    flex: 1;
    margin: 0 10px;
}

.winner-amount {
    color: #4CAF50;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.nav-tabs {
    display: flex;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 5px;
    gap: 5px;
}

.nav-tab {
    flex: 1;
    background: none;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.nav-tab.active {
    background: #2196F3;
    font-weight: bold;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    max-width: 300px;
    border-left: 4px solid #4CC9F0;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-left-color: #8BC34A;
}

.notification.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-left-color: #FF9800;
}

.notification.warning {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    border-left-color: #FFC107;
}

.notification h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: bold;
}

.notification p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* POPUP для игр - исправленные стили */
.games-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.games-popup-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 350px;
    border: 2px solid #4CC9F0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.games-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(76, 201, 240, 0.3);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px 20px 0 0;
}

.games-popup-header h3 {
    color: #4CC9F0;
    margin: 0;
    font-size: 18px;
}

.close-popup {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-popup:hover {
    background: rgba(255, 255, 255, 0.1);
}

.games-popup-body {
    padding: 20px;
}

.game-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.game-option:hover {
    background: rgba(76, 201, 240, 0.1);
    border-color: #4CC9F0;
    transform: translateX(5px);
}

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

.game-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(76, 201, 240, 0.1);
    border-radius: 10px;
}

.game-info {
    flex: 1;
}

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

.game-desc {
    font-size: 11px;
    color: #ccc;
    line-height: 1.3;
}

/* Стили для реферальной системы */
.referral-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 0 10px;
}

.referral-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.referral-header h2 {
    color: #4CC9F0;
    margin-bottom: 8px;
    font-size: 20px;
}

.referral-header p {
    color: #ccc;
    font-size: 14px;
}

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

.referral-stat-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(76, 201, 240, 0.3);
    transition: all 0.3s ease;
}

.referral-stat-card:hover {
    transform: translateY(-2px);
    border-color: #4CC9F0;
}

.stat-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(76, 201, 240, 0.1);
    border-radius: 10px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #4CC9F0;
    font-family: 'Courier New', monospace;
    margin-bottom: 2px;
}

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

.referral-link-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.link-title {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 10px;
    text-align: center;
}

.link-code {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #4CC9F0;
    word-break: break-all;
    margin-bottom: 15px;
    border: 1px solid rgba(76, 201, 240, 0.2);
    font-size: 12px;
    text-align: center;
}

.copy-link-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 600;
}

.copy-link-btn:hover {
    background: linear-gradient(135deg, #1976D2, #2196F3);
    transform: translateY(-1px);
}

.copy-link-btn:active {
    transform: translateY(0);
}

.referral-rules {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(76, 201, 240, 0.2);
}

.referral-rules h4 {
    color: #4CC9F0;
    margin-bottom: 12px;
    font-size: 16px;
    text-align: center;
}

.referral-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.referral-rules li {
    padding: 8px 0;
    color: #ccc;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.referral-rules li:last-child {
    border-bottom: none;
}

.referral-rules li::before {
    content: "•";
    color: #4CC9F0;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Каталог */
.catalog-container {
    text-align: center;
    padding: 40px 20px;
}

.catalog-container h2 {
    color: #4CC9F0;
    margin-bottom: 15px;
    font-size: 22px;
}

.catalog-container p {
    color: #ccc;
    font-size: 14px;
}

/* Стили для участников с аватарками */
.participant-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    margin: 8px 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border-left: 3px solid #2196F3;
}

.participant-item.current-player {
    border: 2px solid #4CC9F0;
    background: rgba(76, 201, 240, 0.1);
    transform: scale(1.02);
}

.participant-item.eagle {
    border-left-color: #FF5722;
}

.participant-item.tails {
    border-left-color: #4CAF50;
}

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(76, 201, 240, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.participant-avatar:hover {
    transform: scale(1.1);
    border-color: #4CC9F0;
}

.participant-info {
    flex: 1;
    min-width: 0;
}

.participant-name {
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-name.current-player {
    color: #4CC9F0;
    text-shadow: 0 0 10px rgba(76, 201, 240, 0.7);
}

.participant-time {
    font-size: 11px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

.participant-bet {
    color: #4CAF50;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    text-align: right;
}

/* Анимация появления новой ставки */
@keyframes newBet {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.new-bet {
    animation: newBet 0.5s ease-out;
}

/* Таймер ставки */
.bet-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
}

.timer-icon {
    font-size: 10px;
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .main-menu {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .menu-button {
        padding: 10px 6px;
        min-height: 65px;
    }
    
    .menu-icon {
        font-size: 18px;
    }
    
    .menu-text {
        font-size: 10px;
    }
    
    .games-popup-content {
        width: 95%;
        max-width: 320px;
    }
    
    .referral-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .referral-stat-card {
        padding: 12px;
    }
    
    .participant-item {
        padding: 8px;
        gap: 8px;
    }
    
    .participant-avatar {
        width: 35px;
        height: 35px;
    }
    
    .participant-name {
        font-size: 11px;
    }
    
    .participant-bet {
        font-size: 11px;
    }
}
