/* =========================================
   RESET & BASIS (Gilt für alles)
   ========================================= */
* {
    box-sizing: border-box !important; /* Verhindert, dass Padding die Breite sprengt */
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    line-height: 1.5 !important;
    color: #333 !important;
    background-color: #ffffff !important; /* Standard Weiß */
    width: 100% !important;
    overflow-x: hidden !important; /* Kein seitliches Scrollen */
}

/* Zwingt alle Container auf volle Breite, um Ränder zu vermeiden */
div, table, tr, td, form, center, section {
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    background: transparent !important;
}

/* =========================================
   TYPOGRAFIE (Überschriften zähmen)
   ========================================= */
h1, h2, h3, .header-text {
    text-align: center !important;
    color: #c0392b !important; /* Das Rot aus deinem Screenshot */
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    line-height: 1.2 !important;
    word-wrap: break-word !important; /* Verhindert Überlänge */
}

h1 { font-size: 24px !important; } /* Nicht zu riesig auf Mobile */
h2 { font-size: 20px !important; }

/* =========================================
   MOBIL-FIRST DESIGN (Standardansicht)
   Das sieht auf dem Handy sauber aus
   ========================================= */

/* Das Formular selbst */
form {
    padding: 20px !important; /* Sicherer Abstand zum Rand */
    margin: 0 auto !important;
    display: block !important;
}

/* Labels */
label, td:first-child {
    display: block !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
    color: #555 !important;
    font-size: 14px !important;
    text-align: left !important;
}

/* Inputs & Selects */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100% !important;
    padding: 12px !important; /* Angenehme Touch-Größe */
    border: 1px solid #ccc !important;
    border-radius: 4px !important; /* Leicht abgerundet */
    background-color: #f8f9fa !important; /* Ganz leichtes Grau für Kontrast */
    font-size: 16px !important; /* Wichtig gegen Zoom */
    margin-bottom: 20px !important; /* Abstand zum nächsten Feld */
    height: auto !important;
    box-shadow: none !important;
}

/* Fokus-Effekt */
input:focus, select:focus, textarea:focus {
    border-color: #3b82f6 !important;
    background-color: #fff !important;
    outline: none !important;
}

/* Bilder & Logos (z.B. Festival Logo) */
img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 10px auto !important;
}

/* Button */
input[type="submit"], button {
    width: 100% !important;
    padding: 15px !important;
    background-color: #c0392b !important; /* Passend zur roten Schrift */
    color: white !important;
    font-weight: bold !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    margin-top: 10px !important;
}

/* =========================================
   DESKTOP OPTIMIERUNG (Nur für große Screens)
   Hier schalten wir das "Card Design" ein
   ========================================= */
@media screen and (min-width: 769px) {
    
    body {
        background-color: #f0f2f5 !important; /* Grau nur am Desktop */
        padding-top: 40px !important;
    }

    /* Wir bauen uns einen Wrapper um alles */
    body > div, body > center, body > table {
        max-width: 600px !important;
        margin: 0 auto !important;
        background: #ffffff !important;
        padding: 40px !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
        width: 600px !important; /* Fixe Breite für Desktop */
    }

    h1 { font-size: 32px !important; }
    
    /* Inputs etwas feiner am Desktop */
    input[type="text"], select, textarea {
        background-color: #fff !important;
    }
}