/* Tennis-Verein System - Styles */

:root {
    --court-green: #1a4d2e;
    --court-light: #4a7c59;
    --ball-yellow: #f4d35e;
    --white: #faf9f6;
    --text: #1a1a1a;
    --muted: #6b7280;
    --success: #22c55e;
    --error: #ef4444;

    /* Responsive Breakpoints (nur zur Dokumentation, Media Queries nutzen numerische Werte) */
    /* --bp-mobile: 640px  | --bp-tablet: 768px  | --bp-desktop: 900px  | --bp-wide: 1200px */
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #0f2922 0%, var(--court-green) 50%, #2d5a3d 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.main-header {
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 48px;
    width: auto;
    display: block;
}

.main-nav ul.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.main-nav .nav-cta {
    margin-left: 1rem;
    background: var(--ball-yellow) !important;
    color: #0d2818 !important;
    font-weight: 700;
    text-shadow: 0 0 1px rgba(0,0,0,0.1);
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--ball-yellow);
}

.main-nav .nav-cta:hover {
    color: #0d2818 !important;
    background: #f5d966 !important;
}

/* Login-Button & User-Icon */
.main-nav .nav-login-btn {
    margin-left: 1rem;
    color: var(--white) !important;
    border-color: rgba(255,255,255,0.8);
}

.main-nav .nav-login-btn:hover {
    color: var(--court-green) !important;
    background: var(--white) !important;
    border-color: var(--white);
}

.nav-user-wrapper {
    position: relative;
    margin-left: 1rem;
}

@media (min-width: 901px) {
    .nav-user-wrapper {
        margin-left: 0.35rem;
    }
}

.nav-user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.nav-user-btn:hover {
    background: rgba(255,255,255,0.35);
    color: var(--ball-yellow);
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 180px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    overflow: hidden;
    z-index: 1000;
}

.nav-user-dropdown a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--court-green) !important;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #e5e7eb;
}

.nav-user-dropdown a:last-child {
    border-bottom: none;
}

.nav-user-dropdown a:hover {
    background: #f3f4f6;
    color: var(--court-light) !important;
}

