body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 20px;
    background: #f4faff url(bg.jpg) no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    color: #333;
    zoom: 120%;
    opacity: .9;
}

h1, p {
    color: #64c2f5;
}

h2 {
    color: #64c2f5;
}

#kopf {
    background: #ddd;
    border-radius: 8px;
    padding: 1px 20px 20px 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin: auto;
    width: max-content;
}

footer {
    background: #ddd;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin: 20px auto;
    width: max-content;
}

#startScreen, #game {
    background: #ddd;
    border-radius: 8px;
    display: inline-block;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin: 20px auto;
    width: max-content;
}

input, button {
    padding: 8px 12px;
    font-size: 16px;
    margin: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

button {
    background-color: #1c87c9;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #155d82;
}

#message {
    font-weight: bold;
    margin-top: 10px;
    font-size: 18px;
}

#highscore {
    padding: 1px 20px 20px 20px;
    background: #ddd;
    width: max-content;
    margin: auto;
    border-radius: 10px;
}

table {
    border-collapse: collapse;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
}

th, td {
    border: 1px solid #ccc;
    padding: 6px 12px;
}

th {
    background-color: #e0f0ff;
}

tr:not(.rank-1):not(.rank-2):not(.rank-3):nth-child(even) {
    background-color: #e8fde8;
}

tr:not(.rank-1):not(.rank-2):not(.rank-3):nth-child(odd) {
    background-color: #defffc;
}

tr.rank-1 {
    background-color: #ffe680;
}

tr.rank-2 {
    background-color: #c0c0c0;
}

tr.rank-3 {
    background-color: #cd7f32;
}

/* ── Sudoku-Grid ── */
#sudoku {
    border-collapse: collapse;
    margin: 20px auto;
    table-layout: fixed;
    width: 360px;
    height: 360px;
}

#sudoku td {
    width: 40px;
    height: 40px;
    border: 1px solid #999;
    padding: 0;
}

#sudoku input {
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 20px;
    border: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    transition: background-color 0.2s ease;
}

#sudoku input:read-only {
    background-color: #e0f0ff;
    font-weight: bold;
    color: #000;
}

#sudoku tr:nth-child(3) td,
#sudoku tr:nth-child(6) td {
    border-bottom: 2px solid #000;
}

#sudoku td:nth-child(3),
#sudoku td:nth-child(6) {
    border-right: 2px solid #000;
}

select {
    padding: 4px 6px;
    font-size: 12px;
    border: 2px solid #007BFF;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

select:hover, select:focus {
    border-color: #0056b3;
    outline: none;
    box-shadow: 0 0 5px rgba(0,123,255,0.5);
}

/* ── Eingabe-Feedback ── */
/* Fehler nach Submit-Prüfung */
#sudoku input.invalid {
    background-color: #fdd;
    color: #c0392b;
}

/* Per Hinweis-Button eingetragene Felder */
#sudoku input.hint-filled {
    background-color: #fff3cd;
    color: #856404;
    font-style: italic;
}

/* ── Fortschrittsbalken ── */
.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin: 10px auto;
    max-width: 400px;
}

.progress-bar {
    flex: 1;
    height: 14px;
    background: #bbb;
    border-radius: 7px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1c87c9, #42c8f5);
    border-radius: 7px;
    transition: width 0.3s ease;
}

#progress {
    font-size: 0.9rem;
    color: #444;
    white-space: nowrap;
}

/* ── Hinweis-Nachricht ── */
.hint-msg {
    color: #856404;
    background: #fff3cd;
    border-radius: 6px;
    padding: 4px 12px;
    display: inline-block;
    font-size: 0.9rem;
    min-height: 1.4em;
}

/* ── Spiel-Buttons ── */
.game-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 14px 0 6px;
    flex-wrap: wrap;
}

.game-buttons button {
    padding: 10px 22px;
    font-size: 1rem;
}

#hint {
    background-color: #f0a500;
}

#hint:hover {
    background-color: #c8860a;
}

#hint:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* ── Schwierigkeits-Badges im Highscore ── */
.diff-easy   { color: #2e7d32; font-weight: bold; }
.diff-medium { color: #e65100; font-weight: bold; }
.diff-hard   { color: #b71c1c; font-weight: bold; }
