* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.game-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.score-board {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.score-item {
    text-align: center;
}

.score-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    transition: color 0.3s;
}

#timer {
    font-size: 2rem;
    font-weight: bold;
    color: #e67e22;
    transition: color 0.3s;
}

#timer.low {
    color: #e74c3c;
}

.score-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.target-color {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 20px auto;
    border: 4px solid #333;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 30px 0;
    width: 100%;
    max-width: 320px;
    justify-content: center;
}

.color-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.color-circle:hover {
    transform: scale(1.1);
    border-color: #333;
}

.color-circle.correct {
    animation: correctPulse 0.6s ease;
}

.color-circle.wrong {
    animation: wrongShake 0.6s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); border-color: #4CAF50; }
    100% { transform: scale(1); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.new-game-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.new-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.message {
    margin: 15px 0;
    font-size: 1.1rem;
    font-weight: bold;
    min-height: 25px;
}

.message.correct {
    color: #4CAF50;
}

.message.wrong {
    color: #f44336;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.25s ease;
}
.fade-in {
    opacity: 1;
    transition: opacity 0.35s ease;
}

@media (max-width: 700px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 220px;
        gap: 10px;
    }
    .color-circle, .target-color {
        width: 50px;
        height: 50px;
    }
    .game-container {
        padding: 10px;
        max-width: 95vw;
    }
    h1 {
        font-size: 1.3rem;
    }
}

/* Neue Klassen für ausgelagerte Styles */
.dark-mode-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 20px;
    font-size: 1rem;
    z-index: 10;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s;
}
.dark-mode-btn:hover {
    background: #444;
}

.share-btn {
    margin: 10px 0 20px 0;
    padding: 8px 20px;
    font-size: 1rem;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.2s;
}
.share-btn:hover {
    background: #764ba2;
}

.color-input {
    margin-bottom: 10px;
    padding: 5px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    width: 80%;
    box-sizing: border-box;
}

.check-btn {
    padding: 5px 15px;
    font-size: 1rem;
    background: #764ba2;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.2s;
}
.check-btn:hover {
    background: #667eea;
}
