/* Global */
/* =========================== */
/*     CSS-VARIABLEN          */
/* =========================== */

:root {
    --color-bg: #fff;
    --color-border: #e9ecef;
    --color-light-border: #f0f0f0;
    --color-heading-border: #eee;
    --color-muted-text: #6c757d;
    --color-warning: #ffc107;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-neutral: #6c757d;
    --color-primary: #ffc107;
    --color-pending: #6c757d;
    --shadow-default: 0 4px 6px rgba(0, 0, 0, 0.05);
    --color-card-footer: rgb(0 0 0 / 48%)
}
/* Farben für Status-Icons */
.status-pending { color: #6c757d; }
.status-accepted { color: #0d6efd; }
.status-completed { color: #198754; }
.status-rejected { color: #dc3545; }
.status-disputed { color: #ffc107; }
/* Allgemeines Styling für Status-Badges */
.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    text-transform: capitalize;
}
.status-completed { background-color: var(--color-success); }
.status-accepted { background-color: var(--color-primary); }
.status-rejected,
.status-expired { background-color: var(--color-danger); }
.status-disputed { background-color: var(--color-warning); color: #333; }
.status-pending { background-color: var(--color-pending); color: white; }

        * {
            box-sizing: border-box;
        }
        html, body {
            height: 100%;
        }
        body {
            margin: 0;
            font-family: 'Inter', sans-serif;
            background-color: #f4f4f4;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }
        main.container, .forder_content {
            flex-grow: 1;
			max-width: 1400px;
            margin: 20px auto;
            padding: 20px;
            background: #fff;
            border-radius: 8px;
            width: 95%;
        }

        /* Header & Navigation */
        header {
            background: linear-gradient(90deg, #1e3c72, #2a5298);
            color: white;
            padding: 0 20px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }
        nav {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 60px;
        }
        .nav-left a, .nav-right a, .auth-button {
            color: white;
            text-decoration: none;
            padding: 10px 15px;
            font-weight: 600;
            transition: background 0.3s ease;
            border-radius: 6px;
        }
        .nav-left a:hover, .nav-right a:hover, .auth-button:hover {
            background-color: rgba(255, 255, 255, 0.15);
        }
		.nav-left {
    display: flex;
    align-items: center;
    gap: 5px;
}
        .nav-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* Dropdown */
        .dropdown { position: relative; }
        .dropdown-trigger { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; background-color: transparent; border: none; color: white; font-weight: 600; padding: 8px 12px; border-radius: 6px; font-size: 1rem;}
        .dropdown-content { display: none; position: absolute; right: 0; top: 100%; background-color: white; min-width: 180px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); border-radius: 6px; z-index: 1000; }
        .dropdown-content a { display: block; padding: 12px 16px; color: #333; text-decoration: none; }
        .dropdown-content a:hover { background-color: #f0f0f0; }
        .dropdown:hover .dropdown-content { display: block; }
        
        /* Login/Register Modal */
        .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); font-family: 'Inter', sans-serif; }
        .modal-content { background-color: #fff; margin: 5% auto; padding: 30px 40px 40px 40px; border-radius: 12px; width: 90%; max-width: 420px; position: relative; box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
        .close { position: absolute; right: 5px; top: 5px; font-size: 24px; font-weight: bold; color: #555; background: transparent; border: none; cursor: pointer; transition: color 0.3s ease; width: 32px; height: 32px; line-height: 32px; text-align: center; border-radius: 50%; }
        .close:hover { color: #1e3c72; }
        .tabs {
					display: flex;
					
				}
        .tabs button { flex: unset; padding: 12px 25px; border: none; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 1rem; color: white; transition: background-color 0.3s ease; user-select: none; }
        .tabs button.login-btn { background-color: #28a745; }
        .tabs button.register-btn { background-color: #007bff; }
		/* Allgemeiner Stil für jeden Tab-Button */
		.tabs > button {
			flex-grow: 1;
			padding: 10px 15px;
			border: 1px solid transparent; /* Standardmäßig kein sichtbarer Rahmen */
			border-bottom: none; /* Der untere Rahmen wird vom Container gezeichnet */
			background-color: #fff; /* Leichter Hintergrund für inaktive Tabs */
			cursor: pointer;
			font-size: 1rem;
			font-weight: 600;
			color: #6c757d;
			transition: all 0.2s ease-in-out;
		}

		/* Stil für den aktiven Tab */
		.tabs > button.active {
			background-color: #e9ecef; /* Weiß, um mit dem Inhalt zu verschmelzen */
			color: #0d6efd;
			border-color: #dee2e6 #dee2e6 #fff; /* Rahmen links, oben, rechts, aber unten weiß/transparent */
			border-radius: 8px 8px 0 0; /* Oben abgerundete Ecken */
			transform: translateY(1px); /* Schiebt den Tab 1px nach unten, damit er die Linie überdeckt */
		}

		/* Hover-Effekt für inaktive Tabs */
		.tabs > button:not(.active):hover {
			background-color: #fff;
		}
        .form-container { display: block; }
		.form-container {
			background-color: #e9ecef;
			border: 1px solid #dee2e6; /* Rahmen hinzufügen */
			border-top: none; /* Oberen Rahmen entfernen */
			padding: 25px;
			
		}
		.form-container.login { border-radius: 0 8px 8px 8px; /* Nur unten abrunden */ }
		.form-container.registrieren { border-radius: 8px 0 8px 8px; /* Nur unten abrunden */ }
        .hidden { display: none; }
        form label { display: block; font-weight: 600; margin-bottom: 6px; color: #333; }
        form input[type="text"], form input[type="email"], form input[type="password"], form input[type="number"], form input[type="search"], form select { width: 100%; padding: 10px 12px; margin-bottom: 18px; border: 1.8px solid #ddd; border-radius: 6px; font-size: 1rem; transition: border-color 0.3s ease; }
        form input:focus { border-color: #1e3c72; outline: none; }
        .submit-btn, .btn { padding: 12px 15px; font-weight: 700; font-size: 1rem; border-radius: 8px; border: none; cursor: pointer; transition: background-color 0.3s ease; color: white; text-decoration: none; display: inline-block; text-align: center; }
        .btn-sm { padding: 6px 12px; font-size: 0.875rem; }
        .btn-primary { background-color: #007bff; } .btn-primary:hover { background-color: #0056b3; }
        .btn-secondary { background-color: #6c757d; } .btn-secondary:hover { background-color: #5a6268; }
        .btn-danger { background-color: #dc3545; padding:10px;} .btn-danger:hover { background-color: #c82333; }
        .login-submit { background-color: #28a745; width: 100%; } .login-submit:hover { background-color: #218838; }
        .register-submit { background-color: #007bff; width: 100%; } .register-submit:hover { background-color: #0056b3; }

        /* Lightbox Stile */
        .lightbox-overlay { display: none; position: fixed; z-index: 2000; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; justify-content: center; align-items: center; }
        .lightbox-overlay:not(.visible) { display: none; }
        .lightbox-image { max-width: 90%; max-height: 90%; border-radius: 8px; box-shadow: 0 0 25px rgba(0,0,0,0.5); }
        .lightbox-close { position: absolute; top: 20px; right: 30px; font-size: 40px; color: white; font-weight: bold; cursor: pointer; text-decoration: none; }
        
        /* Footer */
			footer.site-footer { 
				background: linear-gradient(90deg, #1e3c72, #2a5298); 
				color: white; 
				padding: 20px; 
				font-size: 0.95em; 
				margin-top: auto; 
			}

			.footer-content { 
				max-width: 1400px; 
				margin: 0 auto; 
				display: flex; 
				justify-content: space-between; 
				align-items: center; 
				flex-wrap: nowrap;   /* Keine Zeilenumbruch, 3 Spalten nebeneinander */
				gap: 10px; 
			}

			.footer-column {
				flex: 1;               /* Jede Spalte gleich breit */
				text-align: center;    /* Zentriert den Text in allen Spalten */
				min-width: 150px;      /* Minimum Breite, damit es nicht zu schmal wird */
			}
			.footer-column-right {
				text-align:right;
			}
			.footer-column-right a {
				padding-right: 10px;
			}
			
			.footer-online {
				text-align: left;      /* Links ausgerichtet, wie gewünscht */
			}

			.footer-center {
				text-align: center; 
			}

			.footer-right {
				text-align: right;     /* Rechts ausgerichtet */
			}

			.footer-left p, .footer-online p {
				margin: 4px 0;
			}

			footer.site-footer .footer-column:last-child a,
			footer.site-footer .footer-column:last-child a:visited,
			footer.site-footer .footer-column:last-child a:hover,
			footer.site-footer .footer-column:last-child a:active,
			footer.site-footer .footer-column:last-child a:focus {
				color: white !important;
				text-decoration: none;
				font-weight: 600;
			}

			footer.site-footer .footer-column:last-child a:hover {
				text-decoration: underline;
			}


			/* Optional: Für kleinere Bildschirme, damit es nicht zu eng wird */
			@media (max-width: 768px) {
				.footer-content {
					flex-wrap: wrap;      /* dann 3 Zeilen statt 3 Spalten */
				}
				.footer-column {
					flex: 1 1 100%;
					text-align: center !important; /* Zentriert alle auf kleineren Bildschirmen */
					margin-bottom: 10px;
				}
			}


        /* ================================== */
        /* STILE FÜR DIE AUSFAHRBARE SUCHE    */
        /* ================================== */
        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        .search-container {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            background-color: #f0f1f3; /* Leichterer grauer Hintergrund */
            border: 1px solid #dee2e6;
            border-radius: 20px; /* Stärkere Abrundung für "Pillen"-Look */
            padding-left: 15px; /* Platz für das ausgefahrene Feld */
            height: 40px; /* Feste Höhe für den ganzen Container */
            transition: all 0.3s ease-in-out;
        }
        #search-form {
            display: flex;
            align-items: center;
        }
        #search-input {
            width: 0;
            padding: 0; /* Kein vertikales Padding mehr */
            margin: 0;
            border: none;
            outline: none;
            background: transparent;
            opacity: 0;
            transition: all 0.4s ease-in-out;
            font-size: 0.95rem;
            height: 100%; /* Füllt die Höhe des Containers aus */
        }
        #search-input.active {
            width: 250px;
            opacity: 1;
            padding: 0 10px; /* Nur horizontales Padding, wenn sichtbar */
        }
        #search-toggle {
            background: transparent;
            border: none;
            color: #495057;
            width: 40px;
            height: 40px;
            cursor: pointer;
            font-size: 16px;
            border-radius: 50%;
            padding: 0;
            transition: all 0.3s ease;
        }
        #search-toggle:hover {
            color: #1e3c72;
        }
		/* Entfernt das "x" (Clear-Button) aus dem Suchfeld */
		input[type="search"]::-webkit-search-decoration,
		input[type="search"]::-webkit-search-cancel-button,
		input[type="search"]::-webkit-search-results-button,
		input[type="search"]::-webkit-search-results-decoration {
		  display: none;
		}
		p.status.ok {
			background-color: #d4edda;
			color: #155724;
			border: 1px solid #c3e6cb;
			padding: 15px;
			border-radius: 6px;
			font-weight: 500;
			text-align: center;
		}
		/* ================================== */
		/* STILE FÜR DIE PROFIL-SEITE         */
		/* ================================== */
		.profile-wrapper {
			display: flex;
			gap: 20px;
		}
		.profile-nav {
			flex: 0 0 200px; /* Feste Breite für das Menü */
			background-color: #fff;
			padding: 15px;
			border-radius: 8px;
			box-shadow: 0 2px 4px rgba(0,0,0,0.05);
		}
		.profile-nav h3 {
			margin-top: 0;
			border-bottom: 1px solid #eee;
			padding-bottom: 10px;
		}
		.profile-nav ul {
			list-style: none;
			padding: 0;
			margin: 0;
		}
		.profile-nav ul li a {
			display: block;
			padding: 10px 15px;
			text-decoration: none;
			color: #333;
			border-radius: 6px;
			font-weight: 600;
		}
		.profile-nav ul li a:hover {
			background-color: #f0f0f0;
		}
		.profile-nav ul li a.active {
			background-color: #1e3c72;
			color: white;
		}
		.profile-content {
			flex-grow: 1; /* Nimmt den restlichen Platz ein */
		}
/* ================================== */
/* STILE FÜR DIE RANGLISTEN-TABELLE   */
/* ================================== */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95rem;
}
.ranking-table thead {
    background-color: #e9ecef;
}
.ranking-table th, .ranking-table td {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    text-align: left;
    vertical-align: middle;
}
.ranking-table th {
    font-weight: 600;
}
.ranking-table .text-center {
    text-align: center;
}
.ranking-table .font-bold {
    font-weight: bold;
}
.ranking-table .col-platz {
    width: 5%;
    text-align: center;
    font-weight: bold;
}
.ranking-table .col-spieler a {
    text-decoration: none;
    color: #0056b3;
    font-weight: bold;
}
.ranking-table .col-spieler a:hover {
    text-decoration: underline;
}
.ranking-table .col-verwarnung, .ranking-table .col-status {
    width: 10%;
    text-align: center;
}
.ranking-table .col-statistik {
    width: 15%;
    text-align: center;
}
.ranking-table .col-aktion {
    width: 15%;
    text-align: center;
}
.inactive-user {
    background-color: #f8f9fa;
    color: #6c757d;
    font-style: italic;
}
.current-user-row {
    background-color: #d4edda !important; /* Wichtig, um andere Stile zu überschreiben */
}
.platz-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.platz-indicator .rank-change-up { color: green; }
.platz-indicator .rank-change-down { color: red; }
.platz-indicator .rank-change-same { color: #6c757d; }

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 5px;
}
/* ================================== */
/* STILE FÜR HINWEIS-BOXEN            */
/* ================================== */
.notice-box {
    padding: 15px;
    border: 1px solid;
    border-radius: 6px;
    margin-bottom: 20px;
}
.notice-box a {
    color: inherit; /* Lässt Links die Farbe der Box annehmen */
}
.notice-box-warning { /* Gelb für Aktionen, die Aufmerksamkeit erfordern */
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}
.notice-box-danger { /* Rot für angefochtene Spiele */
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}
.notice-box-info { /* Blau für aktive Spiele */
    background-color: #cce5ff;
    border-color: #b8daff;
    color: #004085;
}
.notice-box-neutral { /* Grau für informative, neutrale Hinweise */
    background-color: #e2e3e5;
    border-color: #d6d8db;
    color: #383d41;
}
/* ================================== */
/* STILE FÜR PROFILSEITE-LAYOUT       */
/* ================================== */
.form-group {
    margin-bottom: 15px;
}

.danger-zone {
    border: 2px solid #dc3545;
    padding: 20px;
    border-radius: 8px;
    background-color: #f8d7da;
}

.danger-zone h4 {
    color: #721c24;
    margin-top: 0;
    border-bottom: 1px solid #f5c6cb;
    padding-bottom: 10px;
}
/* ================================== */
/* STILE FÜR DIE FORdern-SEITE        */
/* ================================== */
.stats_grid {
    display: grid;
    /* Nutzt auto-fit, um automatisch Spalten umzubrechen, wenn der Platz eng wird */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat_card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.stat_card h4 {
    margin-top: 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat_card .stat_line {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding: 5px 0;
}

.stat_card .stat_value {
    font-weight: bold;
}

.course_performance_table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.course_performance_table th, .course_performance_table td {
    border: 1px solid #e9ecef;
    padding: 10px;
    text-align: center;
}
.course_performance_table thead {
    background-color: #f0f1f3;
    font-weight: 600;
}
.course_performance_table td:first-child {
    text-align: left;
    font-weight: 500;
}

.your_score {
    font-weight: bold;
    color: #1e3c72;
}
.opponent_score {
    font-weight: bold;
    color: #dc3545;
}

/* ================================== */
/* STILE FÜR DAS NEUE DASHBOARD-GRID  */
/* ================================== */


/* ================================== */
/* STILE FÜR DAS NEUE DASHBOARD-GRID  */
/* ================================== */

.dashboard-container {
    /* Dieser Container umschließt alles auf der Dashboard-Seite */
    width: 100%;
}

.personal-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.main-content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* 1/3 für Stats, 2/3 für die Tabelle */
    gap: 25px;
    align-items: start;
}

.public-stats-stack {
    display: grid;
    gap: 25px;
}

.ranking-table-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 0px 25px 25px 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Responsive Verhalten: Auf kleinen Bildschirmen wird alles zu einer Spalte */
@media (max-width: 1024px) {
    .main-content-grid {
        grid-template-columns: 1fr; /* Alles untereinander */
    }
}
.dashboard_public_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.dashboard_public_card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.dashboard_public_card h4 {
    margin-top: 0;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.leaderboard { 
    list-style: none;
    padding: 0;
    margin: 0;
}

.leaderboard li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.leaderboard span {
    font-weight: bold;
}

.dashboard_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}
.dashboard_card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.dashboard_card h4 {
    margin-top: 0;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dashboard_action_card {
    background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
    border-color: #4dd0e1;
}
.dashboard_action_card h4 {
    color: #006064;
    border-bottom-color: #b2ebf2;
}

.dashboard_stats_card .stats_item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.dashboard_stats_card .stats_item:last-child {
    border-bottom: none;
}
.dashboard_stats_card .stat_value {
    font-weight: bold;
}
.stat_win { color: #28a745; }
.stat_loss { color: #dc3545; }
.stat_draw { color: #6c757d; }

.activity_feed {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}
.feed_item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 5px;
    border-bottom: 1px solid #f0f0f0;
}
.feed_item:last-child {
    border-bottom: none;
}
.feed_item div {
    display: flex;
    flex-direction: column;
}
.feed_item small {
    color: #6c757d;
    font-size: 0.8em;
}
.feed_icon {
    font-size: 1.5em;
}
.feed_icon.match { color: #ffc107; }
.feed_icon.card-yellow { color: #ffc107; }
.info-box.notice {
    background-color: #f9f9f9;
    border-left: 5px solid #ffc107;
    padding: 1em;
    margin-bottom: 1em;
    border-radius: 8px;
}

.info-box.notice h5 {
    margin-top: 0;
    color: #555;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.85em;
    color: #fff;
    background-color: #6c757d;
    border-radius: 0.25rem;
}

.text-muted {
    color: #6c757d;
}

.text-success {
    color: #28a745;
}
.info-box.notice {
    background-color: #f9f9f9;
    border-left: 5px solid #ffc107;
    padding: 1em;
    margin-bottom: 1em;
    border-radius: 8px;
}

.info-box.notice h5 {
    margin-top: 0;
    color: #555;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.85em;
    color: #fff;
    background-color: #6c757d;
    border-radius: 0.25rem;
}

.text-muted {
    color: #6c757d;
}

.text-success {
    color: #28a745;
}

.status-indicator.idle {
    background-color: #28a745; /* grün */
}

.status-indicator.busy {
    background-color: #fd7e14; /* orange */
}

.inactive-label {
    font-size: 0.9em;
    color: #888;
    font-style: italic;
}
.platz-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rank-arrow {
    font-size: 0.9em;
    display: inline-block;
}

.rank-arrow.up {
    color: #28a745; /* grün */
}

.rank-arrow.down {
    color: #dc3545; /* rot */
}

.rank-arrow.same {
    color: #000000; /* schwarz für Gleichstand */
}
.status-indicator {
    position: relative;
    display: inline-flex;         /* flex statt inline-block */
    align-items: center;          /* vertikal zentrieren */
    justify-content: center;      /* horizontal zentrieren */
    width: 20px;                  /* feste Breite (etwas breiter als Punkt) */
    height: 20px;                 /* feste Höhe, damit mittig bleibt */
    margin-right: 6px;
    cursor: pointer;
}

.status-inactive .inactive-text {
    color: #888;
    font-weight: bold;
    font-size: 0.9em;
    user-select: none;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
}


.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Farben je nach Status */
.status-idle .status-dot {
    background-color: #28a745; /* Grün */
}

.status-challenging .status-dot {
    background-color: #ffc107; /* Gelb */
}

.status-challenged .status-dot {
    background-color: #fd7e14; /* Orange */
}

/* Tooltip-Box */
.tooltip-content {
    display: none;
    position: absolute;
    bottom: 120%;  /* Direkt unter dem Punkt */
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9em;
	min-width: 200px; 
    max-width: 500px;
    white-space: normal;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
    word-wrap: break-word;
    text-align: center;
    /* Optional */
    pointer-events: none;
    user-select: none;
}


.status-indicator:hover .tooltip-content {
    display: block;
}

.course_stat_card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 700px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
}

.course_stat_card h4 {
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.course_table {
    width: 100%;
    border-collapse: collapse;
}

.course_table thead {
    background-color: #007bff;
    color: white;
}

.course_table th,
.course_table td {
    padding: 10px 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.course_table tbody tr:nth-child(even) {
    background-color: #f1f1f1;
}

.course_table tbody tr:hover {
    background-color: #d9eaff;
}

.course_table td:first-child {
    text-align: left;
    font-weight: 600;
    color: #222;
}

.course_table td:nth-child(2),
.course_table td:nth-child(3) {
    font-weight: 500;
    color: #555;
}

/* Optionale Score-Färbung */
.course_table td:nth-child(2):not(:empty) {
    color: #28a745; /* Grün für eigene Scores */
}

.course_table td:nth-child(3):not(:empty) {
    color: #dc3545; /* Rot für Gegner-Scores */
}
/* Spielerprofil Styles */
.forder_content {
    
    margin: 20px auto;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

.forder_content h2 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 700;
    color: #0056b3;
}

.profile-card {
    background: #f0f8ff;
    border: 1px solid #c6d9f1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: 0 2px 6px rgb(0 86 179 / 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    font-size: 1.1em;
}

.stats-grid > div {
    background: #ffffff;
    padding: 12px 18px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
    text-align: center;
    font-weight: 600;
}

.stats-grid > div strong {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: #004085;
}

/* =============== Desktop-Stil (wie vorher) =============== */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.history-table thead {
    background-color: #007bff;
    color: white;
    text-align: left;
}

.history-table th,
.history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
}

.history-table tbody tr:hover {
    background-color: #f1f9ff;
}

.history-table tbody tr.inactive-user td {
    background-color: #fff9e6;
    color: #856404;
    font-style: italic;
}

.history-table td[style*="text-align: center;"] {
    text-align: center;
}

.history-table a {
    color: #0056b3;
    text-decoration: none;
}

.history-table a:hover {
    text-decoration: underline;
}

.history-table td[colspan="5"] div {
    background-color: #fff9e6;
    border: 1px solid #ffe8a1;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.history-table td[colspan="5"] div strong {
    margin-right: 8px;
    font-size: 1.3em;
}

@media (max-width: 768px) {
    .history-table,
    .history-table thead,
    .history-table tbody,
    .history-table th,
    .history-table td,
    .history-table tr {
        display: block;
        width: 100%;
    }

    .history-table thead {
        display: none;
    }

    .history-table tr {
        margin-bottom: 15px;
        border: 1px solid #ccc;
        border-radius: 6px;
        padding: 10px;
        background-color: white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        text-align: center; /* Zentriert den Inhalt der Zeile */
    }

    .history-table td {
        padding: 8px 10px;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: center !important; /* Zentriert Inhalt in Zellen */
    }

    .history-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 4px;
        color: #333;
        text-align: center; /* Zentriert Label */
    }

    .history-table td[colspan="5"] {
        background-color: #fff9e6;
        padding: 10px;
        border: none;
    }

    .history-table td[colspan="5"] div {
        flex-direction: column;
        align-items: center; /* Auch Karten-Inhalt zentriert */
        text-align: center;
    }
}


/* Outcome Farben */
.outcome {
    padding: 5px 10px;
    border-radius: 15px;
    color: white;
    font-weight: 700;
    font-size: 0.9em;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.outcome-win {
    background-color: #28a745; /* grün */
}

.outcome-loss {
    background-color: #dc3545; /* rot */
}

.outcome-draw {
    background-color: #6c757d; /* grau */
}
/* Stat-Split-Row für zwei Spalten */
.stat-split-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-top: 1px solid #ddd;
}

.stat-box {
    flex: 1;
    background: #f5f8ff;
    border: 1px solid #cdd6f0;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.stat-title {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.stat-value.aktiv {
    font-size: 1.3em;
    font-weight: bold;
    color: #36ff07;
}
.stat-value.inaktive {
    font-size: 1.3em;
    font-weight: bold;
    color: #ff0707;
}
/* Responsive Verhalten */
@media (max-width: 600px) {
    .stat-split-row {
        flex-direction: column;
    }
}

/* ================================== */
/* STILE FÜR DIE CHALLENGE DETAILS    */
/* ================================== */
.challenge-details-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.timeline {
    position: relative;
    padding: 20px 0;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e9ecef;
}
.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 45px;
}
.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timeline-item-system .timeline-dot {
    border-color: #6c757d; /* Grau für System */
}
.timeline-item-system .timeline-dot::before {
    font-family: "Font Awesome 5 Free";
    content: "\f013"; /* Settings Icon */
    font-weight: 900;
    color: #6c757d;
}
.timeline-item-chat .timeline-dot {
    border-color: #198754; /* Grün für Chat */
}
.timeline-item-chat .timeline-dot::before {
    font-family: "Font Awesome 5 Free";
    content: "\f075"; /* Comment Icon */
    font-weight: 900;
    color: #198754;
}
.timeline-content {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
}
.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}
.timeline-sender {
    font-weight: bold;
}
.timeline-date {
    font-size: 0.85rem;
    color: #6c757d;
}
@media (max-width: 576px) {
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
.nav-link-highlight {
    background-color: #ffc107;
    color: #333 !important;
    font-weight: bold;
}
.nav-link-highlight:hover {
    background-color: #e0a800 !important;
}
.dispute-box {
    border: 1px solid #dc3545;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
}
.dispute-form-inner {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}
.dispute-actions {
    margin-top: 20px;
}
/* Layout für Moderator/Admin-Seiten im Frontend */
.settings-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.settings-nav {
    flex: 0 0 220px; /* Feste Breite für die Navigation */
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.settings-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.settings-nav li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #343a40;
    border-radius: 4px;
    font-weight: 500;
}

.settings-nav li a:hover, .settings-nav li a.active {
    background-color: #0d6efd;
    color: #fff;
}

.settings-content {
    flex-grow: 1; /* Nimmt den restlichen Platz ein */
}
.timeline-screenshot {
    max-width: 150px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    display: block;
    margin-top: 10px;
    cursor: pointer;
}
.nav-icon-indicator {
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #ffc107 !important; /* Gelb als Warnfarbe */
    font-size: 1.2rem;
    text-decoration: none;
}
.nav-icon-indicator:hover {
    color: #e0a800;
}
/* Responsive Tabellen */
.table-responsive-wrapper {
    overflow-x: auto;
}

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

.responsive-table th, .responsive-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.responsive-table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Magie für mobile Geräte */
@media screen and (max-width: 768px) {
    .responsive-table thead {
        display: none; /* Header auf Mobilgeräten ausblenden */
    }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td {
        display: block;
        width: 100%;
    }
    .responsive-table tr {
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 5px;
    }
    .responsive-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #f5f5f5;
    }
    .responsive-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }
}
/* Farben für Spielerprofil-Tabelle */
.profile-user-green, .profile-user-green a {
    color: #198754 !important;
    text-decoration: none;
}
.opponent-user-red, .opponent-user-red a {
    color: #dc3545 !important;
    text-decoration: none;
}



/* Hilfsklassen für mobile Ansicht (falls noch nicht vorhanden) */
@media (min-width: 768px) {
    .d-md-inline {
        display: inline !important;
    }
}
.d-none {
    display: none !important;
}
.nav-icon-link {
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #6c757d; /* Grau */
    font-size: 1.3rem;
    text-decoration: none;
}
.nav-icon-link:hover {
    color: #343a40; /* Dunkleres Grau */
}
h2 > small.season-dates {
    font-size: 0.9rem;      /* Etwas kleiner als die Hauptüberschrift */
    font-weight: normal;    /* Normale Schriftstärke, nicht fett */
    color: #6c757d;
}
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}
.setting-row label {
    margin-bottom: 0; /* Entfernt den Standard-Abstand vom Label */
    font-weight: 500;
}
.setting-row select {
    width: auto; /* Verhindert, dass das Dropdown die volle Breite einnimmt */
    margin-bottom: 0;
}
/* Benachrichtigungs-Glocke */
.notification-bell .dropdown-trigger {
    position: relative;
}
#notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    line-height: 1;
    min-width: 18px;
    text-align: center;
}
#notification-panel {
    width: 350px;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}
#notification-list li {
    white-space: normal;
    padding: 15px;
    color: #333; 
}
#notification-list li.unread a {
    background-color: #eef;
}
#notification-list li a:hover {
    background-color: #e9ecef;
}
.notification-message {
    font-weight: normal;
    color: #333;
}
.notification-date {
    font-size: 0.8em;
    color: #6c757d;
}
.mark-as-read-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    line-height: 1;
    border-radius: 50%;
}
.mark-as-read-btn:hover {
    color: #fff;
    background-color: #28a745;
}
#notification-list li {
    position: relative; /* Notwendig für die Positionierung des Buttons */
}
.notification-page-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}
.notification-page-list li {
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 5px;
}
.notification-page-list li.unread {
    border-left: 4px solid #007bff;
}
.notification-page-list li a {
    display: block;
    padding: 15px;
    text-decoration: none;
    color: #333;
}
.notification-page-list li a:hover {
    background-color: #f8f9fa;
}
.no-notifications-full-page {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}
.all-notifications-link {
    text-align: center;
    font-weight: bold;
    border-top: 1px solid #ddd;
}
.all-notifications-link a {
    display: block;
    padding: 10px;
}
.page-header-actions {
    float: right;
    margin-top: -40px; /* Anpassen je nach Höhe der H2 */
}
.delete-notification-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.9rem;
}
.notification-page-list li {
    position: relative; /* Wichtig für den Lösch-Button */
}
.push-notification-setting {
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 20px;
}

.linked-list a:hover {
    background-color: #e9ecef;
}

/* Styling für den "Alle anzeigen"-Link */
.card-footer {
    text-align: right;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid var(--color-light-border);
}

.card-footer a {
    font-weight: bold;
    color: var(--color-card-footer);
    text-decoration: none;
}
/* Styling für verlinkte Einträge in den Dashboard-Karten */
.challenge-link-item {
    display: grid; /* Nutzt das Grid-System für perfekte Spalten */
    grid-template-columns: 1fr auto; /* Erste Spalte nimmt den Platz, zweite passt sich an */
    gap: 15px;
    
    text-decoration: none;
    color: inherit;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
    width: 100%;
}

.challenge-link-item:hover {
    background-color: #e9ecef;
}

.challenge-names {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Kürzt lange Namen mit "..." */
    text-align: left;
}

.challenge-date {
    color: #6c757d;
    text-align: right; /* Richtet das Datum rechtsbündig aus */
}
.pagination {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 5px;
}
.page-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    color: #0d6efd;
    text-decoration: none;
    border-radius: 4px;
}
.page-link:hover {
    background-color: #e9ecef;
}
.page-link.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
    cursor: default;
}
.responsive-table .player-link {
    color: inherit; /* Verwendet die normale Textfarbe */
    text-decoration: none; /* Entfernt den Unterstrich */
    font-weight: bold;
}

.responsive-table .player-link:hover {
    text-decoration: underline; /* Zeigt beim Überfahren mit der Maus an, dass es ein Link ist */
}
.chat-input-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.chat-input-box h4 {
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.chat-input-wrapper {
    display: flex;
    align-items: center; /* Zentriert den Button und Text vertikal */
    gap: 10px;
    border-bottom: 2px solid #ced4da; /* Die dezente Unterlinie */
    padding-bottom: 5px;
    transition: border-color 0.2s ease-in-out;
}

/* Hebt die Linie hervor, wenn man in das Feld klickt */
.chat-input-wrapper:focus-within {
    border-bottom-color: #0d6efd;
}

#chat-message-input {
    flex-grow: 1;
    border: none; /* Entfernt den Rahmen der Textarea */
    background: transparent; /* Macht den Hintergrund transparent */
    outline: none; /* Entfernt den Fokus-Rahmen */
    resize: none; /* Verhindert, dass der User die Größe ändern kann */
    padding: 8px 0;
    margin-bottom: 0;
    font-size: 1rem;
    font-family: inherit;
    color: #212529;
}

#send-chat-message-btn {
    flex-shrink: 0;
    width: 45px;
    background: transparent;
    border: none;
    color: #6c757d;
    font-size: 1.2rem;
    transition: color 0.2s ease-in-out;
}

#send-chat-message-btn:hover {
    color: #0d6efd;
}
.admin-message-actions {
    margin-left: auto;
    display: flex;
    gap: 5px;
}
.admin-message-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
}
.admin-message-actions button:hover {
    color: #0d6efd;
}
.submitted-result {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.mark-all-read-action {
    padding: 0;
    border-bottom: 1px solid #dee2e6;
}
#mark-all-read-btn {
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
    color: #0d6efd;
    text-align: center;
    border-radius: 8px;
}
#mark-all-read-btn:hover {
    background-color: #f0f0f0;
}
#notification-panel #mark-all-read-btn {
    width: 100%;
}
/* Spezifische Regel NUR für den Button auf der notifications.php-Seite */
#notifications-page-container #mark-all-read-btn {
    background-color: #e9ecef; /* Helles Grau */
    border-radius: 8px;
}

