/* ================================================================
   BuLiTipp Mobile CSS
   Mobile-first, Roboto, Rot #c0003a
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* ── Variablen ─────────────────────────────────────────────── */
:root {
    --red:        #c0003a;
    --red-dark:   #8f0029;
    --red-light:  #f5e6eb;
    --black:      #1a1a1a;
    --gray-50:    #f9f9f9;
    --gray-100:   #f4f4f4;
    --gray-200:   #e8e8e8;
    --gray-300:   #d0d0d0;
    --gray-500:   #888;
    --white:      #fff;
    --shadow-sm:  0 1px 3px rgba(0,0,0,.10);
    --shadow-md:  0 2px 8px rgba(0,0,0,.12);
    --r:          8px;
    --r-sm:       4px;
    --header-h:   56px;
    --nav-h:      48px;
}

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

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    background: var(--gray-100);
    color: var(--black);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────────── */
.mb-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--red);
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.mb-header__logo {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.mb-header__title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.3px;
}
.mb-header__sub {
    font-size: 11px;
    color: rgba(255,255,255,.75);
    font-weight: 400;
}
.mb-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mb-header__btn {
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.mb-header__btn:hover { background: rgba(255,255,255,.25); }

/* ── Bottom Navigation ─────────────────────────────────────── */
.mb-nav {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    z-index: 200;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    height: var(--nav-h);
    display: flex;
    align-items: stretch;
    box-shadow: 0 -2px 8px rgba(0,0,0,.08);
}
.mb-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 500;
    padding: 6px 4px;
    border-top: 3px solid transparent;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent;
}
.mb-nav__item.active,
.mb-nav__item:hover {
    color: var(--red);
    border-top-color: var(--red);
}
.mb-nav__icon {
    font-size: 20px;
    line-height: 1;
}

/* ── Main Content ───────────────────────────────────────────── */
.mb-main {
    padding: 16px 16px calc(var(--nav-h) + 16px);
    max-width: 600px;
    margin: 0 auto;
}
/* Volle Breite für Tabellen-Seiten */
.mb-main--wide {
    max-width: 100%;
    padding: 8px 8px calc(var(--nav-h) + 8px);
}

/* ── Desktop-Layout: Content + Sidebar ─────────────────────── */
@media (min-width: 900px) {
    .mb-main--wide {
        display: grid;
        grid-template-columns: 1fr 260px;
        grid-template-rows: auto;
        gap: 16px;
        align-items: start;
        padding: 16px 16px calc(var(--nav-h) + 16px);
        max-width: 1400px;
        margin: 0 auto;
    }
    /* Wenn noch keine Sidebar vorhanden: Content nimmt volle Breite */
    .mb-main--wide > :only-child,
    .mb-main--wide > .mb-content-full {
        grid-column: 1 / -1;
    }
    .mb-sidebar {
        grid-column: 2;
    }
}

/* ── Cards ─────────────────────────────────────────────────── */
.mb-card {
    background: var(--white);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 16px;
}
.mb-card__header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mb-card__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-500);
}
.mb-card__body {
    padding: 16px;
}
.mb-card__link {
    font-size: 13px;
    color: var(--red);
    text-decoration: none;
    font-weight: 500;
}
.mb-card__link:hover { text-decoration: underline; }

/* ── Spieltag-Info (Hero auf Startseite) ────────────────────── */
.mb-hero {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    border-radius: var(--r);
    padding: 24px 20px;
    color: #fff;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}
.mb-hero::before {
    content: '⚽';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 64px;
    opacity: .12;
}
.mb-hero__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .8;
    margin-bottom: 4px;
}
.mb-hero__spieltag {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 8px;
}
.mb-hero__meta {
    font-size: 13px;
    opacity: .85;
}
.mb-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 24px;
    text-decoration: none;
    transition: background .15s;
    -webkit-tap-highlight-color: transparent;
}
.mb-hero__cta:hover { background: rgba(255,255,255,.3); }

/* ── Ranglisten-Preview ─────────────────────────────────────── */
.mb-ranking-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}
.mb-ranking-row:last-child { border-bottom: none; }
.mb-ranking-row__pos {
    width: 28px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-500);
    flex-shrink: 0;
}
.mb-ranking-row__pos.gold   { color: #d4a000; }
.mb-ranking-row__pos.silver { color: #888; }
.mb-ranking-row__pos.bronze { color: #a05c2a; }
.mb-ranking-row__name {
    flex: 1;
    font-weight: 500;
    font-size: 15px;
}
.mb-ranking-row__pts {
    font-weight: 700;
    font-size: 15px;
    color: var(--red);
}

/* ── News-Preview ───────────────────────────────────────────── */
.mb-news-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}
.mb-news-item:last-child { border-bottom: none; }
.mb-news-item__date {
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 3px;
}
.mb-news-item__title {
    font-weight: 500;
    font-size: 14px;
}

/* ── Login-Seite ────────────────────────────────────────────── */
.mb-login-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--red-dark) 0%, var(--red) 50%, #e8003f 100%);
    padding: 24px;
}
.mb-login-logo {
    text-align: center;
    margin-bottom: 32px;
    color: #fff;
}
.mb-login-logo__ball { font-size: 52px; line-height: 1; margin-bottom: 8px; }
.mb-login-logo__title { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.mb-login-logo__sub { font-size: 13px; opacity: .8; margin-top: 4px; }

.mb-login-card {
    background: var(--white);
    border-radius: var(--r);
    padding: 28px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.mb-login-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--black);
}

/* ── Formulare ─────────────────────────────────────────────── */
.mb-form-group {
    margin-bottom: 16px;
}
.mb-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    margin-bottom: 6px;
}
.mb-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px; /* 16px verhindert Zoom auf iOS */
    font-family: inherit;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--r-sm);
    background: var(--white);
    color: var(--black);
    transition: border-color .15s;
    -webkit-appearance: none;
}
.mb-input:focus {
    outline: none;
    border-color: var(--red);
}

.mb-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--black);
    cursor: pointer;
}
.mb-checkbox-row input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--red); }

/* ── Buttons ───────────────────────────────────────────────── */
.mb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: var(--r-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.mb-btn:active { transform: scale(.98); }
.mb-btn--primary {
    background: var(--red);
    color: #fff;
}
.mb-btn--primary:hover { background: var(--red-dark); }
.mb-btn--ghost {
    background: transparent;
    color: var(--red);
    border: 1.5px solid var(--red);
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
}
.mb-btn--sm {
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
}

/* ── Alerts ────────────────────────────────────────────────── */
.mb-alert {
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.mb-alert--error   { background: #ffeaea; color: #c00; border-left: 3px solid #c00; }
.mb-alert--success { background: #eafaf0; color: #1a7a40; border-left: 3px solid #1a7a40; }
.mb-alert--info    { background: var(--red-light); color: var(--red-dark); border-left: 3px solid var(--red); }

/* ── Utility ────────────────────────────────────────────────── */
.mb-text-center { text-align: center; }
.mb-text-muted  { color: var(--gray-500); font-size: 13px; }
.mb-mt-8  { margin-top: 8px; }
.mb-mt-16 { margin-top: 16px; }
.mb-divider { height: 1px; background: var(--gray-200); margin: 16px 0; }
