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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #e9ecef url('img/bg.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    color: #1e3c72;
    font-size: 1.5em;
}

nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

nav a {
    color: #1e3c72;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    background: #f0f4f8;
    transition: all 0.2s;
    font-weight: 500;
}

nav a:hover, nav a.active {
    background: #1e3c72;
    color: white;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

h2 {
    color: #1e3c72;
    margin-bottom: 20px;
    border-bottom: 2px solid #1e3c72;
    padding-bottom: 10px;
}

/* Login/Register Forms */
.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 700px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }
}

form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

form input[type="text"],
form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 1em;
}

form input:focus {
    outline: none;
    border-color: #1e3c72;
}

button, .btn {
    background: #1e3c72;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background 0.2s;
}

button:hover, .btn:hover {
    background: #2a5298;
}

/* Spiele */
.spiel {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fafbfc;
}

.spiel-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.spiel-art {
    background: #1e3c72;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.spiel-datum {
    color: #666;
    font-size: 0.9em;
}

.teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.team {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

.team:first-child { text-align: right; }

.vs {
    background: #f0f4f8;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    color: #1e3c72;
}

.tipp-form {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.tipp-form select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    background: white;
}

.tipp-form select:focus {
    outline: none;
    border-color: #1e3c72;
}

.tipp-info {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 0.9em;
}

.tipp-info strong {
    color: #1e3c72;
}

.ergebnis-final {
    text-align: center;
    background: #e8f5e9;
    padding: 8px;
    border-radius: 5px;
    margin-top: 10px;
    color: #2e7d32;
    font-weight: 600;
}

/* Ranking */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.ranking-table th {
    background: #1e3c72;
    color: white;
}

.ranking-table tr:hover {
    background: #f5f5f5;
}

.ranking-table .platz {
    font-weight: bold;
    width: 60px;
}

.ranking-table .platz-1 { color: gold; font-size: 1.3em; }
.ranking-table .platz-2 { color: silver; font-size: 1.2em; }
.ranking-table .platz-3 { color: #cd7f32; font-size: 1.1em; }

.eigener-user {
    background: #fff9e6 !important;
    font-weight: 600;
}

.message {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.info-box {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #1e3c72;
}

.info-box h3 {
    color: #1e3c72;
    margin-bottom: 8px;
}

.modus-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.modus-switch .btn {
    background: #f0f4f8;
    color: #1e3c72;
    text-decoration: none;
    display: inline-block;
}

.modus-switch .btn.active {
    background: #1e3c72;
    color: white;
}

.modus-switch .btn:hover {
    background: #2a5298;
    color: white;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination .btn {
    text-decoration: none;
    display: inline-block;
}

.pagination .btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination .seiten-info {
    color: #555;
    font-weight: 600;
}

/* Spiel-Link (ganzes Spiel klickbar) */
.spiel-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    transition: background 0.15s;
    margin: -5px;
    padding: 5px;
}

.spiel-link:hover {
    background: #f0f4f8;
}

.back-link {
    display: inline-block;
    color: #1e3c72;
    text-decoration: none;
    margin-bottom: 15px;
    font-weight: 600;
}

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

.teams-gross {
    margin: 25px 0;
}

.teams-gross .team {
    font-size: 1.6em;
}

/* Warnung vor Aufdecken */
.warnung {
    background: #fff8e1;
    border-left: 4px solid #f9a825;
    padding: 15px 20px;
    border-radius: 5px;
    margin-top: 15px;
}

.warnung strong {
    color: #f57f17;
    font-size: 1.1em;
}

.warnung p {
    margin: 10px 0 15px 0;
    color: #5d4037;
}

.btn-warnung {
    background: #f57c00;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-warnung:hover {
    background: #e65100;
}

/* Tabelle mit den Tipps der anderen Spieler */
.tipps-tabelle {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.tipps-tabelle th,
.tipps-tabelle td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.tipps-tabelle th {
    background: #1e3c72;
    color: white;
}

.tipps-tabelle tr:hover {
    background: #f5f5f5;
}

@media (max-width: 600px) {
    header h1 { font-size: 1.2em; }
    .card { padding: 20px; }
    .teams { grid-template-columns: 1fr; text-align: center; }
    .team:first-child { text-align: center; }
}
