@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700&display=swap');

:root {
    --primary: #ff75c3;
    --secondary: #ffa647;
    --accent: #ffe83f;
    --bg-gradient: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%);
    --glass: rgba(255, 255, 255, 0.7);
}

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

body {
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
    background: var(--bg-gradient);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
    touch-action: none; /* Verhindert Scrollen/Zoomen beim Spielen */
}

/* --- MOBILE OPTIMIERUNG --- */
@media (max-width: 768px) {
    #ui-layer {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        gap: 10px;
    }

    .stat-card {
        padding: 0.5rem 1rem;
        border-radius: 15px;
        min-width: auto;
    }

    .stat-label {
        font-size: 0.5rem;
    }

    .stat-value {
        font-size: 0.9rem;
    }

    #turbo-bar-bg {
        width: 80px;
    }

    .modal {
        padding: 2rem;
        max-width: 90vw;
    }

    h1 {
        font-size: 1.8rem;
    }

    p {
        font-size: 0.9rem;
    }

    button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

#ui-layer {
    position: absolute;
    top: 2rem;
    left: 2rem;
    right: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 2px solid white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(255, 117, 195, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 0.1rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

#start-screen {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: center;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.modal {
    background: white;
    padding: 3rem;
    border-radius: 40px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    animation: floating 3s ease-in-out infinite;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

button {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem 3rem;/* --- ORIENTIERUNGS-HINWEIS --- */
#rotate-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    display: none; /* Standardmäßig aus */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

#rotate-overlay p {
    color: #333;
    font-size: 1.2rem;
}

.rotate-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: rotate-anim 2s infinite ease-in-out;
}

@keyframes rotate-anim {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-90deg); }
}

/* Nur auf Handys im Hochformat anzeigen */
@media screen and (max-width: 900px) and (orientation: portrait) {
    #rotate-overlay {
        display: flex;
    }
}
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    pointer-events: auto;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 117, 195, 0.4);
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* --- TURBO STYLES --- */
#turbo-card {
    border-color: #00ffff !important;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    min-width: 180px;
}

#turbo-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    margin-top: 5px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.3);
}

#turbo-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #fff, #00ffff);
    background-size: 200% 100%;
    animation: turbo-shimmer 1.5s linear infinite;
    transition: width 0.1s linear;
}

@keyframes turbo-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
