* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated starfield background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 80px 10px, white, transparent),
        radial-gradient(2px 2px at 130px 80px, white, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: starfield 120s linear infinite;
    opacity: 0.3;
    z-index: -1;
}

@keyframes starfield {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-200px);
    }
}

.auth-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(15, 15, 35, 0.9) 100%);
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.auth-container h2 {
    color: #4CAF50;
    margin-bottom: 20px;
    font-size: 28px;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.auth-container input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: rgba(34, 34, 34, 0.8);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: white;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.auth-container input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.auth-container button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.auth-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.auth-container a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-container a:hover {
    color: #66BB6A;
}

.error {
    color: #ff6b6b;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.success {
    color: #4CAF50;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Game Container - Responsive */
.game-container {
    text-align: center;
    padding: 20px;
    max-width: 1900px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* Player Info - Responsive */
.player-info {
    font-size: clamp(14px, 1.5vw, 20px);
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.5vw, 20px);
}

.player-avatar {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.player-avatar:hover {
    transform: scale(1.1);
}

.player-avatar img,
.player-avatar span {
    width: clamp(30px, 3.5vw, 60px) !important;
    height: clamp(30px, 3.5vw, 60px) !important;
    border-radius: 50%;
    border: 2px solid #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.player-info .welcome-text {
    color: #ffffff;
    margin-right: 15px;
}

.player-info a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.player-info a:hover {
    color: #66BB6A;
}

.logout-link {
    color: #ff6b6b !important;
    margin-left: 10px;
}

.logout-link:hover {
    color: #ff8787 !important;
}

.game-stats {
    display: flex;
    gap: 30px;
    font-size: 20px;
    font-weight: bold;
}

.game-stats div {
    padding: 10px 20px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.game-stats div:hover {
    background: rgba(76, 175, 80, 0.3);
    transform: translateY(-2px);
}

.game-stats span {
    color: #4CAF50;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

/* Game Canvas */
#gameCanvas {
    border: 3px solid #4CAF50;
    border-radius: 15px;
    background: #000;
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.3);
    display: block;
    margin: 0 auto;
}

/* Pause Indicator */
.pause-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.9) 0%, rgba(200, 0, 0, 0.9) 100%);
    color: white;
    padding: 30px 50px;
    border-radius: 15px;
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    display: none;
    z-index: 10;
    box-shadow: 0 8px 32px rgba(255, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Game Over */
#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(15, 15, 35, 0.95) 100%);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

#gameOver h2 {
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 36px;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.hidden {
    display: none;
}

#gameOver button {
    padding: 15px 30px;
    margin: 10px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

#gameOver button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Play Now Button - Responsive */
.play-now-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    width: 80%;
    max-width: 400px;
    text-align: center;
}

.blinking-button {
    width: 100%;
    padding: clamp(15px, 4vw, 25px) clamp(30px, 8vw, 50px);
    font-size: clamp(16px, 4vw, 28px);
    font-weight: bold;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
    border: none;
    border-radius: clamp(8px, 2vw, 15px);
    cursor: pointer;
    animation: pulse 2s infinite;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    text-transform: uppercase;
    letter-spacing: clamp(1px, 0.3vw, 2px);
    transition: all 0.3s ease;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(76, 175, 80, 0.6);
    }
}

.blinking-button:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    animation: none;
    transform: scale(1.1);
}

/* Mobile adjustments for button */
@media (max-width: 768px) {
    .play-now-button {
        width: 90%;
        max-width: 300px;
    }
    
    .blinking-button {
        padding: clamp(12px, 3.5vw, 20px) clamp(25px, 6vw, 40px);
        font-size: clamp(14px, 3.5vw, 22px);
    }
}

@media (max-width: 425px) {
    .play-now-button {
        width: 95%;
        max-width: 250px;
    }
    
    .blinking-button {
        padding: clamp(10px, 3vw, 18px) clamp(20px, 5vw, 35px);
        font-size: clamp(12px, 3vw, 18px);
        letter-spacing: 0.5px;
    }
}

.game-over-choices {
    margin-top: 25px;
}

.game-over-choices p {
    margin-bottom: 20px;
    font-size: 20px;
    color: #ffffff;
}

/* Leaderboard */
.leaderboard-section {
    margin-top: 50px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(15, 15, 35, 0.8) 100%);
    border-radius: 15px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.leaderboard-section h2 {
    color: #4CAF50;
    margin-bottom: 25px;
    font-size: 32px;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.leaderboard-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table th {
    background: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
    font-weight: bold;
    font-size: 18px;
}

.leaderboard-table tr:hover {
    background: rgba(76, 175, 80, 0.1);
}

.rank-1 {
    color: gold;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-2 {
    color: silver;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.rank-3 {
    color: #cd7f32;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

/* Responsive Design - Use new system from game.php */
@media (max-width: 1200px) {
    .auth-container {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 10px;
    }

    .game-title-section {
        margin-bottom: 10px;
    }

}

/* Hide touch controls on desktop - REMOVED */
/* Touch controls removed for desktop-only experience */

/* Landscape mobile adjustments - REMOVED */
/* Mobile responsiveness removed for desktop-only experience */