/* 🌈 Kinderspiele - Modernes Design 2026 */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

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

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* === HEADER === */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    margin-bottom: 10px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

header p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
}

/* === GAME CONTAINER (used in individual games) === */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.game-header p {
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
}

/* === SCORE BOARD === */
.score-board {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    min-width: 400px;
    gap: 10px;
}

.score-item {
    text-align: center;
}

.score-item .label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 4px;
}

.score-item .value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}

/* === BUTTONS === */
.btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 8px;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102,126,234,0.5);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn.secondary {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: none;
    color: rgba(255,255,255,0.9);
}

.btn.secondary:hover {
    background: rgba(255,255,255,0.2);
    box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}

/* === GAME CONTROLS === */
.game-controls {
    text-align: center;
    margin: 24px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

/* === BACK LINK === */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.05);
}
.back-link:hover {
    color: white;
    background: rgba(255,255,255,0.12);
}

/* === HIGHSCORES (inside games) === */
.highscores {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 30px;
}

.highscores h2 {
    text-align: center;
    color: white;
    font-weight: 800;
    margin-bottom: 20px;
}

.highscore-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin: 8px 0;
    background: rgba(255,255,255,0.06);
    border-radius: 14px;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.highscore-item:hover {
    background: rgba(255,255,255,0.12);
    transform: translateX(4px);
}

.highscore-item.memory { border-left-color: #ff6b6b; }
.highscore-item.snake { border-left-color: #4ecdc4; }
.highscore-item.puzzle { border-left-color: #96ceb4; }
.highscore-item.click { border-left-color: #fef65b; }
.highscore-item.jump { border-left-color: #ff9ff3; }
.highscore-item.racing { border-left-color: #ff6500; }

/* === TIMER === */
.timer {
    color: #ff6b6b !important;
}

/* === GAME MESSAGE (toast notifications) === */
.game-message {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 28px;
    border-radius: 20px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 9999;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(0.9); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .container { padding: 15px; }
    header h1 { font-size: 2rem; }
    .score-board {
        flex-direction: column;
        gap: 15px;
        min-width: auto;
        width: 100%;
    }
    .score-item .value { font-size: 1.3rem; }
    .btn { padding: 12px 22px; font-size: 1rem; }
}

@media (max-width: 480px) {
    header h1 { font-size: 1.5rem; }
    .game-header h1 { font-size: 1.8rem; }
    .btn { padding: 10px 18px; font-size: 0.95rem; }
}