.login-fehler {
    color: var(--error);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.veranstaltungen-liste {
    display: grid;
    gap: 1.5rem;
}

.veranstaltung-inner {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.veranstaltung-teaser {
    flex-shrink: 0;
    width: 180px;
}

.veranstaltung-teaser img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
}

.veranstaltung-body {
    flex: 1;
    min-width: 0;
}

.veranstaltung-headline {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.veranstaltung-datum {
    font-size: 0.9rem;
    color: var(--court-green);
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.veranstaltung-content {
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

.veranstaltung-teaser-klickbar {
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
}

.veranstaltung-teaser-klickbar:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.veranstaltung-teaser-text {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.veranstaltung-oeffnen-hinweis {
    font-size: 0.85rem;
    color: var(--court-green);
    margin: 0;
}

.veranstaltung-detail-modal .modal-inhalt {
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.veranstaltung-modal-datum {
    color: var(--court-green);
    font-weight: 600;
    margin: 0 0 1rem;
}

.veranstaltung-modal-teaser {
    margin-bottom: 1rem;
}

.veranstaltung-modal-teaser img {
    max-width: 100%;
    max-height: 320px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.veranstaltung-modal-content {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.veranstaltung-modal-helfer-area h4 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.veranstaltung-modal-helfer-liste {
    margin: 0 0 0.75rem;
}

.veranstaltung-helfer-badge-wrap {
    display: block;
    margin-top: 0.5rem;
}

.veranstaltung-helfer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #0d5c0d;
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.08) 0%, rgba(34, 139, 34, 0.14) 100%);
    border: 1px solid rgba(34, 139, 34, 0.25);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(34, 139, 34, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}

.veranstaltung-helfer-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--court-green);
    border-radius: 50%;
}

.veranstaltung-helfer-badge:hover {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.12) 0%, rgba(34, 139, 34, 0.2) 100%);
    border-color: rgba(34, 139, 34, 0.4);
    box-shadow: 0 2px 8px rgba(34, 139, 34, 0.15);
    transform: translateY(-1px);
}

.helfer-popup {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
}

.helfer-popup[hidden] {
    display: none;
}

.helfer-popup-inhalt {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.helfer-popup-titel {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--court-green);
}

.helfer-popup-liste {
    margin: 0 0 1rem;
    line-height: 1.5;
}

.helfer-popup-schliessen {
    display: block;
}

/* Profil-Seite */
.profil-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
}

.profil-foto-wrapper {
    margin-bottom: 1rem;
}

.profil-foto {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.profil-foto-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.profil-foto-form .form-group {
    margin-bottom: 0.75rem;
}

.profil-daten-card h3 {
    font-size: 1rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--court-green);
}

/* Crop-Overlay (aus Manacare) */
.profil-crop-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profil-crop-overlay[hidden] {
    display: none !important;
}

.profil-crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.profil-crop-content {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 320px;
    max-width: 90vw;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.profil-crop-content h4 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.crop-container {
    position: relative;
    width: 100%;
    min-width: 280px;
    height: 360px;
    max-width: 480px;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.crop-container img {
    display: block;
    max-width: none !important;
}

.profil-crop-error {
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.profil-crop-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.main-content:has(.index-layout) {
    max-width: 1560px;
}

.main-content:has(.platzbuchung-layout) {
    max-width: 2000px;
}

.index-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.index-main {
    flex: 1;
    min-width: 0;
}

.index-sidebar {
    width: 340px;
    flex-shrink: 0;
    margin-top: calc(10rem + 30px); /* aligne mit erster Box + 30px nach unten */
}

.index-sidebar-sticky {
    position: sticky;
    top: 6rem;
}

.index-sidebar .fb-feed-sticky {
    background: var(--white);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.index-sidebar .fb-page iframe {
    max-width: 100%;
}

.fb-follow-card h3 {
    margin-top: 0;
}

.index-fb-link {
    margin-top: 0.5rem;
    display: block;
    text-align: center;
}

.index-sidebar .index-sidebar-buchungen {
    margin-top: 1.5rem;
    width: 100%;
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--white);
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.hero p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.page-header {
    margin-bottom: 2rem;
    color: var(--white);
}

.page-header h1 {
    font-size: 1.75rem;
}

.page-header p {
    opacity: 0.9;
    margin-top: 0.25rem;
}

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.card h2 {
    margin-bottom: 1rem;
    color: var(--court-green);
    font-size: 1.25rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dashboard-grid .card h2,
.dashboard-grid .card h3 {
    text-align: center;
}

.ergebnisse-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border-bottom: 2px solid #e2e8f0;
}

.ergebnisse-tab {
    padding: 0.6rem 1.25rem;
    border: none;
    background: transparent;
    font: inherit;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.ergebnisse-tab:hover {
    color: var(--court-green);
}

.ergebnisse-tab.active {
    color: var(--court-green);
    border-bottom-color: var(--court-green);
}

.ergebnisse-tab-panel {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.engste-spiele-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rangliste-sort-buttons {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.rangliste-sort-buttons .sort-label {
    font-weight: 600;
    color: var(--court-green);
    font-size: 0.95rem;
}

.rangliste-sort-buttons .btn {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
}

.rangliste-nach-kategorie {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
}

.rangliste-nach-kategorie .card {
    min-width: 0;
}

.meistertafel-tabelle .meistertafel-jahr {
    font-weight: 600;
    color: var(--court-green);
}

.meistertafel-tabelle td.meistertafel-sieger {
    font-weight: 600;
    color: var(--court-green);
}

.meistertafel-tabelle td.meistertafel-runner-up {
    color: var(--muted);
}

.rangliste-preview,
.dashboard-grid .letzte-spiele,
.dashboard-grid .engste-spiele,
.dashboard-grid .engste-spiele-letzte-woche,
.dashboard-grid .facebook-embed,
.dashboard-grid .facebook-posts,
.dashboard-grid .social-posts {
    grid-column: 1 / -1;
    min-width: 0;
}

.naechste-heimspiele {
    width: fit-content;
    max-width: 100%;
}

.naechste-heimspiele-liste {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

.naechste-heimspiele-liste li {
    font-size: 0.95rem;
    padding: 0.25rem 0;
}

.naechstes-heimspiel-infos .mannschaft {
    color: var(--court-green);
    font-weight: 600;
}

.facebook-post-liste {
    list-style: none;
}

.facebook-post {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.facebook-post:last-child {
    border-bottom: none;
}

.fb-post-picture {
    display: block;
    margin-bottom: 0.5rem;
}

.fb-post-picture img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.fb-post-message {
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

.fb-post-date {
    font-size: 0.85rem;
    color: var(--muted);
}

.fb-post-link {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: var(--court-light);
}

.fb-post-link:hover {
    color: var(--ball-yellow);
}

.facebook-posts .hint,
.facebook-embed .hint,
.fb-page-wrapper .hint {
    font-size: 0.9rem;
    margin: 1rem 0 0;
}

.facebook-embed .fb-page-wrapper,
.facebook-posts .fb-page-wrapper {
    min-height: 500px;
    margin-bottom: 1rem;
}

.facebook-embed .fb-page iframe,
.social-posts .fb-page iframe {
    max-width: 100%;
}

.social-post-liste {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.social-post {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}

.social-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0 0 4px 0;
    background: var(--court-light);
    color: white;
    margin: 0;
    align-self: flex-start;
}

.social-badge-fb {
    background: #1877f2;
}

.social-badge-ig {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-post.gleicher-inhalt .social-badge {
    background: var(--success);
}

.social-post-media {
    flex-shrink: 0;
    aspect-ratio: 1;
    overflow: hidden;
    background: rgba(0,0,0,0.1);
    position: relative;
}

.social-post-media .social-badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.social-post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-post-media a {
    display: block;
    width: 100%;
    height: 100%;
}

.social-post-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    min-height: 0;
}

.social-post-message {
    flex: 1;
    margin: 0 0 0.5rem;
    line-height: 1.45;
    font-size: 0.9rem;
    min-height: 3.2em;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.social-post-date {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.social-post-links,
.social-post-body > a {
    font-size: 0.85rem;
}

.social-post-links a,
.social-post-body > a {
    color: var(--court-light);
}

.social-post-links a:hover,
.social-post-body > a:hover {
    color: var(--ball-yellow);
}

.social-post-links .sep {
    margin: 0 0.4rem;
    color: var(--muted);
}

.social-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.social-posts .fb-page-wrapper,
.social-posts .hint {
    margin-bottom: 1rem;
}

.rangliste-preview-split h2 {
    margin-bottom: 0.75rem;
}

.rangliste-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.rangliste-preview-grid .ranking-list-table .name {
    min-width: 8rem;
}

.rangliste-preview-grid h3 {
    font-size: 1rem;
    color: var(--court-green);
    margin: 0 0 0.5rem;
}

.mannschaften-card h2 {
    margin-bottom: 1.5rem;
}

.mannschaft-block {
    margin-bottom: 2rem;
}

.mannschaft-block:last-child {
    margin-bottom: 0;
}

.mannschaft-block h3 {
    font-size: 1.1rem;
    color: var(--court-green);
    margin-bottom: 0.75rem;
}

.mannschaft-block .liga {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.95rem;
}

.mannschaftsspiele-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.mannschaftsspiele-tabelle th,
.mannschaftsspiele-tabelle td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.mannschaftsspiele-tabelle th {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
}

.mannschaftsspiele-tabelle td:first-child {
    white-space: nowrap;
}

.vereinsmeisterschaft-termine {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vereinsmeisterschaft-termine li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.vereinsmeisterschaft-termine li:last-child {
    border-bottom: none;
}

.vereinsmeisterschaft-termine a {
    color: inherit;
    text-decoration: none;
}

.vereinsmeisterschaft-termine a:hover {
    color: var(--court-green);
    text-decoration: underline;
}

/* ÖTV-Style Turnier-Raster (64er Hauptfeld) */
.link-back {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--court-green);
    text-decoration: none;
}

.link-back:hover {
    text-decoration: underline;
}

.turnier-raster-card.oetv-style {
    overflow: hidden;
    font-family: 'Outfit', system-ui, sans-serif;
}

/* Header wie im PDF */
.turnier-header {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.turnier-header-row {
    margin-bottom: 0.25rem;
}

.turnier-header-row:last-child {
    margin-bottom: 0;
}

.turnier-label {
    color: var(--muted);
    margin-right: 0.25rem;
}

.turnier-meta {
    color: var(--muted);
    font-size: 0.85rem;
}

.turnier-sep {
    margin: 0 0.5rem;
    color: #cbd5e1;
}

/* Bracket-Layout */
.turnier-raster-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
}

.turnier-raster-wrapper > * {
    flex-shrink: 0;
}

.turnier-raster {
    display: flex;
    gap: 0.5rem;
    min-width: max-content;
    align-items: stretch;
}

.turnier-runde {
    min-width: 130px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.turnier-runde-titel {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--court-green);
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.turnier-runde-slots {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    padding-top: 0.5rem;
}

/* Bracket-Baum: Slot-Höhen verdoppeln sich pro Runde */
.turnier-runde[data-runde="0"] .turnier-slot { min-height: 2.2rem; }
.turnier-runde[data-runde="1"] .turnier-slot { min-height: 4.4rem; }
.turnier-runde[data-runde="2"] .turnier-slot { min-height: 8.8rem; }
.turnier-runde[data-runde="3"] .turnier-slot { min-height: 17.6rem; }
.turnier-runde[data-runde="4"] .turnier-slot { min-height: 35.2rem; }

.turnier-slot {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.3;
}

.turnier-slot:last-child {
    margin-bottom: 0;
}

.turnier-slot-spieler {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.turnier-slot-spieler.sieger {
    font-weight: 600;
    color: var(--court-green);
}

.turnier-slot-ergebnis {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

/* Finale & Spiel um Platz 3 */
.turnier-ende {
    display: flex;
    gap: 1.5rem;
    margin-left: 1rem;
    padding: 1rem 0;
    flex-shrink: 0;
}

.turnier-ende-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.turnier-ende-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--court-green);
}

.turnier-slot-finale,
.turnier-slot-platz3 {
    min-height: auto !important;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.turnier-sieger-box {
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, rgba(244, 211, 94, 0.2), rgba(244, 211, 94, 0.4));
    border-radius: 8px;
}

.turnier-sieger-box .turnier-sieger-label {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
}

.turnier-sieger-box .turnier-sieger-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--court-green);
}

.ranking-list {
    list-style: none;
    counter-reset: rang;
}

.ranking-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    counter-increment: rang;
}

.ranking-list li:last-child {
    border-bottom: none;
}

.ranking-list .rang {
    font-weight: 700;
    color: var(--court-green);
    min-width: 2rem;
}

.ranking-list .name {
    flex: 1;
}

.ranking-list .punkte {
    font-weight: 600;
    color: var(--court-light);
}

.ranking-list-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-list-table th,
.ranking-list-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.ranking-list-table th {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
}

.ranking-list-table .rang {
    font-weight: 700;
    color: var(--court-green);
    width: 2.5rem;
}

.ranking-list-table .itn {
    width: 3rem;
}

.stat-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-box {
    background: #f3f4f6;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-zahl {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--court-green);
}

.chart-container {
    position: relative;
    height: 320px;
    margin-top: 1rem;
}
.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--muted);
}

.spiele-tabelle .ergebnis {
    font-family: var(--font-mono, monospace);
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

.ranking-list-table .punkte {
    font-weight: 600;
    color: var(--court-light);
}

.spiel-tabelle {
    width: 100%;
    border-collapse: collapse;
}

.spiel-tabelle th,
.spiel-tabelle td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.spiel-tabelle th {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 2px solid var(--court-light);
}

.spiel-tabelle tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.spiel-tabelle .spiel-datum {
    width: 3.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.spiel-tabelle .vs {
    width: 2rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.spiel-tabelle .spieler {
    min-width: 6rem;
}

.spiel-tabelle .ergebnis {
    font-family: var(--font-mono, 'SF Mono', Monaco, monospace);
    font-weight: 600;
    color: var(--court-green);
    white-space: nowrap;
}

.spiel-tabelle .sieger {
    font-weight: 600;
    color: var(--court-green);
}

.spiel-tabelle .itn-differenz {
    font-size: 0.85rem;
    color: var(--muted);
}

.spiel-tabelle .vorhersage-hinweis {
    width: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--court-green);
    cursor: help;
}

.spiel-tabelle .vorhersage-hinweis span {
    cursor: help;
}

/* Reaktions-Picker: Ein Button öffnet Popover mit Emojis (wie Facebook, Slack) */
.letzte-spiele-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
}

.spiel-tabelle .like-cell,
.rangliste-tabelle .like-cell,
.spiele-tabelle .like-cell {
    width: 1%;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}
.reaktionen-wrapper {
    display: inline-flex;
    justify-content: flex-end;
}
.reaktion-trigger-wrapper {
    position: relative;
}
.reaktion-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--gray-300, #d1d5db);
    background: white;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.reaktion-trigger:hover:not(:disabled) {
    background: var(--gray-50, #f9fafb);
    border-color: var(--court-green, #166534);
}
.reaktion-trigger:disabled {
    cursor: default;
    opacity: 0.7;
}
.reaktion-trigger.has-reaktion {
    background: rgba(22, 101, 52, 0.08);
    border-color: var(--court-green, #166534);
}
.reaktion-trigger .reaktion-trigger-icon {
    font-size: 1rem;
}
.reaktion-trigger .reaktion-summary {
    min-width: 1.25em;
    font-size: 0.8rem;
    color: var(--gray-600, #4b5563);
}

.reaktion-popover {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    display: inline-flex;
    gap: 0.15rem;
    padding: 0.35rem;
    background: white;
    border: 1px solid var(--gray-300, #d1d5db);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 200;
}
.reaktion-popover[hidden] {
    display: none !important;
}

.reaktion-emoji-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.2rem 0.4rem;
    border: none;
    background: transparent;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.reaktion-emoji-btn:hover {
    background: var(--gray-100, #f3f4f6);
    transform: scale(1.15);
}
.reaktion-emoji-btn.liked {
    background: rgba(22, 101, 52, 0.1);
}
.reaktion-emoji-btn .reaktion-emoji-count {
    font-size: 0.7rem;
    color: var(--gray-500, #6b7280);
}
.reaktion-emoji-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-0.5rem);
    padding: 0.5rem 0.75rem;
    background: rgba(0,0,0,0.85);
    color: white;
    font-size: 0.8rem;
    border-radius: 6px;
    max-width: 220px;
    white-space: nowrap;
    z-index: 201;
    pointer-events: none;
}
.reaktion-emoji-tooltip[hidden] {
    display: none !important;
}

.spiel-liste-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--court-green);
    border-bottom: 2px solid var(--court-light);
    margin-bottom: 0.25rem;
}

.spiel-liste-header .spiel-datum {
    width: 3rem;
}

.spiel-liste {
    list-style: none;
}

.spiel-liste li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.spiel-liste .spiel-datum {
    font-size: 0.85rem;
    color: var(--muted);
    width: 3rem;
    flex-shrink: 0;
}

.spiel-liste .vs {
    color: var(--muted);
    font-size: 0.9rem;
}

.spiel-liste .sieger {
    margin-left: auto;
    font-weight: 600;
    color: var(--court-green);
}

.spiel-liste .itn-differenz {
    font-size: 0.85rem;
    color: var(--muted);
}

.spiel-liste .vorhersage-hinweis {
    font-size: 0.9rem;
    color: var(--court-green);
    cursor: help;
}

.spiel-liste .ergebnis {
    font-family: var(--font-mono, 'SF Mono', Monaco, monospace);
    font-weight: 600;
    color: var(--court-green);
}

.quick-actions {
    text-align: center;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--ball-yellow);
    color: var(--court-green);
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(244, 211, 94, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--court-green);
    border: 2px solid var(--court-green);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.rangliste-tabelle,
.herausforderung-tabelle {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.rangliste-tabelle th,
.herausforderung-tabelle th,
.rangliste-tabelle td,
.herausforderung-tabelle td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.rangliste-tabelle th,
.herausforderung-tabelle th {
    background: #f3f4f6;
    color: var(--court-green);
    font-weight: 600;
}

.rangliste-spieler-clickable {
    cursor: pointer;
}

.rangliste-spieler {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rangliste-name-mobile {
    display: none !important;
}

.rangliste-name-stack {
    flex-direction: column;
    line-height: 1.25;
}

.rangliste-name-stack .rangliste-nachname {
    font-weight: 600;
}

.rangliste-name-stack .rangliste-vorname {
    font-size: 0.9em;
    color: var(--muted);
}

.rangliste-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.rangliste-avatar-placeholder {
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rangliste-avatar-placeholder svg {
    color: #9ca3af;
}

.rangliste-avatar-clickable {
    cursor: pointer;
}

.rangliste-name-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.rangliste-name-btn:hover {
    text-decoration: underline;
    color: var(--court-green);
}

.rangliste-spieler-details-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rangliste-spieler-details-modal[hidden] {
    display: none !important;
}

.rangliste-details-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    cursor: pointer;
}

.rangliste-details-content {
    position: relative;
    max-width: 360px;
    width: 90%;
}

.rangliste-details-content h2 {
    margin-bottom: 1rem;
}

.rangliste-details-header {
    margin-bottom: 1rem;
}

.rangliste-details-profilbild {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
}

.rangliste-details-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1.25rem;
}

.rangliste-details-list dt {
    color: var(--muted);
    font-weight: 500;
}

.rangliste-details-list dd {
    margin: 0;
    font-weight: 600;
}

.rangliste-profilbild-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rangliste-profilbild-modal[hidden] {
    display: none !important;
}

.rangliste-profilbild-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    cursor: pointer;
}

.rangliste-profilbild-content {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    text-align: center;
}

.rangliste-profilbild-content img {
    display: block;
    max-width: 320px;
    max-height: 320px;
    width: auto;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
}

.rangliste-profilbild-name {
    margin: 1rem 0 0;
    font-weight: 600;
    color: var(--court-green);
}

.herausforderung-liste {
    list-style: none;
}

.herausforderung-liste li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.herausforderung-liste .aktionen {
    display: flex;
    gap: 0.5rem;
}

.hinweis {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #fef3c7;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* Hinweis in page-header: dunkler Text für Lesbarkeit auf hellem Hintergrund */
.page-header .hinweis {
    color: #78350f;
    border: 1px solid #fcd34d;
}

.regeln ul {
    margin-left: 1.25rem;
    margin-bottom: 1rem;
}

.regeln li {
    margin-bottom: 0.5rem;
}

.muted {
    color: var(--muted);
}

.badge {
    background: #e5e7eb;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.meldung {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.meldung.success {
    background: #d1fae5;
    color: #065f46;
}

.meldung.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Ergebnis-Schnellauswahl aus Buchungen */
.ergebnis-schnellauswahl h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}
.ergebnis-schnellauswahl .muted {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.ergebnis-buchungsliste {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.ergebnis-buchung-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}
.ergebnis-buchung-info {
    flex: 1;
    min-width: 180px;
}
.ergebnis-buchung-actions {
    display: flex;
    gap: 0.5rem;
}

/* Schlagtraining (Statistiken) */
.training-liste {
    list-style: none;
    margin: 0;
    padding: 0;
}
.training-liste-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}
.training-liste-item:last-child {
    border-bottom: none;
}
.training-info {
    flex: 1;
    min-width: 160px;
    font-size: 0.9rem;
    color: var(--muted);
}
.training-spieler {
    flex: 1;
    min-width: 140px;
}

/* Ergebnis-Formular */
.ergebnis-form .form-group {
    margin-bottom: 1rem;
}

.ergebnis-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.ergebnis-form select,
.ergebnis-form input[type="number"] {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    min-width: 120px;
}

.ergebnis-form h3 {
    margin: 1.25rem 0 0.75rem;
    color: var(--court-green);
}

.saetze-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.satz {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.satz label {
    margin-right: 0.5rem;
    min-width: 100px;
}

.satz input {
    width: 4rem;
}

.ergebnis-form button[type="submit"] {
    margin-top: 0.5rem;
}

#sieger-select:disabled {
    background: #f3f4f6;
    color: var(--muted);
}

.main-footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.main-footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.main-footer a:hover {
    color: var(--ball-yellow);
    text-decoration: underline;
}

/* Admin-Bereich */
.admin-header .logo-text {
    color: var(--white);
    font-weight: 600;
}

.admin-nav a {
    color: var(--white);
}

.admin-menu-liste {
    list-style: none;
}

.admin-menu-liste li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.admin-menu-liste li:last-child {
    border-bottom: none;
}

.admin-menu-liste a {
    color: var(--court-green);
    text-decoration: none;
    font-weight: 500;
}

.admin-menu-liste a:hover {
    color: var(--court-light);
    text-decoration: underline;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-header-flex h2 {
    margin-bottom: 0;
}

.admin-form .form-group {
    margin-bottom: 1rem;
}

.admin-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="date"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    max-width: 20rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 8rem;
}

.form-check label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.fehler-liste {
    color: var(--error);
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.admin-tabelle {
    width: 100%;
    border-collapse: collapse;
}

.admin-tabelle th,
.admin-tabelle td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.admin-tabelle th {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
}

.admin-tabelle tr.inaktiv {
    opacity: 0.6;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.status-aktiv {
    background: #dcfce7;
    color: #166534;
}

.status-badge.status-passiv {
    background: #f3f4f6;
    color: #6b7280;
}

.admin-tabelle .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

.meldung-erfolg {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #d1fae5;
    color: #065f46;
}

/* Bespannungen (Meine Statistiken) */
.card-bespannungen .besaitung-form-aktionen {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.card-bespannungen .besaitung-liste .admin-tabelle th:last-child,
.card-bespannungen .besaitung-liste .admin-tabelle td:last-child {
    text-align: right;
}

.card-bespannungen .besaitung-liste .admin-tabelle td:last-child .btn {
    margin-left: 0.25rem;
}

/* Timelog Detail-Card (Seitenaufenthalte) */
.seiten-detail-row td {
    background: var(--gray-100, #f3f4f6);
    padding: 0 !important;
    border-top: none;
    vertical-align: top;
}
.seiten-detail-card {
    padding: 1rem 1.5rem;
    margin: 0.5rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--gray-200, #e5e7eb);
}
.seiten-detail-card h4 {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--court-green, #166534);
}
.admin-tabelle-compact {
    font-size: 0.9rem;
}
.admin-tabelle-compact th,
.admin-tabelle-compact td {
    padding: 0.35rem 0.75rem 0.35rem 0;
}

/* Platzbuchung */
.platzbuchung-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.kalender-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.kalender-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.kalender-nav .btn {
    padding: 0.35rem 0.6rem;
}

.kalender-view-toggle {
    display: flex;
    gap: 0.25rem;
}

.view-toggle-btn.active {
    background: var(--court-green);
    color: white;
    border-color: var(--court-green);
}

.kalender-header h2 {
    font-size: 1rem;
    margin: 0;
    min-width: 10rem;
    text-align: center;
}

/* Wochenansicht – nutzt verfügbare Breite, scrollt nur wenn nötig */
.zeitplan-woche-wrapper {
    overflow-x: auto;
    width: 100%;
}

.buchungskalender .zeitplan {
    min-width: 0;
}

.zeitplan-tabelle.zeitplan-woche {
    width: 100%;
    table-layout: fixed;
}

.zeitplan-woche .zeit-col {
    width: 4rem;
}

.zeitplan-woche th.tag-group {
    font-size: 0.85rem;
    padding: 0.35rem 0.2rem;
}

.zeitplan-woche th:not(.zeit-col):not(.tag-group) {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.15rem;
}

.zeitplan-woche td.slot-cell {
    padding: 0.25rem 0.15rem;
    font-size: 0.65rem;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Dickere Trennlinie zwischen Tagen in der Wochenansicht */
.zeitplan-woche .tag-trenner,
.zeitplan-woche th.tag-trenner,
.zeitplan-woche td.tag-trenner {
    border-right: 2px solid #000 !important;
}

.zeitplan-tabelle {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.zeitplan-tabelle th,
.zeitplan-tabelle td {
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.zeitplan-tabelle th:first-child,
.zeitplan-tabelle td:first-child {
    width: 5rem;
}

.zeitplan-tabelle th:not(:first-child) {
    width: calc((100% - 5rem) / 6);
}

.zeitplan-tabelle th {
    background: #f3f4f6;
    font-weight: 600;
}

.zeitplan-tabelle .zeit {
    text-align: right;
    font-weight: 500;
    min-width: 4rem;
}

.slot-cell {
    min-height: 2rem;
    cursor: default;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
}
.slot-cell .slot-namen {
    font-size: 0.95rem;
    font-weight: 500;
    display: block;
    overflow: hidden;
    line-height: 1.2;
}

.slot-cell.frei {
    cursor: pointer;
    background: #e8f5e9;
}

.slot-cell.frei:hover {
    background: #c8e6c9;
}

.slot-cell.selected {
    background: var(--ball-yellow) !important;
}

.slot-cell.belegt {
    background: #fef3c7;
}
.slot-cell.belegt.belegt-meine {
    cursor: pointer;
    position: relative;
}
.slot-cell.belegt.belegt-meine:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 77, 46, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 28px;
    pointer-events: none;
}


.slot-cell.belegt-mehrstündig {
    background: #fde68a;
}

.slot-cell.belegt-start {
    border: 2px solid var(--court-green);
    border-bottom: none;
}

.slot-cell.belegt-mitte {
    border-left: 2px solid var(--court-green);
    border-right: 2px solid var(--court-green);
    border-top: none;
}

.slot-cell.belegt-ende {
    border: 2px solid var(--court-green);
    border-top: none;
}

.slot-cell.belegt-ranglistenspiel {
    background: #bbf7d0;
}

.slot-cell.belegt-training {
    background: #bfdbfe;
}

.slot-cell.belegt-suche-mitspieler {
    background: #fed7aa;
}

.slot-cell.belegt-alleine {
    background: #e5e7eb;
}

.zeitbereich-info {
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--court-green);
}

.kalender-legende {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.8rem;
    color: var(--muted);
}
.kalender-legende-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.kalender-legende-color {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.08);
}

.meine-buchungen ul {
    list-style: none;
}

.meine-buchungen li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    overflow: hidden;
    min-width: 0;
}

.meine-buchungen li.leer {
    color: var(--muted);
}

.meine-buchungen .platz {
    color: var(--court-green);
    font-weight: 500;
}

.meine-buchungen .spielpartner {
    color: var(--muted);
    font-size: 0.9rem;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

.meine-buchungen li .stornieren-btn-index,
.meine-buchungen li .btn-outline.stornieren-btn-index {
    margin-left: auto;
    flex-shrink: 0;
}

.meine-buchungen-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-left: auto;
    flex-shrink: 0;
}

.meine-buchungen-buttons .btn {
    min-width: 7rem;
}

.meine-buchungen-tabelle .meine-buchungen-header {
    display: grid;
    grid-template-columns: 1fr 0.8fr 1.2fr auto;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 2px solid #e5e7eb;
}

.meine-buchungen-tabelle .meine-buchungen-header .meine-buchungen-actions {
    min-width: 7rem;
}

.meine-buchungen-tabelle #meine-buchungen-liste {
    margin: 0;
    padding: 0;
}

.meine-buchungen-tabelle #meine-buchungen-liste li {
    display: grid;
    grid-template-columns: 1fr 0.8fr 1.2fr auto;
    gap: 0.75rem;
    align-items: center;
}

.meine-buchungen-tabelle .meine-buchungen-gegner {
    font-size: 1rem;
}

.meine-buchungen-tabelle .meine-buchungen-datum,
.meine-buchungen-tabelle .meine-buchungen-platz {
    font-size: 1rem;
}

.meine-buchungen-tabelle .meine-buchungen-platz {
    color: var(--court-green);
    font-weight: 500;
}

.meine-buchungen-tabelle #meine-buchungen-liste li.leer {
    grid-column: 1 / -1;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal[hidden] {
    display: none !important;
}

.modal-inhalt {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    pointer-events: auto;
}

.modal-inhalt button,
.modal-inhalt select {
    cursor: pointer;
}

.modal-inhalt h3 {
    margin-bottom: 1rem;
}

.modal-inhalt .form-group {
    margin-bottom: 1rem;
}

.modal-inhalt .form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.modal-inhalt .form-group-checkbox {
    margin-bottom: 0.75rem;
}
.modal-inhalt .form-group-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    cursor: pointer;
}
.modal-inhalt .form-group-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.modal-inhalt input,
.modal-inhalt select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.modal-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: center;
}
.modal-aktionen-spacer {
    flex: 1;
}
.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
}
.btn-danger:hover {
    background: #b91c1c;
}
.form-inline-zeit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-inline-zeit input[type="time"] {
    flex: 1;
    min-width: 0;
}

/* Mobile Navigation */
.nav-mobile-panel {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--white);
}
.nav-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Sticky Platzbuchung-Button – immer sichtbar bis 1200px (Tablets, Phones) */
.mobile-platzbuchung-bar {
    display: none;
}
.login-seite .mobile-platzbuchung-bar,
.platzbuchung-seite .mobile-platzbuchung-bar {
    display: none !important;
}

/* ==========================================================================
   RESPONSIVE – Alle Mobile-/Tablet-Overrides (max-width = Desktop-First)
   Desktop: Basis-Styles oben, ab breakpoint gelten die Overrides
   Breakpoints: 480 | 560 | 640 | 700 | 768 | 900 | 1100 | 1200
   ========================================================================== */

/* === 1200px: Sticky Platzbuchung-Button (Tablets, Phones) === */
@media (max-width: 1200px) {
    .mobile-platzbuchung-bar {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 1rem 1.5rem;
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        background: var(--ball-yellow);
        color: #0d2818 !important;
        font-weight: 700;
        font-size: 1.15rem;
        text-decoration: none;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
        z-index: 999;
    }
    .login-seite .mobile-platzbuchung-bar,
    .platzbuchung-seite .mobile-platzbuchung-bar {
        display: none !important;
    }
    .mobile-platzbuchung-bar:hover {
        background: #f5d966;
        color: #0d2818 !important;
    }
    body:not(.login-seite):not(.platzbuchung-seite) {
        padding-bottom: 70px;
    }
}

/* === 1100px: Index Sidebar ausblenden === */
@media (max-width: 1100px) {
    .index-sidebar {
        display: none;
    }
}

/* === 900px: Tablet – Navigation Mobile-Menü, Platzbuchung, Social === */
@media (max-width: 900px) {
    .nav-mobile-toggle {
        display: flex;
    }
    .nav-mobile-panel {
        flex-basis: 100%;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.2s ease;
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .main-nav.nav-open .nav-mobile-panel {
        max-height: 500px;
        opacity: 1;
    }
    .main-nav {
        flex-wrap: wrap;
    }
    .main-nav .nav-links {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0 0;
        margin-top: 0.5rem;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    .main-nav .nav-links li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .main-nav .nav-links a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.05rem;
    }
    .main-nav .nav-links .nav-link-platzbuchung {
        font-weight: 700;
        color: var(--ball-yellow) !important;
        font-size: 1.15rem;
    }
    .main-nav .nav-cta {
        margin: 1rem 0 0;
        margin-left: 0;
        justify-content: center;
    }
    .platzbuchung-layout {
        grid-template-columns: 1fr;
    }
    .social-post-liste {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === 768px: Tablet klein – Rangliste, Tabellen, Turnier, Herausforderung === */
@media (max-width: 768px) {
    .rangliste-nach-kategorie {
        grid-template-columns: 1fr;
    }
    .rangliste-name-desktop {
        display: none !important;
    }
    .rangliste-name-mobile {
        display: flex !important;
    }
    .rangliste-tabelle th,
    .rangliste-tabelle td {
        padding: 0.5rem 0.4rem;
    }
    .rangliste-tabelle th:nth-child(1),
    .rangliste-tabelle td:nth-child(1) {
        padding-left: 0.5rem;
    }
    .rangliste-tabelle.herausforderung-tabelle th:nth-child(5),
    .rangliste-tabelle.herausforderung-tabelle td:nth-child(5) {
        display: none;
    }
    .herausforderung-tabelle tr.herausforderbar {
        background: rgba(244, 211, 94, 0.25);
        cursor: pointer;
    }
    .herausforderung-tabelle tr.herausforderbar:active {
        background: rgba(244, 211, 94, 0.4);
    }
    .table-responsive,
    .admin-tabelle,
    .ranking-list-table,
    .spiel-tabelle,
    .rangliste-preview table,
    .mannschaftsspiele-tabelle {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .rangliste-preview-split {
        overflow-x: auto;
    }
    .rangliste-preview-grid {
        grid-template-columns: 1fr;
    }
    .turnier-runde {
        min-width: 110px;
    }
    .turnier-slot {
        font-size: 0.7rem;
    }
    .turnier-ende {
        flex-direction: column;
        margin-left: 0;
        margin-top: 1rem;
    }
    .meine-statistiken-seite .stat-grid {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .meine-statistiken-seite .stat-box {
        width: 100%;
        max-width: 14rem;
    }
    .letzte-spiele,
    .engste-spiele {
        display: flex;
        flex-direction: column;
    }
    .letzte-spiele .letzte-spiele-aktionen,
    .letzte-spiele > a.btn,
    .engste-spiele > a.btn {
        align-self: center;
        margin-top: 1.25rem;
    }
    .kalender-view-toggle {
        display: none;
    }
}

/* === 700px: Profil === */
@media (max-width: 700px) {
    .profil-layout {
        grid-template-columns: 1fr;
    }
}

/* === 640px: Mobile – Layout, Typo, Spacing === */
@media (max-width: 640px) {
    .logo-img {
        height: 40px;
    }
    .main-header {
        padding: 0.75rem 1rem;
    }
    .main-content {
        padding: 1rem;
        padding-bottom: 2rem;
    }
    .card {
        padding: 1rem;
    }
    .zeitplan-tabelle th,
    .zeitplan-tabelle td {
        padding: 0.35rem;
        font-size: 0.85rem;
    }
    .page-header h1 {
        font-size: 1.4rem;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .hero {
        padding: 2rem 1rem;
    }
    .quick-actions {
        flex-direction: column;
    }
    .quick-actions .btn {
        width: 100%;
    }
    .form-row {
        flex-direction: column;
    }
}

/* === 560px: Social Posts 1 Spalte === */
@media (max-width: 560px) {
    .social-post-liste {
        grid-template-columns: 1fr;
    }
}

/* === 480px: Veranstaltung === */
@media (max-width: 480px) {
    .veranstaltung-inner {
        flex-direction: column;
    }
    .veranstaltung-teaser {
        width: 100%;
    }
}

/* Login-Startseite für nicht eingeloggte Nutzer */
.login-startseite {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-startseite-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.login-startseite-logo {
    display: block;
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-startseite-logo-img {
    height: 140px;
    width: auto;
    max-width: 100%;
}

.login-startseite-titel {
    font-size: 1.5rem;
    text-align: center;
    color: var(--court-green);
    margin-bottom: 0.25rem;
}

.login-startseite-untertitel {
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.login-startseite-form .form-group {
    margin-bottom: 1rem;
}

.login-startseite-form .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.login-startseite-form input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}

.login-startseite-form input:focus {
    outline: none;
    border-color: var(--court-green);
    box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.15);
}

.login-startseite-form .login-fehler {
    background: #fef2f2;
    color: var(--error);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Vereinfachter Header auf Login-Seite */
.main-header--login .nav-links,
.main-header--login .nav-cta,
.main-header--login .nav-login-btn,
.main-header--login .nav-user-wrapper {
    display: none;
}

.main-header--login .main-nav {
    justify-content: center;
}

/* Tippspiel-Seite */
.tippspiel-intro {
    margin-bottom: 1.5rem;
}
.tippspiel-intro p {
    margin: 0 0 0.5rem 0;
}
.tippspiel-intro p:last-child {
    margin-bottom: 0;
}
.tippspiel-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.tippspiel-main {
    flex: 1;
    min-width: 0;
}
.tippspiel-card {
    max-width: 900px;
}
.tippspiel-leaderboard-card {
    width: 280px;
    min-width: 0;
    flex-shrink: 0;
}
.tippspiel-leaderboard-content {
    overflow-x: auto;
    max-width: 100%;
}
.tippspiel-leaderboard-title {
    font-size: 1rem;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}
.tippspiel-leaderboard-tabelle {
    width: 100%;
    min-width: 200px;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
}
.tippspiel-leaderboard-tabelle th:nth-child(1),
.tippspiel-leaderboard-tabelle td:nth-child(1) { width: 12%; }
.tippspiel-leaderboard-tabelle th:nth-child(2),
.tippspiel-leaderboard-tabelle td:nth-child(2) { width: 30%; }
.tippspiel-leaderboard-tabelle th:nth-child(3),
.tippspiel-leaderboard-tabelle td:nth-child(3) { width: 38%; }
.tippspiel-leaderboard-tabelle th:nth-child(4),
.tippspiel-leaderboard-tabelle td:nth-child(4) {
    width: 20%;
    text-align: right;
}
.tippspiel-leaderboard-tabelle th,
.tippspiel-leaderboard-tabelle td {
    padding: 0.35rem 0.5rem;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tippspiel-leaderboard-tabelle th {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
}
.tippspiel-leaderboard-tabelle tbody tr {
    border-bottom: 1px solid #e5e7eb;
}
.tippspiel-leaderboard-actions {
    margin: 0.75rem 0 0;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.9rem;
}
@media (max-width: 768px) {
    .tippspiel-layout {
        flex-direction: column;
    }
    .tippspiel-leaderboard-card {
        width: 100%;
    }
}
.tippspiel-status-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.tippspiel-status-row #tippspiel-status {
    flex: 1;
}
.tippspiel-datum-block {
    margin-bottom: 0.5rem;
}
.tippspiel-datum-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.tippspiel-datum-toggle:hover {
    background: #e5e7eb;
}
.tippspiel-datum-chevron {
    font-size: 0.75rem;
    color: var(--muted);
}
.tippspiel-datum-count {
    font-weight: 400;
    color: var(--muted);
}
.tippspiel-datum-content {
    margin-top: 0.25rem;
    margin-left: 0.5rem;
}
.tippspiel-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1rem;
}
.tippspiel-tab {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    color: var(--muted);
    font-family: inherit;
}
.tippspiel-tab:hover {
    color: var(--court-green);
}
.tippspiel-tab.active {
    color: var(--court-green);
    border-bottom-color: var(--court-green);
}
.tippspiel-turnier-block {
    margin-bottom: 2rem;
}
.tippspiel-turnier-block:last-child {
    margin-bottom: 0;
}
.tippspiel-tabelle .tippspiel-datum {
    font-size: 0.85rem;
    color: var(--muted);
    white-space: nowrap;
}
.tippspiel-tabelle .tippspiel-runde {
    font-size: 0.85rem;
    color: var(--muted);
}
.tippspiel-tabelle .tippspiel-sieger,
.tippspiel-tabelle .tippspiel-sieger strong {
    font-weight: 700;
    color: var(--court-green);
}
.tippspiel-turniersieger-block {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}
.tippspiel-turniersieger-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--court-green);
}
.tippspiel-turniersieger-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.tippspiel-turniersieger-input,
.tippspiel-turniersieger-select {
    flex: 1;
    max-width: 280px;
    padding: 0.35rem 0.5rem;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
}
.tippspiel-turniersieger-select {
    cursor: pointer;
    min-height: 2rem;
}
.tippspiel-turniersieger-input:focus,
.tippspiel-turniersieger-select:focus {
    border-color: var(--court-green);
    outline: none;
}
.tippspiel-turnier-name {
    font-size: 1.1rem;
    color: var(--court-green);
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
}
.tippspiel-naechste-turniere .tippspiel-turnier-name {
    margin-top: 1rem;
}
.tippspiel-naechste-turniere .tippspiel-turnier-name:first-child {
    margin-top: 0;
}
.tippspiel-turnier-liste {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}
.tippspiel-turnier-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}
.tippspiel-turnier-item:last-child {
    border-bottom: none;
}
.tippspiel-meine-tipps-liste {
    margin-top: 0.5rem;
}
.tippspiel-meine-tipps-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.tippspiel-meine-tipps-tabelle th,
.tippspiel-meine-tipps-tabelle td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}
.tippspiel-meine-tipps-tabelle th {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
}
.tippspiel-meine-tipps-match,
.tippspiel-meine-tipps-turnier {
    font-weight: 500;
}
.tippspiel-meine-tipps-punkte {
    text-align: right;
    white-space: nowrap;
}

/* Meine Tipps: Match-Karten mit Tipp-Vergleich rechts */
.tippspiel-meine-tipps-row {
    display: flex;
    align-items: stretch;
    gap: 1rem;
}
.tippspiel-meine-tipps-row .tippspiel-match-card {
    flex: 1;
    min-width: 0;
}
.tippspiel-meine-tipps-vgl {
    flex-shrink: 0;
    width: 11rem;
    min-width: 9rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    align-self: stretch;
}
.tippspiel-meine-tipps-vgl-spieler {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.tippspiel-meine-tipps-vgl-spieler .tippspiel-spieler-name {
    font-size: 0.85rem;
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tippspiel-meine-tipps-vgl-spieler .tippspiel-spieler-scores {
    font-size: 0.9rem;
}
.tippspiel-meine-tipps-vgl-label {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
}
.tippspiel-meine-tipps-vgl-scores {
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.tippspiel-meine-tipps-vgl-punkte {
    font-size: 0.9rem;
    color: var(--court-green);
}
.tippspiel-meine-tipps-turniersieger-liste {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.tippspiel-meine-tipps-turniersieger-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
@media (max-width: 480px) {
    .tippspiel-meine-tipps-row {
        flex-direction: column;
    }
    .tippspiel-meine-tipps-vgl {
        width: 100%;
        min-width: 0;
    }
}
.tippspiel-tabelle .tipp-saetze {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.tippspiel-tabelle .tipp-set-input {
    width: 4.25rem;
    padding: 0.25rem 0.35rem;
    font-size: 0.8rem;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    text-align: center;
}
.tippspiel-tabelle .tipp-set-input:focus {
    border-color: var(--court-green);
    outline: none;
}
.tippspiel-tabelle .tipp-set-input::placeholder {
    color: #9ca3af;
}

/* Vertikale Match-Darstellung: Spieler untereinander mit Scores */
.tippspiel-match-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.tippspiel-match-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}
.tippspiel-match-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}
.tippspiel-match-meta {
    color: var(--muted);
}
.tippspiel-match-status {
    color: var(--muted);
    font-weight: 500;
}
.tippspiel-match-body {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.tippspiel-spieler-zeilen {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}
.tippspiel-spieler-zeile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.2rem 0;
}
.tippspiel-spieler-zeile.tippspiel-sieger .tippspiel-spieler-name {
    font-weight: 700;
    color: var(--court-green);
}
.tippspiel-spieler-zeile:not(.tippspiel-sieger) .tippspiel-spieler-name {
    color: var(--muted);
}
.tippspiel-spieler-name {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    margin-right: 0.75rem;
}
.tippspiel-spieler-name .tippspiel-flag {
    display: inline-block;
    margin-right: 0.25rem;
    vertical-align: middle;
    line-height: 1;
}
.tippspiel-spieler-scores {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}
.tippspiel-score-cell {
    min-width: 1.75rem;
    text-align: center;
    font-size: 0.9rem;
}
.tippspiel-score-placeholder {
    color: var(--muted);
    font-weight: 400;
}
.tippspiel-score-cell-inner.tippspiel-satz-sieger {
    font-weight: 700;
    color: var(--court-green);
}
.tippspiel-score-cell-inner:not(.tippspiel-satz-sieger) {
    color: var(--muted);
}
.tippspiel-score-cell sup {
    font-size: 0.7em;
    vertical-align: super;
    line-height: 0;
}
.tippspiel-tipp-zeile {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tippspiel-tipp-aktionen {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.tippspiel-tipp-aktionen .btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
}
.tippspiel-save-btn:disabled,
.tippspiel-save-btn.tippspiel-save-disabled {
    background: #9ca3af !important;
    color: #6b7280 !important;
    cursor: not-allowed;
    opacity: 0.8;
}
.tippspiel-save-btn:disabled:hover,
.tippspiel-save-btn.tippspiel-save-disabled:hover {
    box-shadow: none;
}
.tippspiel-edit-btn {
    min-width: 2rem;
    font-size: 1rem;
    line-height: 1;
}
.tippspiel-tipp-zeile .tipp-saetze {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.tippspiel-tipp-zeile .tipp-set-input {
    width: 3.8rem;
    padding: 0.2rem 0.3rem;
    font-size: 0.8rem;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    text-align: center;
}
.tippspiel-tipp-zeile .tipp-set-input:focus {
    border-color: var(--court-green);
    outline: none;
}
.tippspiel-tipp-zeile .tipp-set-input[readonly] {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}
.tippspiel-match-footer {
    margin-top: 0.35rem;
    font-size: 0.8rem;
}
.tippspiel-match-footer .tippspiel-datum {
    color: var(--muted);
}
.tippspiel-rangliste-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.tippspiel-rangliste-tabelle th,
.tippspiel-rangliste-tabelle td {
    padding: 0.5rem 0.75rem;
    text-align: left;
}
.tippspiel-rangliste-tabelle th {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}
.tippspiel-rangliste-tabelle tbody tr {
    border-bottom: 1px solid #e5e7eb;
}
.tippspiel-rangliste-tabelle tbody tr:hover {
    background: #f9fafb;
}
.tippspiel-rang-move {
    color: var(--muted);
    font-size: 0.9rem;
}
