/* Hallen-Masters Verwaltung
   Design-Tokens wie auth.hallen-masters.de: warmes Off-Black, Saira, ein Akzent (Orange), 6px-Radius. */

@font-face {
    font-family: 'Saira';
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 50% 125%;
    font-display: swap;
    src: url('../assets/fonts/saira-latin-wdth.woff2') format('woff2-variations'),
         url('../assets/fonts/saira-latin-wdth.woff2') format('woff2');
}

@font-face {
    font-family: 'Saira';
    font-style: italic;
    font-weight: 100 900;
    font-stretch: 50% 125%;
    font-display: swap;
    src: url('../assets/fonts/saira-latin-wdth-italic.woff2') format('woff2-variations'),
         url('../assets/fonts/saira-latin-wdth-italic.woff2') format('woff2');
}

:root {
    color-scheme: dark;

    /* Marke */
    --bg: #0b0a0c;
    --surface: #151417;
    --surface-2: #1d1b1f;
    --surface-3: #252328;
    --line: rgba(243, 242, 239, 0.10);
    --line-strong: rgba(243, 242, 239, 0.20);
    --ink: #f3f2ef;
    --ink-2: #b4b2ad;
    --ink-3: #8f8d88;
    --accent: #f2711c;
    --accent-hover: #ff8534;
    --accent-ink: #170b03;
    --accent-faint: rgba(242, 113, 28, 0.06);
    --accent-soft: rgba(242, 113, 28, 0.12);
    --accent-soft-2: rgba(242, 113, 28, 0.22);
    --danger: #ff7a70;
    --danger-soft: rgba(255, 122, 112, 0.10);
    --danger-soft-2: rgba(255, 122, 112, 0.18);
    --success: #6fd08c;
    --success-soft: rgba(111, 208, 140, 0.10);
    --success-soft-2: rgba(111, 208, 140, 0.18);
    --warning: #f2c14e;
    --warning-soft: rgba(242, 193, 78, 0.12);
    --neutral-soft: rgba(243, 242, 239, 0.06);
    --neutral-soft-2: rgba(243, 242, 239, 0.10);
    --field: #1d1b1f;
    --on-solid: #170b03;

    --radius: 6px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --font-sans: 'Saira', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace;

    /* Alte Namen (in den Templates verwendet) */
    --primary: var(--accent);
    --primary-hover: var(--accent-hover);
    --secondary: var(--success);
    --background: var(--bg);
    --text: var(--ink);
    --text-secondary: var(--ink-2);
    --border: rgba(243, 242, 239, 0.12);

    /* Ebenen */
    --z-header: 100;
    --z-mobile-menu: 99;
    --z-modal: 1000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    min-height: 100dvh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

h3 {
    font-size: 1.125rem;
}

a {
    color: inherit;
}

.display {
    text-transform: uppercase;
    letter-spacing: -0.01em;
    font-weight: 800;
    font-stretch: 86%;
    line-height: 0.95;
}

.tabular {
    font-variant-numeric: tabular-nums;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ==================== HEADER ==================== */
.header {
    background: rgba(11, 10, 12, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 0 2rem;
    min-height: 68px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: var(--z-header);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    min-height: 44px;
}

.logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.header-title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.header-title-main {
    font-size: 1.0625rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    font-weight: 800;
    font-stretch: 86%;
    line-height: 1;
    color: var(--ink);
}

.header-title-sub {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    color: var(--ink-3);
}

/* Zurück-Button */
.back-btn {
    display: flex;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s var(--ease-out-expo), color 0.2s var(--ease-out-expo), transform 0.2s var(--ease-out-expo);
    text-decoration: none;
}

.back-btn:hover {
    background: var(--surface-3);
    color: var(--ink);
    transform: translateX(-2px);
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

/* Navigation */
.nav {
    display: flex;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
    transition: background-color 0.2s var(--ease-out-expo), color 0.2s var(--ease-out-expo);
    display: block;
    cursor: pointer;
    user-select: none;
}

.nav-item:hover .nav-link,
.nav-item:focus-within .nav-link {
    background: var(--surface-2);
    color: var(--ink);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    min-width: 220px;
    padding: 0.375rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s var(--ease-out-expo), transform 0.2s var(--ease-out-expo), visibility 0.2s;
    margin-top: 0.375rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

/* Unsichtbare Brücke, damit das Menü beim Überfahren der Lücke offen bleibt */
.dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -0.5rem;
    height: 0.5rem;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    color: var(--ink-2);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
}

.dropdown-link:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.dropdown-link:hover svg {
    color: var(--accent);
}

.dropdown-link svg {
    width: 18px;
    height: 18px;
    color: var(--ink-3);
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.user-info {
    text-align: right;
    line-height: 1.3;
}

.user-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--ink);
}

.user-email {
    font-size: 0.8125rem;
    color: var(--ink-3);
}

.logout-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--ink-3);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    transition: background-color 0.2s var(--ease-out-expo), color 0.2s var(--ease-out-expo), border-color 0.2s var(--ease-out-expo);
    cursor: pointer;
}

.logout-btn:hover {
    background: var(--danger-soft);
    border-color: var(--danger);
    color: var(--danger);
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================== LAYOUT ==================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    flex: 1;
}

/* Startseite */
.welcome-section {
    margin-bottom: 2.5rem;
}

.welcome-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    font-weight: 800;
    font-stretch: 86%;
    line-height: 0.95;
    margin-bottom: 0.75rem;
    color: var(--ink);
}

