/* ============================================================
   Mini-BubbleSoccer WM – Stylesheet
   Mobiloptimiert, keine externen Abhängigkeiten
   ============================================================ */

/* === Variablen === */
:root {
    --c-primary:       #e40038;
    --c-primary-dark:  #b8002e;
    --c-primary-light: #fef0f3;
    --c-bg:            #f1f5f9;
    --c-card:          #ffffff;
    --c-text:          #1e293b;
    --c-muted:         #64748b;
    --c-border:        #e2e8f0;
    --c-success:       #15803d;
    --c-success-bg:    #f0fdf4;
    --c-warning:       #b45309;
    --c-warning-bg:    #fffbeb;
    --c-error:         #dc2626;
    --c-error-bg:      #fef2f2;
    --c-starter:       #e40038;
    --c-waiting:       #94a3b8;
    --radius:          12px;
    --radius-sm:        8px;
    --shadow:          0 2px 12px rgba(0,0,0,.08);
    --shadow-lg:       0 8px 32px rgba(0,0,0,.18);
    --font:            -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                       'Helvetica Neue', Arial, sans-serif;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
}

a { color: var(--c-primary); }
a:hover { color: var(--c-primary-dark); }

/* === Layout === */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 56px;
}

/* === Hero-Bereich === */
.hero {
    background: var(--c-card);
    border-radius: var(--radius);
    padding: 32px 24px 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow);
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.35rem, 4.5vw, 1.9rem);
    font-weight: 800;
    color: var(--c-primary);
    line-height: 1.25;
    margin-bottom: 14px;
}

.hero-text {
    font-size: 0.975rem;
    color: var(--c-muted);
    max-width: 520px;
    margin: 0 auto 24px;
}

.slots-full-notice {
    margin-top: 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--c-warning);
    background: var(--c-warning-bg);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: inline-block;
}

/* === Hinweisboxen === */
.alert {
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    border-left: 4px solid transparent;
}
.alert-success { background: var(--c-success-bg); color: var(--c-success); border-left-color: var(--c-success); }
.alert-warning  { background: var(--c-warning-bg);  color: var(--c-warning);  border-left-color: var(--c-warning); }
.alert-error    { background: var(--c-error-bg);    color: var(--c-error);    border-left-color: var(--c-error); }
.alert ul  { margin: 6px 0 0 18px; }
.alert li  { margin-bottom: 3px; }

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background-color .2s, transform .1s;
    white-space: nowrap;
    line-height: 1.3;
}
.btn:active { transform: scale(.97); }

.btn-primary            { background: var(--c-primary); color: #fff; }
.btn-primary:hover      { background: var(--c-primary-dark); color: #fff; }
.btn-primary:disabled   { background: #f0a0b0; cursor: not-allowed; }

.btn-secondary          { background: var(--c-border); color: var(--c-text); }
.btn-secondary:hover    { background: #d1d5db; }

.btn-full { width: 100%; text-align: center; display: block; }

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 16px 32px;
    z-index: 1000;
    overflow-y: auto;
}
@media (min-height: 640px) {
    .modal-overlay { align-items: center; }
}

.modal {
    background: var(--c-card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    margin: auto;
    overflow: hidden;
    /* sanfte Einblendung */
    animation: modalIn .18s ease-out;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-12px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--c-border);
}
.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
}
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--c-muted);
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s;
}
.modal-close:hover { background: var(--c-bg); color: var(--c-text); }

.modal-body { padding: 22px 22px 26px; }

/* === Formular === */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 11px 13px;
    border: 2px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 1rem;
    color: var(--c-text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
    cursor: pointer;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(228,0,56,.12);
}

.form-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: var(--c-primary);
    cursor: pointer;
    border-radius: 4px;
}
.form-check label {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--c-muted);
    margin-bottom: 0;
    cursor: pointer;
    line-height: 1.55;
}
.form-check a { color: var(--c-primary); }

/* === Honeypot – visuell ausgeblendet === */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
}

/* === Erfolgsmeldung im Modal === */
.success-msg {
    text-align: center;
    padding: 12px 0 6px;
}
.success-msg .icon {
    width: 62px;
    height: 62px;
    background: var(--c-success-bg);
    color: var(--c-success);
    border-radius: 50%;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}
.success-msg p {
    color: var(--c-text);
    font-size: 0.975rem;
    line-height: 1.65;
    margin-bottom: 22px;
}

/* === Teilnehmerliste === */
.teams-section {
    background: var(--c-card);
    border-radius: var(--radius);
    padding: 26px 22px 28px;
    box-shadow: var(--shadow);
}
.teams-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.slots-counter {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--c-primary);
    background: var(--c-primary-light);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    margin-bottom: 22px;
    display: block;
}

.no-teams {
    text-align: center;
    color: var(--c-muted);
    padding: 30px 0;
    font-size: 0.95rem;
}

/* Raster: 1 Spalte mobil, 2 Spalten ab 520 px */
.teams-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}
@media (min-width: 520px) {
    .teams-grid { grid-template-columns: repeat(2, 1fr); }
}

.team-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
    border-left: 4px solid var(--c-waiting);
    background: var(--c-card);
    transition: box-shadow .2s;
}
.team-card:hover          { box-shadow: var(--shadow); }
.team-card.team-starter   { border-left-color: var(--c-starter); }
.team-card.team-waiting   { border-left-color: var(--c-waiting); }

.team-flag {
    font-size: 1.9rem;
    line-height: 1;
    min-width: 2.2rem;
    text-align: center;
}
.team-info   { flex: 1; min-width: 0; }
.team-country {
    font-size: 0.75rem;
    color: var(--c-muted);
    margin-bottom: 1px;
}
.team-name {
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}
.badge-starter { background: var(--c-primary-light); color: var(--c-primary); }
.badge-waiting { background: #f1f5f9;                 color: var(--c-waiting); }

/* === Standalone-Seitenrahmen (submit.php / confirm.php) === */
.page-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--c-bg);
}
.message-card {
    background: var(--c-card);
    border-radius: var(--radius);
    padding: 40px 28px;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow);
    text-align: center;
}
.message-card .big-icon { font-size: 3rem; margin-bottom: 14px; line-height: 1; }
.message-card h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--c-text);
}
.message-card p {
    color: var(--c-muted);
    line-height: 1.7;
    margin-bottom: 22px;
    font-size: 0.95rem;
}
.message-card .error-list {
    text-align: left;
    margin: 0 0 20px;
    padding-left: 20px;
    color: var(--c-error);
    font-size: 0.9rem;
}
.message-card .error-list li { margin-bottom: 5px; }
