/* Admin-Bereich Styles */
:root {
    --primary-color: #7ab929;
    --secondary-color: #18181b;
    --hover-secondary-color: #2d2d30;
    --accent-color: #dc3545;
    --success-color: #28a745;
    --text-color: #333;
    --light-text: #666;
    --border-color: #ddd;
    --background-color: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Admin-Bereich Header - Schwarzer Hintergrund */
.banner {
    background: var(--nav-background);
    background-image: none;
    min-height: 0px;
}

.banner-content {
    min-height: 0px;
}

.content{
    margin-top: 80px;
}

/* Admin-Aktionen Container */
.admin-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Admin-Buttons Styling */
.admin-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.admin-btn:hover {
    background-color: var(--hover-secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.admin-btn i {
    font-size: 18px;
}

/* Sync-Button spezifisch */
.sync-button {
    background-color: var(--primary-color);
}

.sync-button:hover {
    background-color: var(--hover-secondary-color);
}

.sync-button:disabled {
    background-color: var(--light-text);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Zurück-Button spezifisch */
.back-button {
    background-color: var(--primary-color);
}

.back-button:hover {
    background-color: var(--hover-secondary-color);
}

/* Sync-Status */
.sync-status {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
}

.sync-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sync-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.sync-status.loading {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Matches Section */
.matches-section h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 600;
}

.matches-list {
    display: grid;
    gap: 15px;
}

.match-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.match-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.match-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.match-details {
    flex: 1;
}

.match-date {
    color: var(--light-text);
    font-size: 0.9em;
    margin-bottom: 5px;
    display: flex;
    justify-content: center;

}

.match-teams {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-color);
}

.match-actions {
    display: flex;
    gap: 10px;
}

/* Bearbeiten-Button */
.btn-edit {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-edit:hover {
    background-color: var(--hover-secondary-color);
    transform: translateY(-1px);
}

.btn-edit i {
    font-size: 16px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #000 0%, #111111 100%);
    margin: 3% auto;
    border-radius: 16px;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Modal Header */
.modal-header {
    background: linear-gradient(135deg, #333 0%, #444 100%);
    color: var(--white);
    padding: 25px 30px;
    border-bottom: 2px solid var(--primary-color);
}

.modal-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
    font-weight: 600;
    color: var(--white);
}

.match-info {
    color: var(--primary-color);
    font-size: 1.1em;
    font-weight: 500;
}

#modalMatchInfo {
    color: var(--primary-color);
    font-weight: 600;
}

/* Modal Body */
.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
    background: #ededed;
}

/* Scrollbar Styling für Modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #333;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--hover-secondary-color);
}

/* Mobile Scrollbar Optimierung */
@media (max-width: 768px) {
    .modal-body::-webkit-scrollbar {
        width: 6px;
    }
    
    .modal-body::-webkit-scrollbar-track {
        background: #ddd;
    }
    
    .modal-body::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 3px;
    }
}

/* Ticket Edit Form */
.ticket-edit-form {
    display: grid;
    gap: 25px;
}

.ticket-section {
    padding: 20px;
    background: #ffffff;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.ticket-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.ticket-section h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.3em;
    font-weight: 600;
}

.toggle-section-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.toggle-section-btn:hover {
    background-color: rgba(122, 185, 41, 0.1);
    transform: scale(1.1);
}

.toggle-section-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.toggle-section-btn:hover i {
    transform: scale(1.1);
}

/* Toggle-All Button Container */
.toggle-all-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(122, 185, 41, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(122, 185, 41, 0.2);
}

.toggle-all-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.toggle-all-btn:hover {
    background-color: var(--hover-secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toggle-all-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.toggle-all-btn:hover i {
    transform: scale(1.1);
}

.ticket-fields {
    display: grid;
    gap: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    align-items: center;
    margin: 10px 0px;
}

.form-row label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95em;
}

.form-row input,
.form-row select {
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(122, 185, 41, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.form-row input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Modal Footer */
.modal-footer {
    padding: 25px 30px;
    border-top: 2px solid var(--primary-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: linear-gradient(135deg, #333 0%, #444 100%);
}

/* Speichern-Button (Grün) */
.save-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.save-btn:hover {
    background-color: var(--hover-primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.save-btn i {
    font-size: 18px;
}

/* Abbrechen-Button (Schwarz) */
.cancel-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cancel-btn:hover {
    background-color: var(--hover-secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.cancel-btn i {
    font-size: 18px;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Benutzerdefinierte Benachrichtigungen */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 16px 24px;
    border-radius: 8px;
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 350px;
    word-wrap: break-word;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, var(--primary-color) 0%, #999999 100%);
    border-left: 4px solid #155724;
}

.notification.error {
    background: linear-gradient(135deg, var(--accent-color) 0%, #e74c3c 100%);
    border-left: 4px solid #721c24;
}

.notification.info {
    background: linear-gradient(135deg, var(--primary-color) 0%, #17a2b8 100%);
    border-left: 4px solid #0c5460;
}

/* Mobile Optimierung für Benachrichtigungen */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {

    .content{
        margin-top: 0px;
    }

    .admin-actions {
        flex-direction: column;
    }
    
    .admin-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile Modal Optimierung */
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        padding: 20px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .modal-body {
        padding: 20px;
        padding-bottom: 120px; /* Platz für den Footer */
        max-height: none;
        overflow-y: auto;
        flex: 1;
    }
    
    .modal-footer {
        padding: 20px;
        flex-shrink: 0;
        flex-direction: column;
        gap: 15px;
        background: #ededed;
        border-top: 1px solid #ddd;
        position: sticky;
        bottom: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form-row label {
        text-align: left;
    }
    
    /* Mobile Toggle-Button Optimierung */
    .ticket-section-header {
        flex-direction: row; /* Zurück zu row für bessere Ausrichtung */
        align-items: center;
        gap: 10px;
        justify-content: space-between; /* Namenszug links, Toggle-Button rechts */
    }
    
    .toggle-section-btn {
        align-self: center; /* Zentriert den Button vertikal */
        min-width: 28px;
        height: 28px;
        flex-shrink: 0; /* Verhindert Schrumpfen des Buttons */
    }
    
    .toggle-section-btn i {
        font-size: 14px;
    }
    
    /* Mobile Team-Icon Optimierung */
    .team-icon {
        width: 20px;
        height: 20px;
    }
    
    .team-separator {
        margin: 0 8px;
    }
    
    /* Mobile Team-Ausrichtung */
    .match-teams {
        gap: 8px;
        justify-content: center;
        font-size: 0.9em; /* Zentriert die Spielpaarung */
    }
    
    .modal-match-teams {
        gap: 8px;
    }
    
    /* Mobile Datum und Spielpaarung zentrieren */
    .match-date {
        text-align: center; /* Zentriert das Datum */
        color: #6c757d; /* Helleres Dunkelgrau für das Datum */
    }
    
    .match-details {
        text-align: center; /* Zentriert den gesamten Match-Details Bereich */
    }
    
    /* Mobile User-Info Optimierung */
    .user-info {
        gap: 8px;
        flex: 1; /* Nimmt den verfügbaren Platz ein */
        min-width: 0; /* Erlaubt Schrumpfen bei Bedarf */
    }
    
    .user-status-icon {
        font-size: 14px;
        flex-shrink: 0; /* Verhindert Schrumpfen des Icons */
    }
    
    /* Mobile Toggle-All Button Optimierung */
    .toggle-all-container {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .toggle-all-btn {
        padding: 12px 18px;
        font-size: 13px;
    }
    
    .save-btn,
    .cancel-btn {
        width: 100%;
        justify-content: center;
        padding: 15px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .match-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .match-actions {
        width: 100%;
        justify-content: center;
    }
    
    .btn-edit {
        width: 80%;
        justify-content: center;
    }
    
    /* Sehr kleine Bildschirme - Modal noch kompakter */
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
        padding-bottom: 100px; /* Weniger Platz für den Footer auf kleinen Bildschirmen */
    }
    
    .modal-footer {
        padding: 15px;
        gap: 10px;
    }
    
    .save-btn,
    .cancel-btn {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* Team-Icons in den Match-Cards */
.team-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

/* Heimmannschaft: Name + Icon */
.team-with-icon.home-team {
    flex-direction: row;
    justify-content: flex-end;
    text-align: right;
}

/* Auswärtsmannschaft: Icon + Name */
.team-with-icon.away-team {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
}

/* Container für bessere Ausrichtung */
.match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0px;
    width: 100%;
}

.team-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.team-separator {
    margin: 0 12px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Modal Header mit Team-Icons */
.modal-match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
    width: 100%;
}

.modal-match-teams .team-with-icon {
    flex: 1;
    min-width: 0;
}

.modal-match-teams .team-with-icon.home-team {
    justify-content: flex-end;
    text-align: right;
}

.modal-match-teams .team-with-icon.away-team {
    justify-content: flex-start;
    text-align: left;
}

.modal-match-date {
    color: var(--primary-color);
    font-size: 1em;
    font-weight: 500;
}

/* User-Info mit Status-Icon */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-status-icon {
    font-size: 16px;
    flex-shrink: 0;
}