.welcome-title .accent {
    color: var(--accent);
}

.welcome-subtitle {
    color: var(--ink-2);
    font-size: 1.0625rem;
    max-width: 60ch;
}

.quick-actions {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.quick-actions-title {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    color: var(--ink);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
}

/* Standard-Button (sekundär); primär über inline background: var(--primary) */
.action-btn {
    padding: 0.875rem 1.25rem;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.2s var(--ease-out-expo), border-color 0.2s var(--ease-out-expo), color 0.2s var(--ease-out-expo), transform 0.15s var(--ease-out-expo);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.action-btn:hover {
    border-color: var(--accent);
    background: var(--surface-3);
}

.action-btn:active {
    transform: scale(0.98);
}

/* Schnellaktionen auf der Startseite: Icon in Akzentfarbe */
.actions-grid .action-btn {
    justify-content: flex-start;
    padding: 1rem 1.25rem;
    min-height: 56px;
}

.actions-grid .action-btn svg {
    color: var(--accent);
}

/* Primäre Buttons: Orange mit dunkler Schrift (Kontrast) */
.action-btn[style*="background: var(--primary)"],
.btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--accent-ink) !important;
    box-shadow: none !important;
}

.action-btn[style*="background: var(--primary)"]:hover,
.btn-primary:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
}

/* Inhaltsbereiche */
.content-area {
    display: none;
}

.content-area.active {
    display: block;
}

@media (prefers-reduced-motion: no-preference) {
    .content-area.active,
    .page-header,
    .content-card {
        animation: fadeIn 0.4s var(--ease-out-expo) both;
    }

    .content-card:nth-of-type(2) { animation-delay: 0.04s; }
    .content-card:nth-of-type(3) { animation-delay: 0.08s; }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Seitenkopf */
.page-header {
    margin-bottom: 2rem;
}

.page-back-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.625rem;
}

.page-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    font-weight: 800;
    font-stretch: 86%;
    line-height: 0.95;
    color: var(--ink);
}

.page-subtitle {
    color: var(--ink-2);
    font-size: 1rem;
    max-width: 65ch;
}

/* Karte */
.content-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.content-card h3 {
    margin-bottom: 1rem;
    color: var(--ink);
}

.placeholder-text {
    color: var(--ink-3);
    padding: 2.5rem 1rem;
    text-align: center;
}

/* Suche */
.searchbar-input {
    padding: 0.75rem 1rem;
    background: var(--field);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--ink);
    font-weight: 500;
    width: 50%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.searchbar-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.searchbar-input::placeholder {
    color: var(--ink-3);
}

