/* =================================================================
   MODERN LIGHT UI - GLOBAL STYLE (FRIENDLY VERSION)
   ================================================================= */

/* Google Fonts Import: Inter für professionellen Look */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Farbpalette: Modern, Hell & Freundlich */
    --primary-color: #4f46e5;       /* Indigo-600 (Etwas kräftiger für Kontrast auf Weiß) */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); 
    --primary-glow: rgba(79, 70, 229, 0.2); /* Sanfterer Glow */
    
    --success-color: #059669;       /* Emerald-600 (Dunkler für Lesbarkeit auf Weiß) */
    --warning-color: #d97706;       /* Amber-600 */
    --error-color: #dc2626;         /* Red-600 */
    
    /* Hintergrund-Ebenen - JETZT HELL */
    --bg-dark: #f3f4f6;             /* Gray-100 (Heller Hintergrund) */
    --bg-card: #ffffff;             /* Reines Weiß für die Karte */
    --bg-input: #f9fafb;            /* Gray-50 (Ganz helles Grau für Felder) */
    
    /* Text - JETZT DUNKEL */
    --text-main: #1e293b;           /* Slate-800 (Dunkles Grau statt Weiß) */
    --text-muted: #64748b;          /* Slate-500 */
    
    /* Rahmen & Linien */
    --border-color: #e2e8f0;        /* Slate-200 (Subtiler heller Rahmen) */
    
    /* Dimensionen (Unverändert) */
    --radius-md: 12px;
    --radius-sm: 8px;
}

/* =================================================================
   RESET & BASIS
   ================================================================= */

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

body {
    background-color: var(--bg-dark);
    /* Heller, freundlicher Verlauf (Oben rechts leicht bläulich) */
    background-image: radial-gradient(circle at top right, #e0e7ff 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    font-size: 16px; 
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

a:hover {
    color: #4338ca; /* Indigo-700 */
    /* Text-Shadow entfernt, wirkt auf weißem HG oft unscharf */
    text-decoration: underline; 
}

h1, h2, h3 {
    color: var(--text-main);
    margin-bottom: 0.6em;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* =================================================================
   LAYOUT & CONTAINER
   ================================================================= */

.container {
    max-width: 1000px; 
    width: 90%; 
    background-color: var(--bg-card); 
    /* Weicherer Schatten für helle Umgebung */
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08); 
    padding: 50px;
    margin: 60px auto; 
    border-radius: var(--radius-md);
    border: 1px solid #ffffff; /* Weißer Rand */
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header img {
    max-width: 140px;
    height: auto;
    margin-bottom: 20px;
    /* Schatten angepasst für hellen Hintergrund */
    filter: drop-shadow(0 4px 6px rgba(99, 102, 241, 0.25)); 
}

.header h1 {
    font-size: 2.2rem;
}

/* =================================================================
   FORMULAR-DESIGN (High Contrast Version)
   ================================================================= */

.form-section {
    /* Klarer Hintergrund für den Formular-Bereich */
    background-color: #f1f5f9; /* Slate-100: Sichtbares Grau/Blau */
    border: 1px solid #cbd5e1; /* Slate-300: Dunklerer Rahmen */
    padding: 25px; 
    margin-bottom: 25px; 
    border-radius: var(--radius-md);
    /* Leichter Schatten für die Box selbst */
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.03); 
}

.form-section legend {
    color: var(--primary-color);
    font-size: 1.1rem;
    padding: 5px 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #ffffff; /* Weißer Hintergrund für den Titel */
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin-bottom: 15px; 
}

.form-section label {
    display: block;
    margin-bottom: 8px; 
    font-weight: 600; /* Dicker für bessere Lesbarkeit */
    color: #475569;   /* Slate-600: Dunkles Grau */
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Inputs: Klarer definiert */
input[type="text"],
input[type="email"],
input[type="tel"],
select {
    width: 100%;
    padding: 14px 16px; /* Etwas größere Klickfläche */
    
    /* Design-Update: Weiß auf Grau */
    background-color: #ffffff; 
    color: var(--text-main);
    
    /* Deutlicher Rahmen */
    border: 2px solid #cbd5e1; /* 2px dick und dunkleres Grau */
    border-radius: var(--radius-sm);
    
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
    
    /* Schatten nach innen für Tiefe */
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03); 
}

/* Input Focus State - Aktives Feld */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus {
    border-color: var(--primary-color); /* Farbe ändert sich */
    background-color: #ffffff;
    outline: none;
    /* Äußerer Leuchtring */
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); 
    transform: translateY(-1px); /* Minimales "Entgegenkommen" */
}

/* Placeholder Textfarbe (optional, falls Platzhalter zu hell sind) */
::placeholder {
    color: #94a3b8;
    opacity: 1;
}

/* Primary Button Design */
input[type="submit"], .btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 10px;
}

input[type="submit"]:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.35);
}

/* =================================================================
   LISTEN & TABELLEN
   ================================================================= */

.team-list-summary {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.group-list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 40px;
    margin-top: 30px;
}

.group-column h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.team-list {
    list-style: none;
    padding: 0;
    counter-reset: team-counter;
}

.team-list li {
    counter-increment: team-counter;
    /* Leichtes Grau für Listenelemente statt transparent */
    background-color: #f8fafc; 
    margin-bottom: 8px;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.95em;
    display: flex;
    align-items: center;
    border: 1px solid transparent; /* Platzhalter */
}

/* Hover-Effekt für Listen (neu für Light Mode) */
.team-list li:hover {
    border-color: var(--border-color);
    background-color: #f1f5f9;
}

/* Nummerierung vor den Teams */
.team-list li::before {
    content: counter(team-counter);
    background-color: #e2e8f0; /* Helleres Grau */
    color: var(--text-muted);
    font-weight: bold;
    font-size: 0.8rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 12px;
}

/* =================================================================
   MELDUNGEN
   ================================================================= */

.alert {
    padding: 20px;
    margin-bottom: 30px;
    border-radius: var(--radius-md);
    font-weight: 500;
    border-left: 5px solid transparent;
    background-color: #f8fafc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.alert.success {
    border-left-color: var(--success-color);
    background-color: #ecfdf5; /* Sehr helles Emerald */
    color: #047857; /* Dunkles Grün für Lesbarkeit */
}

.alert.error {
    border-left-color: var(--error-color);
    background-color: #fef2f2; /* Sehr helles Rot */
    color: #b91c1c; /* Dunkles Rot */
}

/* =================================================================
   UX: LOADING & SCROLLING
   ================================================================= */
html { scroll-behavior: smooth; }

input[type="submit"].loading {
    background: #e2e8f0 !important; /* Hellgrau */
    color: transparent !important;
    cursor: wait !important;
    pointer-events: none;
    position: relative;
    box-shadow: none;
}

input[type="submit"].loading::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    top: calc(50% - 12px);
    left: calc(50% - 12px);
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-top: 3px solid var(--primary-color); /* Farbe angepasst */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 768px) {
    .container {
        width: 100%;
        margin: 0;
        padding: 25px;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    .input-grid, .group-list-grid { grid-template-columns: 1fr; }
    h1 { font-size: 1.8rem; }
}