/* --- 1. Grundlegendes Design --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    color: #333;
}

/* --- 2. Header-Bereich (Zentriert & Nebeneinander) --- */
.site-header {
    background-color: white;
    border-bottom: 1px solid #ddd;
    width: 100%;
}

.header-main {
    display: flex;
    flex-direction: row;      /* Erzwingt die Reihe */
    flex-wrap: nowrap;        /* Verhindert das Umbrechen */
    align-items: center;      /* Vertikal mittig */
    justify-content: center;  /* Horizontal zentriert */
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.top-logo {
    height: 80px;             /* Feste Höhe */
    width: auto;
    margin-right: 25px;       /* Abstand zum Text */
    flex-shrink: 0;           /* Logo darf nicht kleiner werden */
}

.welcome-text {
    text-align: left;         /* Text innerhalb der Gruppe linksbündig */
}

.welcome-text h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 2.2em;
    white-space: nowrap;      /* Verhindert Zeilenumbruch im Namen */
}

.welcome-text p {
    margin: 5px 0 0 0;
    color: #7f8c8d;
    font-style: italic;
}

/* --- 3. Rote Navigation --- */
.main-nav {
    background-color: #d32f2f;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    gap: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05em;
    padding: 5px 12px;
    border-radius: 4px;
    transition: background 0.3s;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- 4. Container & Layout --- */
main {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.rangliste-container, .info-container, .details-container, .admin-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    border-top: 5px solid #d32f2f; /* Roter Balken oben für die Optik */
}

/* --- 5. Tabellen-Design --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    color: #555;
    text-transform: uppercase;
    font-size: 0.85em;
}

/* Rangliste Highlights */
.skat-tabelle tr:nth-child(1) td { background-color: #fff9c4; color: #856404; font-weight: bold; }
.skat-tabelle tr:nth-child(2) td { background-color: #f5f5f5; color: #444; }
.skat-tabelle tr:nth-child(3) td { background-color: #fff3e0; color: #6d4c41; }

.detail-tabelle tr:nth-child(even) { background-color: #fafafa; }

/* --- 6. Formulare & Info-Elemente --- */
.info-card, .bericht-box {
    background: #fdf2f2;
    border-left: 4px solid #d32f2f;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

input, textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.btn-add { background: #4CAF50; color: white; padding: 10px; border: none; cursor: pointer; border-radius: 4px; }
.btn-save { background: #d32f2f; color: white; padding: 15px 30px; border: none; cursor: pointer; border-radius: 4px; display: block; margin: 20px auto; }
.btn-delete { background: #ff4444; color: white; border: none; padding: 5px; cursor: pointer; border-radius: 3px; }

/* --- 7. Footer --- */
footer {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* --- 8. Mobile Anpassung (Nur für kleine Bildschirme untereinander) --- */
@media (max-width: 700px) {
    .header-main { 
        flex-direction: column; 
        text-align: center; 
    }
    .top-logo { 
        margin-right: 0; 
        margin-bottom: 15px; 
    }
    .welcome-text h1 {
        font-size: 1.5em;
        white-space: normal;
    }
    .main-nav { 
        flex-wrap: wrap; 
        gap: 10px; 
    }
}
.info-text-box {
    max-width: 1000px;
    margin: 30px auto 20px auto; /* Zentriert die Box mit Abständen */
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-top: 5px solid #d32f2f; /* Roter Balken oben für die Optik */
    
    /* Hier passiert die Zentrierung und Fettschrift */
    text-align: center; 
    font-weight: bold; 
    color: #2c3e50;
}

.info-text-box h2 {
    margin-top: 0;
    font-size: 1.8em;
    color: #d32f2f; /* Überschrift in Club-Farbe */
    text-transform: uppercase; /* Optional: Alles in Großbuchstaben */
}

.info-text-box p {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 0;
}
/* Dropdown Container */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Der "Links"-Button im Menü */
.dropbtn {
    background-color: transparent;
    color: white;
    padding: 5px 12px;
    font-size: 1.05em;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* Dropdown Inhalt (versteckt) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    margin-top: 5px;
}

/* Links innerhalb des Dropdowns */
.dropdown-content a {
    color: #333 !important; /* Textfarbe dunkel für Lesbarkeit auf weiß */
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

/* Hover-Effekt: Zeige das Menü */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Hover-Effekt für die Links im Dropdown */
.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: #d32f2f !important;
}

/* Pfeil-Animation (optional) */
.dropdown:hover .dropbtn {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
/* Den gesamten Body auf volle Höhe bringen */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

/* Der Hauptinhalt wächst und schiebt den Footer nach unten */
.admin-container, .impressum-container, main, .content {
    flex: 1 0 auto;
}

/* Footer Styling */
.site-footer {
    flex-shrink: 0;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.site-footer a {
    color: #4CAF50;
    text-decoration: none;
    margin: 0 10px;
}

.site-footer a:hover {
    text-decoration: underline;
}