/* ==================== TABELLEN ==================== */
table {
    width: 100%;
    border-collapse: collapse;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

thead tr {
    border-bottom: 1px solid var(--line-strong) !important;
}

th {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--ink-3) !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid var(--line);
    transition: background-color 0.15s ease;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--accent-faint);
}

th, td {
    padding: 0.875rem 1rem;
    text-align: left;
}

.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.sortable:hover {
    color: var(--ink) !important;
}

.sortable.asc::after {
    content: " \2191";
    color: var(--accent);
}

.sortable.desc::after {
    content: " \2193";
    color: var(--accent);
}

/* ==================== MODALS ==================== */
.edit-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 10, 12, 0.72);
    z-index: var(--z-modal);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 1rem;
}

.edit-modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 1.75rem;
    max-width: 600px;
    width: 100%;
    max-height: 90dvh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: no-preference) {
    .edit-modal.active .modal-content {
        animation: modalIn 0.3s var(--ease-out-expo);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.modal-title {
    font-size: 1.25rem;
    color: var(--ink);
}

.close-modal {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--ink-3);
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 1.5rem;
    line-height: 1;
}

.close-modal:hover {
    background: var(--surface-2);
    color: var(--ink);
}

/* ==================== FORMULARE ==================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--field);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius) !important;
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: var(--ink-3);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-soft);
}

select option {
    background: var(--surface);
    color: var(--ink);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--ink-2);
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

button {
    font-family: inherit;
    font-size: 1rem;
}

/* ==================== MELDUNGEN ==================== */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
    border: 1px solid;
    border-left-width: 3px;
}

@media (prefers-reduced-motion: no-preference) {
    .alert {
        animation: fadeIn 0.3s var(--ease-out-expo);
    }
}

.alert-success {
    background: var(--success-soft);
    border-color: var(--success);
    color: var(--success);
}

.alert-error {
    background: var(--danger-soft);
    border-color: var(--danger);
    color: var(--danger);
}

/* ==================== FOOTER ==================== */
.footer {
    border-top: 1px solid var(--line);
    padding: 3rem 2rem;
    margin-top: 3rem;
}

.sponsors {
    max-width: 1400px;
    margin: 0 auto;
}

.sponsors-title {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-3);
    margin-bottom: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.sponsors-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem 3rem;
    flex-wrap: wrap;
}

.sponsor-logo {
    height: 44px;
    max-width: 150px;
    object-fit: contain;
    opacity: 0.55;
    filter: grayscale(100%) brightness(0) invert(0.85);
    transition: opacity 0.3s var(--ease-out-expo);
}

.sponsor-logo:hover {
    opacity: 1;
}

.leuchteauf,
.sparkasse {
    height: 64px;
}

.main-sponsor {
    height: 72px;
    max-width: 180px;
}

/* Ladebalken */
#loading-bar {
    display: none;
    height: 2px;
    background: var(--accent);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: calc(var(--z-header) + 1);
    transform-origin: left;
}

@media (prefers-reduced-motion: no-preference) {
    #loading-bar {
        animation: loadingAnimation 1.5s var(--ease-out-expo) infinite;
    }
}

@keyframes loadingAnimation {
    0% { transform: scaleX(0); opacity: 1; }
    60% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(1); opacity: 0; }
}

/* ==================== TOUCH ==================== */
.nav-link, .dropdown-link, .mobile-nav-link, .mobile-dropdown-link, .action-btn, .btn-score {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.nav-link, .dropdown-link {
    display: flex;
    align-items: center;
}

/* ==================== HAMBURGER / MOBILE ==================== */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 0;
    z-index: calc(var(--z-header) + 1);
}

.hamburger-btn span {
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s var(--ease-out-expo), opacity 0.2s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    display: none !important;
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    height: calc(100dvh - 68px);
    background: var(--bg);
    overflow-y: auto;
    z-index: var(--z-mobile-menu);
    border-top: 1px solid var(--line);
}

