:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --accent-color: #0A54E5; /* Helleres Blau für Dunkelmodus */
    --accent-light: #1e293b;
    --error-color: #f87171;
    --success-color: #4ade80;
    --sub-color: #94a3b8;
    --card-bg: #1e293b;
    --font-main: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --nav-height: 80px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.navbar {
    height: var(--nav-height);
    background-color: #1e293b;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
    pointer-events: none; /* Verhindert Rechtsklick und Ziehen direkt auf dem Bild */
}

.navbar .logo {
    height: 40px; /* Kleinere Höhe für die Navbar */
    pointer-events: auto;
}

.footer-logo {
    height: 35px; /* Noch etwas kleiner für den Footer */
    margin-bottom: 1rem;
    opacity: 0.8;
    pointer-events: auto;
}

.navbar .logo img, .footer-logo img {
    height: 100%;
    width: auto; /* Breite proportional beibehalten */
    object-fit: contain;
    pointer-events: none;
}

.container {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

header p {
    color: var(--sub-color);
    font-size: 1.1rem;
}

#stats-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: center;
    position: relative;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    padding: 1rem;
    background: var(--accent-light);
    border-radius: 12px;
}

.stat .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

.stat .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    font-family: var(--font-mono);
}

/* Spezial-Zentrierung für den Timer */
.stat:first-child {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    padding: 0;
}

.stat:first-child .label {
    display: none; /* Label verstecken für minimalistischen Look */
}

.stat:first-child .value {
    font-size: 3rem;
    color: var(--accent-color);
}

.stat.hidden-during-play {
    visibility: hidden;
}

.word-display {
    background-color: var(--card-bg);
    padding: 1.5rem 2.5rem;
    border-radius: 1rem;
    /* Border entfernt für cleaneren Look */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    font-size: 1.6rem;
    line-height: 2.2;
    height: 140px;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    position: relative;
    scroll-behavior: smooth;
}

.word-display::-webkit-scrollbar {
    display: none;
}

.word-display {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.word {
    color: #475569;
    position: relative;
    transition: all 0.15s ease;
    display: inline-flex;
    padding: 0 4px;
    border-radius: 4px;
}

.word.current {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--text-color);
}

.word.correct-word {
    color: var(--success-color);
}

.word.incorrect-word {
    color: var(--error-color);
}

.char {
    position: relative;
    transition: color 0.1s ease;
}

.char.correct {
    color: var(--success-color);
}

.char.incorrect {
    color: var(--error-color);
}

.char.extra {
    opacity: 0.6;
}

.input-container {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

#word-input {
    flex: 1;
    background-color: #1e293b;
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    font-size: 1.3rem;
    color: white;
    font-family: var(--font-main);
    transition: all 0.3s;
    outline: none;
}

#word-input:focus {
    border-color: var(--accent-color);
}

#restart-btn {
    background-color: #1e293b;
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    color: var(--sub-color);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#restart-btn:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.results-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.results-modal.hidden {
    display: none;
}

.modal-content {
    background-color: #1e293b;
    padding: 3.5rem;
    border-radius: 2rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
    transform: scale(1);
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
    font-weight: 700;
}

.final-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.final-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.final-stat .label {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--sub-color);
}

.final-stat .value {
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.primary-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.primary-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

footer {
    background-color: #0f172a;
    padding: 2rem;
    margin-top: auto;
    text-align: center;
    /* Border-top entfernt */
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
    opacity: 0.8;
}

footer p {
    color: var(--sub-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--sub-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.hidden-during-play {
    visibility: hidden;
}

.loading {
    width: 100%;
    text-align: center;
    color: var(--sub-color);
    font-style: italic;
}

/* Rechtliche Seiten Styles */
.legal-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
    color: var(--text-color);
    line-height: 1.6;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 2rem;
    backdrop-filter: blur(20px);
}

.legal-container h1 {
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.legal-container h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}
