* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.language-selector {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.4);
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

main {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 30px;
    align-items: start;
}

.game-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.game-info > div {
    text-align: center;
}

.game-info span {
    font-size: 1.2rem;
    font-weight: 600;
}

#score, #timer, #reaction {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
}

.game-area {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    height: 500px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
}

.start-screen, .game-over-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 400px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.start-btn, .restart-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    margin-bottom: 30px;
}

.start-btn:hover, .restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5);
}

.difficulty-selector {
    margin-top: 30px;
}

.difficulty-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.diff-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.diff-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.diff-btn.active {
    background: rgba(255, 255, 255, 0.4);
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.target {
    position: absolute;
    background: radial-gradient(circle, #ff6b6b 0%, #ff5252 100%);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.5);
    animation: pulse 1s infinite;
}

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

.target:hover {
    transform: scale(1.1);
}

.target.hit {
    background: radial-gradient(circle, #51cf66 0%, #2ecc71 100%);
    animation: hit 0.3s ease-out;
}

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

.final-stats {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.final-stats p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.high-scores {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#highScoresList {
    list-style: none;
    font-size: 1.1rem;
}

#highScoresList li {
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

#highScoresList li:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

#highScoresList li:first-child {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0.1) 100%);
    font-weight: 700;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .high-scores {
        margin-top: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .language-selector {
        position: static;
        justify-content: center;
        margin-top: 15px;
    }
    
    .game-area {
        height: 400px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 15px;
    }
}