/* Font or Cheese */

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

body {
    font-family: 'Fira Sans', sans-serif;
    background-color: var(--clr-background);
    color: var(--clr-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* H1 in game-area - Zeile 1: font oder cheese */
.game-area h1 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--clr-primary);
    margin-bottom: 15px;
    font-variant: small-caps;
    text-transform: uppercase;
    text-align: center;
}

/* Leaderboard Link */
.leaderboard-link {
    font-size: 0.6rem;
    font-weight: 300;
    color: var(--clr-primary);
 
    text-align: center;
    display: block;
    margin-top: 30px;

    position: relative;
}

.leaderboard-link:hover {
    color: var(--clr-primary-accent);
}



@keyframes wave {
    0%, 100% {
        transform: translateX(-50%) scaleX(1);
    }
    50% {
        transform: translateX(-50%) scaleX(0.8);
    }
}


/* Game Area */
.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Game Screen - 4-Zeilen Layout */
.game-screen {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Zeile 2: Das Wort */
.word-display {
    margin-bottom: 15px;
}

.word-display h2 {
    font-size: 8rem;
    font-weight: 300;
    color: var(--clr-text);
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

/* Zeile 3: Zeit und Punkte */
.score-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--clr-text-muted);
    font-variant: small-caps;
    text-transform: uppercase;
    margin-bottom: 68px;
}

.button-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.choice-btn {
    background: transparent;
    border: 2px solid var(--clr-primary);
    color: var(--clr-primary);
    padding: 15px 20px;
    font-size: 1.8rem;
    font-weight: 400;
    font-family: 'Fira Sans', sans-serif;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 180px;
}

.choice-btn:hover {
    background-color: var(--clr-primary);
    color: var(--clr-on-primary);
    transform: translateY(-2px);
}

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

/* End Screen */
.end-screen {
    text-align: center;
    width: 100%;
}

/* Zeile 1: Spiel beendet */
.end-screen h2 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--clr-primary);
    margin-bottom: 30px;
    font-variant: small-caps;
    text-transform: uppercase;
    text-align: center;
}

/* Final Score */
.final-score {
    margin-bottom: 10px;
}

.final-score p {
    font-size: 1rem;
    font-weight: 300;
    color: var(--clr-text);
}

.score-label {
    font-weight: 700;
    background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s ease-in-out infinite;
}

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

/* Zeile 2: Name und Eintragen Button */
.name-input-section {
    margin-bottom: 15px;
}


.name-input-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.name-input-container input {
    padding: 8px 12px;
    border: 1px solid var(--clr-gray-border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: 'Fira Sans', sans-serif;
    background-color: var(--clr-surface);
    color: var(--clr-text);
}

.name-input-container button {
    background-color: var(--clr-primary);
    color: var(--clr-on-primary);
    border: none;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 400;
    font-family: 'Fira Sans', sans-serif;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.name-input-container button:hover {
    background-color: var(--clr-primary-accent);
}

/* Zeile 3: Bestenliste (wird nach Name-Eingabe eingeblendet) */
.hall-of-fame {
    margin-top: 35px;
    margin-bottom: 30px;
    display: block; /* Standardmäßig sichtbar */
}

.hall-of-fame.hidden {
    display: none; /* Versteckt wenn hidden Klasse vorhanden */
}

.hall-of-fame h3 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--clr-primary);
    margin-bottom: 20px;
    font-variant: small-caps;
    text-transform: uppercase;
    text-align: center;
}

.hall-of-fame ol {
    text-align: left;
    font-weight: 300;
    color: var(--clr-text);
    font-size: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.hall-of-fame li {
    padding: 8px 12px;
    border-bottom: 1px solid var(--clr-primary);
    margin-bottom: 0;
}

/* Alternierende Hintergründe */
.hall-of-fame li:nth-child(odd) {
    background-color: color-mix(in srgb, var(--clr-primary) 5%, transparent);
}

.hall-of-fame li:nth-child(even) {
    background-color: transparent;
}

.hall-of-fame li:last-child {
    border-bottom: none;
}

/* Buttons */
.start-btn, .restart-btn {
    background: transparent;
    border: 1px solid var(--clr-primary);
    color: var(--clr-primary);
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 400;
    font-family: 'Fira Sans', sans-serif;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn {
    margin-top: 10px;
}

.start-btn:hover, .restart-btn:hover {
    background-color: var(--clr-primary);
    color: var(--clr-on-primary);
    transform: translateY(-2px);
}

/* Feedback Overlay */
.feedback-overlay {
    position: fixed;
    top: -60px;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
}

.feedback-overlay span {
    font-size: 20rem;
    font-weight: 900;
    color: var(--clr-primary);
    animation: feedbackPulse 0.5s ease-out;
}

.feedback-overlay.negative span {
    color: var(--clr-error);
}

@keyframes feedbackPulse {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    /* H1 - 2px kleiner */
    .game-area h1 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    /* Leaderboard Link - 2px kleiner */
    .leaderboard-link {
        font-size: 0.9rem;
    }
    
    /* Wort - bleibt gleich */
    .word-display h2 {
        font-size: 7.75rem;
    }
    
    /* Score Display - 2px kleiner */
    .score-display {
        font-size: 1.2rem;
        gap: 20px;
        margin-bottom: 46px;
    }
    
    /* Buttons - 2px kleiner */
    .choice-btn {
        font-size: 1.8rem;
        padding: 20px 25px;
        width: 200px;
    }
    
    .button-container {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        justify-content: center;
    }
    
    /* End Screen - 2px kleiner */
    .end-screen h2 {
        font-size: 1.3rem;
    }
    
    .final-score p {
        font-size: 1.3rem;
    }
    
    .hall-of-fame h3 {
        font-size: 1.3rem;
    }
    
    .hall-of-fame li {
        font-size: 1.3rem;
        padding: 10px 15px;
    }
    
    
    .name-input-container input,
    .name-input-container button {
        font-size: 1.3rem;
        padding: 10px 15px;
    }
    
    .restart-btn {
        font-size: 1.3rem;
        padding: 15px 30px;
    }
    
    
    .name-input-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .name-input-container input,
    .name-input-container button {
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 480px) {
    /* Wort - angepasst für sehr kleine Bildschirme */
    .word-display h2 {
        font-size: 3.75rem;
    }
    
    /* Buttons - angepasst für sehr kleine Bildschirme */
    .choice-btn {
        padding: 15px 15px;
        font-size: 1.4rem;
        width: 140px;
    }
    
    /* Score Display - angepasst */
    .score-display {
        font-size: 1.1rem;
    }
    
    /* H1 - angepasst */
    .game-area h1 {
        font-size: 1.2rem;
    }
    
    /* Leaderboard Link - angepasst */
    .leaderboard-link {
        font-size: 0.8rem;
    }
}

