:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --today-color: #e74c3c;
    --holiday-color: #f39c12;
    --vacation-color: #f1c40f;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #bdc3c7;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: #333;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Layout */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.logo-container {
    width: 120px;
    height: 60px;
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #7f8c8d;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

h1 {
    margin: 0;
    font-size: 2rem;
    color: var(--primary-color);
}

.header-title-container {
    text-align: center;
}

.subtitle {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 600;
    margin-top: 4px;
}

/* Dropdown-Menü für Mannschaftsauswahl im Header */
.team-dropdown {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color) !important;
    background-color: #ffffff !important;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 10px;
    outline: none;
    cursor: pointer;
    min-width: 260px;
    max-width: 100%;
}

.team-dropdown:hover {
    border-color: var(--accent-color);
}

/* Kalender Sektion */
.calendar-section {
    background: var(--card-bg);
    border: 3px solid #222;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.calendar-header {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar-table th, .calendar-table td {
    border: 1px solid var(--border-color);
    text-align: center;
    padding: 10px 5px;
    height: 85px;
    vertical-align: top;
    font-size: 0.9rem;
}

.calendar-table th {
    background-color: #eaeded;
    color: var(--primary-color);
    height: auto;
    padding: 8px;
}

.calendar-cell {
    position: relative;
    background: #fff;
}

.calendar-cell.other-month {
    background-color: #f9f9f9;
    color: #b2bec3;
}

.calendar-cell.today {
    background-color: #fadbd8;
    border: 2px solid var(--today-color);
    font-weight: bold;
}

.day-number {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.badge {
    font-size: 0.65rem;
    padding: 2px 4px;
    border-radius: 3px;
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-holiday {
    background-color: var(--holiday-color);
    color: #fff;
}

.badge-vacation {
    background-color: #fdebd0;
    color: #b9770e;
    border: 1px solid #f39c12;
}

.badge-match {
    background-color: #fadbd8;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

.badge-training {
    background-color: #ebf5fb;
    color: #2980b9;
    border: 1px solid #3498db;
    cursor: pointer;
    font-weight: bold;
}

/* Tooltip */
.training-tooltip {
    position: absolute;
    background: #ffffff;
    border: 2px solid #222;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    width: 300px;
    font-size: 0.85rem;
    pointer-events: none;
}

/* Unterer Bereich */
.bottom-section {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
}

.left-column, .right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Roter Kasten für Heimspieltage */
.red-border-box {
    border: 3px solid #e74c3c !important;
}

.box {
    background: var(--card-bg);
    border: 3px solid #222;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.box-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.placeholder-content {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #7f8c8d;
    min-height: 150px;
}

.table-responsive {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: #f1f2f6;
    color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1;
    user-select: none;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

@media (max-width: 1100px) {
    .left-column {
        max-width: 100%;
    }
}

/* ==========================================
   MOBILE OPTIMIERUNG (Smartphones < 768px)
   ========================================== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        text-align: center;
    }

    .logo-container {
        width: 100px;
        height: 50px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .team-dropdown {
        min-width: 100%;
    }

    .calendar-section {
        padding: 10px;
    }

    .calendar-table th, .calendar-table td {
        height: 65px;
        padding: 4px 2px;
        font-size: 0.75rem;
    }

    .day-number {
        font-size: 0.9rem;
    }

    .badge {
        font-size: 0.55rem;
        padding: 1px 2px;
    }

    .bottom-section {
        flex-direction: column;
        gap: 20px;
    }

    .left-column, .right-column {
        max-width: 100%;
    }

    .box {
        padding: 12px;
    }

    .data-table {
        font-size: 0.75rem;
    }
}/* Standardmäßig ausgeblendet */
#landscape-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

/* Zeige den Hinweis nur im Hochformat (Portrait) und bei kleinen Bildschirmen */
@media screen and (orientation: portrait) and (max-width: 850px) {
    #landscape-warning {
        display: flex;
    }
}