/* Styling für den Header auf challenge_details.php */
.challenge-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-light-border);
}
.challenge-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}
.challenge-header h2 a {
    color: inherit;
    text-decoration: none;
}
.challenge-header h2 a:hover {
    text-decoration: underline;
}
.challenge-header h2 small {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-muted-text);
    margin: 0 15px;
}
.challenge-header .course-name {
    margin: 10px 0 0;
    font-size: 1.1rem;
    color: var(--color-muted-text);
    text-align: center;
}

.challenge-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: var(--color-muted-text);
    font-weight: 500;
}



.detailed-stats .stat_warning {
    color: #fd7e14; /* Orange für offene Forderungen */
    font-weight: bold;
}
.stat-box .stat-value {
    font-size: 1.3em;
    font-weight: bold;
}
.profile-section {
    margin-bottom: 20px;
}
.avatar-upload-container {
    display: flex;
    align-items: center;
    gap: 20px;
}
.current-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #dee2e6;
}
.detailed-stats li a {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    padding: 0 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
    width: 100%;
}
.detailed-stats li a:hover {
    background-color: #e9ecef;
}
/* Styling für die neuen Karten-Statistik-Boxen */
.stat-split-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}
.stat-split-row-karten {
    padding: 10px;
}
.stat-box-link {
    flex: 1;
    display: block;
    padding: 15px;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    text-align: center;
    transition: transform 0.2s ease;
}
.stat-box-link:hover {
    transform: scale(1.05);
}
.stat-box-link .stat-title {
    display: block;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 5px;
}
.stat-box-link .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    display: block;
}

/* Spezifische Farben für die Boxen */
.yellow-stat-box {
    background-color: #ffc107;
    
    padding: 10px !important;
    border-radius: 10px !important;
}
.red-stat-box {
    background-color: #dc3545;
   
    padding: 10px !important;
    border-radius: 10px !important;
}
/* Entfernt den Leerraum von leeren Absätzen in der Timeline */
.timeline-message p:empty,
.timeline-message p:has(br) {
    margin: 0;
}
/* Korrigiert den Leerraum zwischen Elementen in der Timeline-Nachricht */
.timeline-message p {
    margin-bottom: 0.5em; /* Reduziert den Abstand nach einem Absatz */
}
.timeline-message table {
    margin-top: 0.5em; /* Reduziert den Abstand vor einer Tabelle */
}
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.form-group-checkbox input[type="checkbox"] {
    width: auto;
    margin-bottom: 0;
}
.form-group-checkbox label {
    margin-bottom: 0;
    font-weight: 500;
}
.header-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #fff;
}
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}
.profile-header h1 {
    margin: 0;
    font-size: 2.5rem;
}