.mobile-menu.active {
    display: block !important;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0 2rem;
}

.mobile-nav-item {
    border-bottom: 1px solid var(--line);
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.125rem 1.25rem;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    font-weight: 800;
    font-stretch: 86%;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.mobile-nav-link svg {
    width: 18px;
    height: 18px;
    color: var(--ink-3);
    transition: transform 0.3s var(--ease-out-expo);
}

.mobile-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease-out-expo);
}

.mobile-dropdown.active {
    max-height: 1000px;
    padding-bottom: 0.5rem;
}

.mobile-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem 0.75rem 1.5rem;
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.mobile-dropdown-link svg {
    width: 18px;
    height: 18px;
    color: var(--ink-3);
}

.mobile-nav-link:active,
.mobile-dropdown-link:active {
    background: var(--surface-2);
    color: var(--ink);
}

/* ==================== SPIEL-MODUS ==================== */
.game-mode-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.active-game-section {
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.active-game-section.no-game {
    border: 1px dashed var(--line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.no-game-text {
    color: var(--ink-3);
    font-size: 1.0625rem;
    max-width: 32ch;
}

.game-card {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.game-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.game-time,
.game-group {
    color: var(--ink-3);
    font-size: 0.875rem;
}

.game-time {
    margin-bottom: 0.25rem;
}

.score-display {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin: 1.5rem 0;
    padding: 2rem 1.5rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.team-section {
    text-align: center;
}

.team-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--ink);
}

.score {
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    font-weight: 800;
    font-stretch: 86%;
    line-height: 0.95;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.vs-text {
    font-size: 1.5rem;
    color: var(--ink-3);
    font-weight: 700;
}

.score-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--ink-2);
}

.button-group {
    display: flex;
    gap: 0.5rem;
}

.btn-score {
    flex: 1;
    height: 60px;
    padding: 0 1rem;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    font-size: 1.75rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s var(--ease-out-expo);
}

.btn-score:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.btn-score:active {
    transform: scale(0.97);
}

.game-list-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.game-list-section h3 {
    margin-bottom: 1.25rem;
    color: var(--ink);
}

.game-item {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.625rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    font-size: 1rem;
    text-align: left;
    width: 100%;
    color: var(--ink);
}

.game-item:hover {
    background: var(--surface-2);
    border-color: var(--line-strong);
}

.game-item.active {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.game-item-time {
    color: var(--ink-3);
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
}

.game-item-match {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.game-item-score {
    color: var(--accent);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Status */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.status-geplant {
    background: var(--neutral-soft-2);
    color: var(--ink-2);
}

.status-läuft {
    background: var(--success-soft-2);
    color: var(--success);
}

.status-beendet {
    background: var(--neutral-soft);
    color: var(--ink-3);
}

@media (prefers-reduced-motion: no-preference) {
    .status-läuft {
        animation: pulse 2s ease-in-out infinite;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.action-buttons button {
    flex: 1;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: 1px solid;
    min-width: 150px;
}

.btn-save {
    background: var(--success-soft);
    border-color: var(--success);
    color: var(--success);
}

.btn-save:hover {
    background: var(--success);
    color: var(--on-solid);
}

.btn-end {
    background: var(--danger-soft);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-end:hover {
    background: var(--danger);
    color: var(--on-solid);
}

.btn-cancel {
    background: var(--surface-2);
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-cancel:hover {
    background: var(--surface-3);
}

/* Live-Anzeigetafel */
.live-scoreboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--line);
}

.score-board-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    width: 100%;
    margin: 2rem 0;
}

.team-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.team-logo-placeholder {
    width: 80px;
    height: 80px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink-2);
}

.big-score {
    font-size: 6rem;
    font-weight: 800;
    font-stretch: 86%;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.score-divider {
    font-size: 3rem;
    color: var(--ink-3);
}

.score-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-goal {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s var(--ease-out-expo), background-color 0.15s ease;
}

.btn-goal.plus {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn-goal.plus:active {
    transform: scale(0.95);
}

.btn-goal.minus {
    background: var(--surface-2);
    color: var(--ink-2);
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
}

/* MVP-Nominierung */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.team-nomination-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.team-nom-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.nomination-group {
    margin-bottom: 1rem;
}

.nomination-group label {
    font-size: 0.8125rem;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ==================== HILFSKLASSEN ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 5px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ink-3);
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1180px) {
    .nav {
        display: none !important;
    }

    .hamburger-btn {
        display: flex !important;
    }

    .header {
        gap: 1rem;
    }

    .header-left {
        flex: 1;
    }

    .header-right {
        order: 2;
    }

    .hamburger-btn {
        order: 3;
    }

    .searchbar-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }

    .logo {
        width: 38px;
        height: 38px;
    }

    .user-info {
        display: none;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 1.25rem;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    .searchbar-input {
        width: 100% !important;
        margin-bottom: 0.5rem;
    }

    .content-card,
    .quick-actions,
    .game-list-section,
    .active-game-section {
        padding: 1.25rem;
    }

    .game-mode-grid,
    .score-controls {
        grid-template-columns: 1fr;
    }

    .score-display {
        gap: 0.75rem;
        padding: 1.5rem 1rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
    }

    .footer {
        padding: 2.5rem 1rem;
    }

    .sponsors-grid {
        gap: 2rem;
    }

    .sponsor-logo {
        height: 36px;
    }

    .main-sponsor,
    .leuchteauf,
    .sparkasse {
        height: 52px;
    }
}

@media (max-width: 768px) {
    .active-game-section {
        padding: 0.75rem;
    }

    .live-scoreboard {
        padding: 1.25rem 1rem;
    }

    .score-board-main {
        gap: 0.5rem;
        margin: 1.25rem 0;
    }

    .team-display {
        min-width: 0;
        text-align: center;
    }

    .big-score {
        font-size: 4.5rem;
    }

    .score-divider {
        font-size: 2rem;
    }

    .score-actions {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .header-title-sub {
        display: none;
    }
}

/* ==================== ANMELDESEITEN ==================== */
.auth-layout {
    display: grid;
    min-height: 100dvh;
    flex: 1;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
}

.auth-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 3rem 0;
}

.auth-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 1rem;
    hyphens: manual;
}

.auth-text {
    font-size: 0.9375rem;
    line-height: 1.625;
    color: var(--ink-2);
    margin-bottom: 2rem;
    max-width: 38ch;
}

.auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    padding: 0 1.25rem;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, transform 0.15s var(--ease-out-expo);
}

.auth-button:hover {
    background: var(--accent-hover);
}

.auth-button:active {
    transform: scale(0.98);
}

.auth-hint {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--ink-3);
}

.auth-error {
    background: var(--danger-soft);
    border: 1px solid var(--danger);
    border-left-width: 3px;
    border-radius: var(--radius);
    color: var(--danger);
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.auth-sponsors .sponsors-grid {
    gap: 1.75rem 2.25rem;
}

.auth-sponsors .sponsor-logo {
    height: 30px;
    max-width: 110px;
}

.auth-sponsors .main-sponsor,
.auth-sponsors .leuchteauf,
.auth-sponsors .sparkasse {
    height: 44px;
}

.auth-visual {
    display: none;
    position: relative;
    overflow: hidden;
}

.auth-visual-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 35% 30%;
    filter: grayscale(35%);
}

.auth-visual-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, var(--bg), transparent 6rem),
        linear-gradient(to top, var(--bg), rgba(11, 10, 12, 0.35) 45%, rgba(11, 10, 12, 0.1));
}

@media (min-width: 640px) {
    .auth-panel {
        padding: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .auth-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    }

    .auth-panel {
        padding: 2.5rem 4rem;
    }

    .auth-visual {
        display: block;
    }

    .auth-sponsors .sponsors-grid {
        justify-content: flex-start;
    }

    .auth-sponsors .sponsors-title {
        text-align: left;
    }
}
