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

body {
    font-family: system-ui, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.game-container {
    width: 100%;
    max-width: 400px;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.level-container, .score-container, .moves-container {
    text-align: center;
}

.level-label, .score-label, .moves-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.level-value, .score-value, .moves-value {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.target-area {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.target-label {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 10px;
}

.target-color {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.target-hex {
    font-size: 14px;
    color: #fff;
    font-family: monospace;
}

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

.current-color {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: background-color 0.1s ease;
}

.color-sliders {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-group label {
    color: #fff;
    font-size: 14px;
    min-width: 60px;
}

.slider-group input[type="range"] {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 4px;
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
}

#redSlider {
    background: linear-gradient(to right, #000, #ff0000);
}

#redSlider::-webkit-slider-thumb {
    background: #ff0000;
}

#greenSlider {
    background: linear-gradient(to right, #000, #00ff00);
}

#greenSlider::-webkit-slider-thumb {
    background: #00ff00;
}

#blueSlider {
    background: linear-gradient(to right, #000, #0000ff);
}

#blueSlider::-webkit-slider-thumb {
    background: #0000ff;
}

.accuracy-bar {
    margin-bottom: 20px;
    padding: 0 10px;
}

.accuracy-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.accuracy-meter {
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.accuracy-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff4444, #ffaa00, #44ff44);
    transition: width 0.3s ease;
}

.accuracy-value {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.start-overlay, .result-overlay, .gameover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 100;
}

.hidden {
    display: none !important;
}

.game-title {
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.instructions {
    font-size: 16px;
    color: #aaa;
    text-align: center;
    margin-bottom: 10px;
}

.start-btn, .next-btn, .retry-btn {
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.start-btn:hover, .next-btn:hover, .retry-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.result-title {
    font-size: 32px;
    font-weight: bold;
    color: #4ade80;
    margin-bottom: 20px;
}

.result-title.good {
    color: #fbbf24;
}

.result-title.okay {
    color: #f97316;
}

.result-accuracy, .result-points {
    font-size: 20px;
    color: #fff;
    margin-bottom: 10px;
}

.gameover-title {
    font-size: 32px;
    font-weight: bold;
    color: #ef4444;
    margin-bottom: 20px;
}

.final-score, .final-level {
    font-size: 20px;
    color: #fff;
    margin-bottom: 10px;
}

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

.submit-btn {
    animation: pulse 2s infinite;
}
