/* style.css - Basierend auf Generator - Kopie (2).html */

:root {
    /* Core Colors */
    --color-bg-primary: #0c0c16;
    --color-bg-secondary: #14141f;
    --color-bg-tertiary: #1c1c2a;
    --color-bg-card: #1e1e2d;
    --color-bg-card-hover: #252538;
    --color-bg-modal: rgba(20, 20, 31, 0.95);

    /* Text Colors */
    --color-text-primary: #e2e2e8;
    --color-text-secondary: #b4b4c7;
    --color-text-muted: #82829a;

    /* Accent Colors */
    --color-primary: #6366f1;
    --color-primary-glow: rgba(99, 102, 241, 0.6);
    --color-secondary: #ec4899;
    --color-secondary-glow: rgba(236, 72, 153, 0.6);
    --color-success: #10b981;
    --color-warning: #fbbf24;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-secondary: linear-gradient(135deg, #ec4899, #c026d3);
    --gradient-accent: linear-gradient(135deg, #3b82f6, #10b981);
    --gradient-card: linear-gradient(145deg, rgba(30, 30, 45, 0.9), rgba(20, 20, 31, 0.9));

    /* Animation Speeds */
    --speed-faster: 120ms;
    --speed-fast: 200ms;
    --speed-normal: 300ms;
    --speed-slow: 500ms;
    --speed-slower: 700ms;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.35);
    --shadow-glow-primary: 0 0 15px var(--color-primary-glow);
    --shadow-glow-secondary: 0 0 15px var(--color-secondary-glow);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Layout */
    --header-height: 70px;
    --sidebar-width: 250px; /* Nicht verwendet im aktuellen Layout, aber definiert */
    --container-max-width: 1600px; /* *** WIEDER AUF 1600px GESETZT *** */
    --z-sidebar: 40;
    --z-header: 30;
    --z-modal: 50;
    --z-dropdown: 35;
    --z-tooltip: 45;
}

/* Light Theme Override (optional, falls du Light Mode brauchst) */
html:not(.dark-theme) {
     /* Core Colors */
     --color-bg-primary: #f8f9fa;
     --color-bg-secondary: #ffffff;
     --color-bg-tertiary: #e9ecef;
     --color-bg-card: #ffffff;
     --color-bg-card-hover: #f1f3f5;
     --color-bg-modal: rgba(255, 255, 255, 0.95);

     /* Text Colors */
     --color-text-primary: #212529;
     --color-text-secondary: #495057;
     --color-text-muted: #6c757d;

     /* Shadows need adjustment for light theme */
     --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
     --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
     --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}


/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

/* Theme Class für Body oder HTML */
body, html.dark-theme {
    font-family: 'Poppins', sans-serif;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.5;
    min-height: 100%;
    overflow-x: hidden;
    position: relative;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 75% 75%, rgba(236, 72, 153, 0.05) 0%, transparent 40%);
    backdrop-filter: blur(3px); /* Kann Performance beeinträchtigen */
}

/* Stars Animation */
.stars-container {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.6;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: star-animation 6s linear infinite;
}

@keyframes star-animation {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* Layout Components */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 70%;
    max-width: var(--container-max-width); /* Verwendet den Originalwert */
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles */
.main-header {
    height: var(--header-height);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    transition: box-shadow var(--speed-normal);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 70%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    cursor: pointer;
    transition: transform var(--speed-fast);
    text-decoration: none; /* Sicherstellen, dass kein Unterstrich vom Link kommt */
}

.logo:hover {
    transform: translateY(-2px);
}

.logo::after {
    content: "";
    position: absolute;
    height: 4px;
    bottom: -8px;
    left: 0;
    width: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--speed-normal);
}

.logo:hover::after {
    transform: scaleX(1);
}

.logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

.header-widgets {
    display: flex;
    align-items: center;
    gap: 1rem; /* Etwas weniger Abstand */
}

.counter, .server-entry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg-card);
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--speed-fast);
    font-size: 0.875rem;
    white-space: nowrap;
}

.counter:hover, .server-entry:hover {
    box-shadow: var(--shadow-glow-primary);
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
}

.counter i, .counter span i, .server-entry i {
    font-size: 1rem;
    transition: transform var(--speed-fast);
}

.counter:hover i, .server-entry:hover i {
    transform: scale(1.2);
}

.counter a, .server-entry a {
    text-decoration: none;
    color: var(--color-text-primary);
    transition: color var(--speed-fast);
    position: relative;
}

.counter a:hover, .server-entry a:hover {
    color: var(--color-primary);
}

.counter a::after { /* Optional: Unterstrich-Animation für Links */
    content: "";
    position: absolute;
    height: 2px;
    bottom: -2px;
    left: 0;
    width: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--speed-fast);
}

.counter a:hover::after {
    transform: scaleX(1);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--color-text-primary);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: var(--radius-full);
    transition: all var(--speed-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity var(--speed-fast);
    background: var(--gradient-primary);
    z-index: -1;
}

.theme-toggle:hover::before {
    opacity: 0.15;
}

.theme-toggle:hover {
    color: var(--color-primary);
    transform: rotate(20deg);
}

/* Main Content Section */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Dashboard Metrics */
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--gradient-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--speed-fast);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--speed-normal);
    z-index: 0;
}

.metric-card:hover::before {
    opacity: 0.05;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.2);
}

.metric-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.metric-icon.primary { color: var(--color-primary); background: rgba(99, 102, 241, 0.1); }
.metric-icon.secondary { color: var(--color-secondary); background: rgba(236, 72, 153, 0.1); }
.metric-icon.success { color: var(--color-success); background: rgba(16, 185, 129, 0.1); }
.metric-icon.info { color: var(--color-info); background: rgba(59, 130, 246, 0.1); }
.metric-icon.warning { color: var(--color-warning); background: rgba(251, 191, 36, 0.1); }
.metric-icon.danger { color: var(--color-danger); background: rgba(239, 68, 68, 0.1); } /* Hinzugefügt für Admin-Farbe */


.metric-content {
    position: relative;
    z-index: 1;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    font-family: 'Space Grotesk', sans-serif;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Actions Section */
.actions-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-filter-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-input-container {
    position: relative;
}

.search-input {
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.875rem;
    width: 250px;
    transition: all var(--speed-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    width: 300px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
    transition: color var(--speed-fast);
}

.search-input:focus + .search-icon {
    color: var(--color-primary);
}

.select-container {
    position: relative;
}

.select-styled {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--speed-fast);
    min-width: 180px;
}

.select-styled:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
    transition: transform var(--speed-fast);
}

.select-styled:focus + .select-arrow {
    /* Pfeil-Drehung kann verwirrend sein, optional entfernen */
    /* transform: translateY(-50%) rotate(180deg); */
    color: var(--color-primary);
}

/* Players Grid */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.player-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--speed-normal);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    position: relative;
}

.player-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow-md);
    background: var(--color-bg-card-hover);
}

.player-card-header {
    padding: 1.25rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background var(--speed-fast);
}

.player-card:hover .player-card-header {
    background: rgba(99, 102, 241, 0.05);
}

.player-country {
    width: 32px;
    height: 24px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    transition: transform var(--speed-fast);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--color-bg-tertiary); /* Platzhalterfarbe */
}

.player-card:hover .player-country {
    transform: scale(1.1);
}

.player-name-container {
    flex: 1;
    min-width: 0; /* Wichtig für Flexbox-Overflow */
}

.player-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    transition: color var(--speed-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-card:hover .player-name {
    color: var(--color-primary);
}

.player-username {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-role-icons {
    display: flex;
    gap: 0.5rem;
    transition: transform var(--speed-fast);
    flex-shrink: 0; /* Verhindert Schrumpfen */
}

.player-card:hover .player-role-icons {
    transform: scale(1.1);
}

.role-icon {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all var(--speed-fast);
    cursor: help; /* Zeigt an, dass es ein Tooltip gibt */
}

.role-icon.admin { background: rgba(239, 68, 68, 0.1); color: #ff4d4d; }
.role-icon.moderator { background: rgba(59, 130, 246, 0.1); color: #58a6ff; }
.role-icon.saha { background: rgba(139, 92, 246, 0.1); color: #bf87ff; }
.role-icon.donator { background: rgba(236, 72, 153, 0.1); color: #FF69B4; }

.role-icon.admin:hover { background: rgba(239, 68, 68, 0.2); transform: scale(1.1); }
.role-icon.moderator:hover { background: rgba(59, 130, 246, 0.2); transform: scale(1.1); }
.role-icon.saha:hover { background: rgba(139, 92, 246, 0.2); transform: scale(1.1); }
.role-icon.donator:hover { background: rgba(236, 72, 153, 0.2); transform: scale(1.1); }


.player-card-body {
    padding: 1.25rem;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem; /* Ggf. anpassen für Healthbar etc. */
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0; /* Verhindert Überlaufen */
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-label i {
    font-size: 0.875rem;
    flex-shrink: 0; /* Verhindert Icon-Schrumpfen */
}

.stat-value {
    font-weight: 600;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.health-bar-container {
    background: rgba(255, 255, 255, 0.05);
    height: 6px;
    border-radius: var(--radius-full);
    width: 100%;
    overflow: hidden;
    margin-bottom: 0.25rem; /* Geringerer Abstand */
    position: relative;
}

.health-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #ef4444, #f59e0b, #10b981); /* Red-Yellow-Green Gradient */
    border-radius: var(--radius-full);
    transition: width var(--speed-normal);
    position: relative;
    overflow: hidden;
}

.health-bar-fill::after { /* Shimmer-Effekt */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
    opacity: 0.5; /* Etwas dezenter */
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.health-bar-text {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.1rem; /* Kleinerer Abstand */
    text-align: right;
    color: var(--color-text-secondary);
}

.player-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertikal zentrieren */
    gap: 1rem;
    margin-top: 1rem; /* Angepasster Abstand */
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Trennlinie */
    padding-top: 1rem; /* Abstand nach oben */
}

.ping-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--speed-fast);
}

.ping-bar {
    width: 3px;
    background: var(--color-text-muted);
    border-radius: var(--radius-full);
    transition: background var(--speed-fast), height var(--speed-fast);
    margin-bottom: 1px; /* Kleiner Abstand unten */
}
.ping-bar.bar1 { height: 4px; }
.ping-bar.bar2 { height: 6px; }
.ping-bar.bar3 { height: 8px; }
.ping-bar.bar4 { height: 10px; }

/* Ping Farben basierend auf Klassen */
.ping-excellent .ping-bar { background: var(--color-success); }
.ping-good .ping-bar { background: var(--color-info); }
.ping-average .ping-bar { background: var(--color-warning); }
.ping-poor .ping-bar { background: var(--color-danger); }

/* Sichtbarkeit der Balken basierend auf Klasse */
.ping-excellent .ping-bar.bar1, .ping-excellent .ping-bar.bar2, .ping-excellent .ping-bar.bar3, .ping-excellent .ping-bar.bar4 { background: var(--color-success); }
.ping-good .ping-bar.bar1, .ping-good .ping-bar.bar2, .ping-good .ping-bar.bar3 { background: var(--color-info); } .ping-good .ping-bar.bar4 { background: var(--color-text-muted); height: 4px; } /* Schwacher 4. Balken */
.ping-average .ping-bar.bar1, .ping-average .ping-bar.bar2 { background: var(--color-warning); } .ping-average .ping-bar.bar3, .ping-average .ping-bar.bar4 { background: var(--color-text-muted); height: 4px; }
.ping-poor .ping-bar.bar1 { background: var(--color-danger); } .ping-poor .ping-bar.bar2, .ping-poor .ping-bar.bar3, .ping-poor .ping-bar.bar4 { background: var(--color-text-muted); height: 4px; }


/* Player Cards Organization Badge */
.organization-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0 var(--radius-lg) 0 var(--radius-md);
    font-weight: 500;
    transition: all var(--speed-fast);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.player-card:hover .organization-badge {
    background: var(--color-primary);
    color: white;
}


/* Footer */
.main-footer {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.heart { color: var(--color-secondary); display: inline-block; font-size: 1rem; margin: 0 0.25rem; animation: heartbeat 1.5s ease infinite; }
.highlight { color: var(--color-primary); font-weight: 600; position: relative; display: inline-block; animation: glow 3s ease-in-out infinite; margin: 0 0.25rem; }
.brophy { color: var(--color-success); font-weight: 600; position: relative; display: inline-block; margin: 0 0.25rem; }
.separator { margin: 0 0.5rem; color: var(--color-text-muted); opacity: 0.5; }

@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes glow { 0%, 100% { text-shadow: 0 0 5px rgba(99, 102, 241, 0.5); } 50% { text-shadow: 0 0 15px rgba(99, 102, 241, 0.8); } }



/* Modal Styles */
.modal {
    display: none; /* Standardmäßig ausgeblendet - DIESE ZEILE AKTIVIEREN */
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    overflow-y: auto;
    padding: 2rem 1rem;
    animation: fadeIn var(--speed-fast) forwards;
    /* Flexbox für Zentrierung erst aktivieren, wenn .show da ist */
    /* display: flex; */ /* <---- DIESE ZEILE AUSKOMMENTIEREN oder ENTFERNEN */
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex; /* Aktiviert Flexbox-Zentrierung, wenn Modal gezeigt wird */
}

.modal-content {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 800px; /* Breite des Modals */
    max-height: calc(100vh - 4rem); /* Maximale Höhe */
    overflow-y: auto; /* Scrollbar für den Inhalt bei Bedarf */
    position: relative; /* Für Header/Footer */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn var(--speed-normal) forwards;
    /* transform: translateY(20px); Wird durch Animation überschrieben */
    opacity: 0;
    margin: 0 auto; /* Zentriert horizontal, vertikal durch Flexbox */
}

.modal.show .modal-content {
     opacity: 1;
     transform: translateY(0);
}


.modal-header {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; /* Kopfzeile fixieren */
    top: 0;
    background: var(--color-bg-card); /* Hintergrund für fixierte Kopfzeile */
    z-index: 10; /* Über dem Inhalt */
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-title img {
    width: 28px;
    height: 20px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: var(--radius-full);
    transition: all var(--speed-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.modal-close:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.75rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2); /* Linie unter Titel */
    padding-bottom: 0.5rem;
}

.modal-section-title i {
    color: var(--color-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Anpassbares Grid */
    gap: 1.25rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.info-label i {
    font-size: 0.875rem;
}

.info-value {
    font-weight: 500;
    font-size: 0.95rem;
    word-break: break-word; /* Lange Werte umbrechen */
}

/* API Statistik Tabelle */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem; /* Abstand nach Titel */
}

.stats-table th, .stats-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
}

.stats-table th {
    font-weight: 600;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.stats-table td {
    color: var(--color-text-primary);
}
.stats-table td.stat-value-money {
     color: var(--color-success); /* Geld grün hervorheben */
     font-weight: 600;
}
.stats-table .stat-description {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: block; /* Eigene Zeile */
    margin-top: 0.25rem;
}


.stats-table tr:last-child td {
    border-bottom: none;
}

.old-names-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding-left: 0; /* Standard-Listen-Padding entfernen */
    max-height: 200px; /* Maximale Höhe */
    overflow-y: auto; /* Scrollbar bei Bedarf */
}

.old-name-tag {
    background: var(--color-bg-tertiary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    transition: all var(--speed-fast);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.old-name-tag:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.modal-section-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 2rem 0;
}

/* Animation Keyframes */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px; /* Mindesthöhe für Spinner */
    width: 100%;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--color-text-muted);
    font-style: italic;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    grid-column: 1 / -1; /* Über ganze Breite spannen, falls im Grid */
}
.no-results i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}


/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.5); }


/* Blurred Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 22, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 100;
    transition: opacity var(--speed-slow);
    opacity: 1; /* Standardmäßig sichtbar */
}

.loading-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

.loading-logo { margin-bottom: 2rem; animation: pulse 2s infinite; }
.loading-text { font-size: 1.25rem; font-weight: 500; margin-top: 1.5rem; color: var(--color-text-primary); }
.loading-dots span { display: inline-block; animation: loadingDots 1.5s infinite; margin-left: 3px; opacity: 0; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.9; } }
@keyframes loadingDots { 0% { opacity: 0; transform: translateY(0); } 25% { opacity: 1; transform: translateY(-5px); } 50% { opacity: 0; transform: translateY(0); } 100% { opacity: 0; transform: translateY(0); } }

/* Hover Glow Effects */
.glow-hover { position: relative; z-index: 1; }
.glow-hover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gradient-primary); opacity: 0; filter: blur(20px); transition: opacity var(--speed-normal); border-radius: inherit; }
.glow-hover:hover::after { opacity: 0.3; }

/* Animation for Health Changes */
@keyframes healthChange { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
.health-changed { animation: healthChange 0.5s ease-in-out; }

/* Responsive Styles */
@media (max-width: 1200px) {
    .info-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } /* Grid im Modal anpassen */
}

@media (max-width: 992px) {
    .header-widgets { display: none; } /* Widgets ausblenden */
    /* Optional: Mobiles Menü-Icon anzeigen */
    /* .header-mobile-menu { display: flex; } */
    .main-header .container { justify-content: center; } /* Logo zentrieren, wenn Widgets weg sind */
}

@media (max-width: 768px) {
    .players-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .dashboard-metrics { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .search-filter-container { flex-direction: column; width: 100%; }
    .search-input-container, .select-container { width: 100%; }
    .search-input, .select-styled { width: 100%; }
    .search-input:focus { width: 100%; }
    .actions-section { flex-direction: column; align-items: stretch; } /* Filter untereinander und volle Breite */
    .container { padding: 0 1rem; } /* Weniger Padding auf kleineren Screens */
}

@media (max-width: 576px) {
    .players-grid { grid-template-columns: 1fr; } /* Nur eine Spalte */
    .modal-content { max-height: 95vh; max-width: 95%; } /* Modal fast bildschirmfüllend */
    .dashboard-metrics { grid-template-columns: repeat(2, 1fr); } /* 2 Metriken pro Zeile */
    .metric-value { font-size: 1.5rem; } /* Kleinere Schrift für Metrik-Werte */
    .metric-label { font-size: 0.8rem; }
    .player-name { font-size: 1rem; }
    .main-header { height: 60px; } /* Etwas kleinerer Header */
    .logo { font-size: 1.25rem; }
    .logo img { width: 28px; height: 28px; }
}
/* ============================================= */
/* == Styles for Toplists & Compare Views == */
/* ============================================= */

/* Common Message Styles (if not already sufficiently styled) */
.message {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    /* text-align: center; */ /* Removed center align for flexbox */
    font-size: 0.95rem;
    display: flex; /* Added for icon alignment */
    align-items: center; /* Added */
    gap: 0.75rem; /* Added */
}
.message i { /* Icon styling */
    font-size: 1.2em;
}
.message.info {
    background-color: rgba(59, 130, 246, 0.1); /* var(--color-info) with alpha */
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--color-info);
}
.message.error {
    background-color: rgba(239, 68, 68, 0.1); /* var(--color-danger) with alpha */
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--color-danger);
}
.message.success { /* Falls benötigt */
    background-color: rgba(16, 185, 129, 0.1); /* var(--color-success) with alpha */
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--color-success);
}
.message.warning {
     background-color: rgba(251, 191, 36, 0.1);
     border-color: rgba(251, 191, 36, 0.3);
     color: var(--color-warning);
}
.message.warning strong { /* Make warning text bold */
    color: var(--color-warning);
    font-weight: 600;
}

/* Common Button Styles */
.button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--speed-fast);
    text-decoration: none; /* Für <a>-Tags, die wie Buttons aussehen */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}
.button i {
    font-size: 1em; /* Icongröße relativ zur Schriftgröße */
}

.button.primary {
    background: var(--gradient-primary);
    color: white;
}
.button.primary:hover {
    box-shadow: var(--shadow-glow-primary);
    filter: brightness(1.1);
}

.button.secondary {
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.button.secondary:hover {
    background: var(--color-bg-card-hover);
    color: var(--color-text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}
.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(50%);
}


/* Page Title Styles (für Toplists/Compare) */
h1 {
    text-align: center;
    color: var(--color-primary); /* Hauptakzentfarbe */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
h1 i {
    font-size: 1.5rem; /* Icongröße im Titel */
}

h2 { /* Für Untertitel wie "Top 100 für ..." */
    text-align: center;
    color: var(--color-text-primary);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}


/* == Toplists Specific Styles == */
.toplist-select-form {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    background-color: var(--color-bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toplist-select-form label {
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-right: 0.5rem;
}

.toplist-select-form .select-container {
    flex-grow: 1;
}
/* select-styled und select-arrow werden wiederverwendet */


.toplist-table-wrapper {
    overflow-x: auto; /* Ermöglicht horizontales Scrollen bei Bedarf */
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-md);
    width: 100%; /* Nimmt die Breite des Containers ein */
}

/* Generic Data Table Style (can be used for both toplists and compare) */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0; /* Wird vom Wrapper gesteuert */
}

.data-table th,
.data-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    vertical-align: middle;
}

.data-table thead th {
    background-color: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
    font-weight: 600;
    white-space: nowrap;
    position: sticky; /* Kopfzeile fixieren beim Scrollen (optional) */
    top: 0;
    z-index: 5;
}

.data-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02); /* Sehr dezenter Streifen */
}

.data-table tbody tr:hover {
    background-color: var(--color-bg-card-hover);
}

.data-table tbody th { /* Für erste Spalte im Compare-Table */
    font-weight: 500;
    color: var(--color-text-secondary);
    background-color: var(--color-bg-tertiary);
    white-space: nowrap;
}


/* Specific cell styles for Toplists table */
.toplist-table .rank-cell {
    width: 60px;
    text-align: center;
    font-weight: 700;
    color: var(--color-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
}

.toplist-table .value-cell {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
    color: var(--color-success); /* Werte hervorheben */
}


/* == Compare Specific Styles == */
.compare-form {
    margin-bottom: 2rem;
    background-color: var(--color-bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#compare-inputs-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.input-group label {
    font-weight: 500;
    font-size: 0.9rem;
    width: 80px;
    text-align: right;
    flex-shrink: 0;
    color: var(--color-text-secondary);
}

.input-group .select-container {
     flex-grow: 1;
     max-width: 450px; /* Maximale Breite für Dropdowns */
}

.input-group .remove-user {
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0 0.5rem;
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
    flex-shrink: 0;
    opacity: 0.7;
}
.input-group .remove-user:hover {
    color: var(--color-danger); /* Volle Farbe beim Hover */
    transform: scale(1.1);
    opacity: 1;
}

.compare-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 1rem;
}

/* Compare Table specific adjustments (uses .data-table base) */
.compare-table-wrapper {
    overflow-x: auto;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-md);
    margin-top: 2rem; /* Abstand zum Formular */
    width: 100%; /* Nimmt die Breite des Containers ein */
}

.compare-table thead th {
    /* Styles von .data-table thead th werden übernommen */
    text-align: center; /* Zentrierte Usernamen */
}
.compare-table tbody th { /* Erste Spalte (Statistikname) */
     /* Styles von .data-table tbody th werden übernommen */
     text-align: left;
     width: 200px; /* Feste Breite für Statistiknamen */
}

.compare-table td {
    text-align: right; /* Werte rechtsbündig */
    font-weight: normal;
    white-space: nowrap;
}
.compare-table td.stat-value-money {
    color: var(--color-success); /* Geld hervorheben */
    font-weight: 500;
}

/* Header Active Link Style */
.header-widgets .counter.active a {
    color: var(--color-primary);
    font-weight: 600;
}
.header-widgets .counter.active a::after {
     transform: scaleX(1); /* Unterstrich für aktiven Link */
}
.header-widgets .counter.active {
    background: var(--color-bg-tertiary); /* Hintergrund für aktiven Link */
    border-color: rgba(99, 102, 241, 0.2);
}
/* style.css - Add these styles or modify existing ones */

/* ... (keep all existing styles from your original style.css) ... */


/* ============================================= */
/* == Styles specifically for Admin Panel == */
/* ============================================= */

/* Admin Header Adjustments */
.admin-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    background: var(--color-warning);
    color: var(--color-bg-primary);
    border-radius: var(--radius-full);
    margin-left: 0.5rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Navigation in Header */
.admin-main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Reduced gap */
    margin-right: auto; /* Pushes user info/logout to the right */
    margin-left: 2rem; /* Space after logo */
}

.nav-link {
    padding: 0.5rem 0.8rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--speed-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 3px solid transparent; /* Underline effect */
}

.nav-link i {
    font-size: 1em; /* Icon size relative to text */
    opacity: 0.8;
}

.nav-link:hover {
    color: var(--color-text-primary);
    background-color: var(--color-bg-tertiary);
    border-bottom-color: rgba(99, 102, 241, 0.3); /* Faint underline */
}

.nav-link.active {
    color: var(--color-primary);
    background-color: rgba(99, 102, 241, 0.1); /* Active background */
    font-weight: 600;
     border-bottom-color: var(--color-primary); /* Active underline */
}
.nav-link.active i {
    opacity: 1;
}


/* Header User Info & Logout */
.admin-header-widgets .user-info {
    padding: 0.4rem 0.8rem; /* Slightly smaller padding */
    font-size: 0.85rem;
     background: transparent; /* Remove counter background */
     border: none;
     box-shadow: none;
}
.admin-header-widgets .user-info:hover {
     background: var(--color-bg-tertiary); /* Add hover effect */
     box-shadow: none;
}
.admin-header-widgets .user-info i { color: var(--color-info); }

.logout-button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
     background: var(--color-danger);
     color: white;
}
.logout-button:hover {
     background: var(--color-danger); /* Keep color */
     filter: brightness(1.2);
     box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); /* Red glow */
}


/* Admin Content Cards (replaces .admin-widget) */
.content-card {
    margin-bottom: 1.5rem; /* Consistent spacing */
    padding: 1.5rem; /* Standard padding */
    background-color: var(--color-bg-card); /* Use card background */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg); /* Use larger radius */
    box-shadow: var(--shadow-md);
    transition: all var(--speed-normal);
    position: relative; /* For glow effect */
    overflow: hidden; /* Ensures glow doesn't leak weirdly */
}

.content-card h2, .content-card h3 {
    margin-top: 0;
    font-size: 1.3rem; /* Slightly smaller */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.8rem;
    margin-bottom: 1.2rem;
    color: var(--color-primary); /* Use primary color */
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Space Grotesk', sans-serif;
}
.content-card h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    color: var(--color-text-primary); /* Regular text color for h3 */
    border-bottom-style: dashed; /* Different separator */
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
.content-card h2 i, .content-card h3 i {
     font-size: 0.9em; /* Icon relative to heading size */
}

.content-card p, .content-card ul, .content-card small {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}
.content-card ul {
    list-style: none; /* Remove default bullets */
    padding-left: 0;
    margin-top: 0.5rem;
}
.content-card ul li {
    padding-left: 1.5em; /* Indentation */
    position: relative;
    margin-bottom: 0.5rem;
}
.content-card ul li::before {
    content: "\f105"; /* FontAwesome chevron-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--color-primary); /* Use primary color for bullets */
    font-size: 0.8em;
}

.content-card code {
    background-color: var(--color-bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.85em;
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


/* Admin Table Wrapper & Styling */
.table-wrapper {
    overflow-x: auto;
    margin-top: 1rem; /* Space above table */
    width: 100%; /* Nimmt die Breite des Containers ein */
}

/* Use existing .data-table styles, add specific overrides if needed */
.data-table.admin-users-table td, .data-table.toplist-table td {
    vertical-align: middle;
}

/* Role Icons in Table */
.role-icons-cell i.role-icon-inline {
    font-size: 1.1rem;
    margin-right: 0.4rem;
    vertical-align: middle;
    opacity: 0.9;
    transition: opacity var(--speed-fast);
}
.role-icons-cell i.role-icon-inline:hover {
    opacity: 1;
}

/* Action Links in Table */
.actions-cell {
    white-space: nowrap;
    text-align: center; /* Center icons */
}
.action-link {
    display: inline-block;
    margin: 0 0.3rem;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    transition: color var(--speed-fast), transform var(--speed-fast);
}
.action-link:hover {
    transform: scale(1.2);
}
.action-link.view-link:hover { color: var(--color-info); }
.action-link.edit-link:hover { color: var(--color-warning); }
.action-link.delete-link:hover { color: var(--color-danger); }

/* Pagination adjustments */
.pagination {
    margin-top: 1.5rem;
    padding-bottom: 0.5rem; /* Less padding */
    text-align: center;
}
.page-link { /* Use this class on a/span in pagination */
    display: inline-block;
    padding: 0.5rem 0.9rem;
    margin: 0 0.15rem; /* Tighter spacing */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md); /* Slightly less round */
    text-decoration: none;
    color: var(--color-text-secondary);
    background-color: var(--color-bg-tertiary);
    font-size: 0.85rem;
    transition: all var(--speed-fast);
}
.page-link:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.page-link.current {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    font-weight: 600;
    cursor: default;
}
.page-link.disabled {
    color: var(--color-text-muted);
    background-color: var(--color-bg-secondary);
    border-color: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Form Styling */
.filter-card .search-filter-container {
    margin-top: 1rem; /* Space below card title */
    background: none; /* Remove extra background */
    padding: 0;
    box-shadow: none;
    border: none;
}
.filter-label {
     font-weight: 500;
     color: var(--color-text-secondary);
     margin-right: 0.5rem;
     white-space: nowrap;
}

/* Configuration Form */
.config-form {
    margin-top: 1rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}
.form-control { /* General class for form inputs */
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    background-color: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.form-text.text-muted {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.4rem;
    display: block;
}
.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* User Details Page */
.details-card { padding: 2rem; }
.user-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem 2.5rem; /* Row and column gap */
    margin-bottom: 2rem; /* Space before stats section */
}
.detail-section h3 {
    margin-bottom: 1rem; /* Space below section titles */
}
.detail-section ul { margin-top: 0; }
.detail-section li {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.08);
    line-height: 1.5;
}
.detail-section li::before { display: none; } /* Remove default bullet */
.detail-section li strong {
    color: var(--color-text-secondary);
    font-weight: 500;
    padding-right: 1rem;
    flex-shrink: 0;
    min-width: 120px; /* Ensure alignment */
    text-align: right;
}
.detail-section li span {
    color: var(--color-text-primary);
    word-break: break-word;
    text-align: left;
    flex-grow: 1;
}
.detail-section li span.role-icons-cell {
    text-align: left; /* Align icons left */
}

.name-history-list {
    max-height: 200px; /* Or adjust as needed */
    overflow-y: auto; /* Scrollbar if needed */
}
.name-history-list li {
    background: var(--color-bg-tertiary);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
     justify-content: flex-start; /* Align items left */
     border: none;
}
.name-history-list li small {
    margin-left: auto; /* Push date to the right */
    color: var(--color-text-muted);
    font-size: 0.75rem;
}


.stats-section {
    grid-column: 1 / -1; /* Make stats span full width below grid */
    margin-top: 1rem;
}
.stats-table-wrapper {
     max-height: 450px; /* Allow more height for stats */
     overflow-y: auto;
     border: 1px solid rgba(255, 255, 255, 0.08);
     border-radius: var(--radius-md);
     width: 100%; /* Nimmt die Breite des Containers ein */
}
.stats-detail-table th, .stats-detail-table td {
     font-size: 0.85rem;
     padding: 0.6rem 0.8rem;
}
.stats-detail-table th { background: var(--color-bg-tertiary); }
.stats-detail-table td.value-cell {
    text-align: right;
    font-weight: 500;
}
.stats-detail-table td.value-cell:not(:empty)::before { /* Add icons to values maybe? */
   /* content: "\f00c"; Example Checkmark */
   /* font-family: "Font Awesome 6 Free"; */
   /* margin-right: 0.5em; */
   /* color: var(--color-success); */
}

/* Chart Styling */
.chart-card { padding-bottom: 2rem; }
.chart-container {
    margin-top: 1rem;
     min-height: 300px; /* Ensure space for the chart */
     height: 40vh; /* Relative height */
     position: relative;
}
.chart-container canvas {
     max-width: 100%;
}

/* Responsive adjustments for Admin */
@media (max-width: 1024px) {
     .admin-main-nav {
         margin-left: 1rem;
         gap: 0.2rem; /* Tighter gap */
     }
     .nav-link {
         font-size: 0.85rem;
         padding: 0.4rem 0.6rem;
     }
     .admin-header-widgets .user-info span {
         display: none; /* Hide welcome text on smaller screens */
     }
     .admin-header-widgets .user-info {
         padding: 0.4rem;
     }
     .logout-button span {
         display: none; /* Hide logout text */
     }
      .logout-button {
          padding: 0.5rem;
      }
      .logout-button i { margin: 0; }
}

@media (max-width: 768px) {
     .admin-main-nav { display: none; } /* Hide nav, could implement a burger menu */
     .admin-header-widgets { margin-left: auto; } /* Push remaining items right */
     .dashboard-metrics.admin-metrics { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
     h1 { font-size: 1.5rem; }
     .content-card h2 { font-size: 1.2rem; }
     .user-details-grid { grid-template-columns: 1fr; } /* Stack details */
}
/* ============================================= */
/* == Styles for Frontend Player Table View == */
/* ============================================= */

.player-table-wrapper {
    padding: 0; /* Remove padding if card has it */
    overflow-x: auto; /* Allow horizontal scroll on small screens */
    width: 100%; /* Ensure wrapper takes full width */
}

.data-table.player-table {
    /* Inherits base .data-table styles */
    margin-top: 0; /* Remove top margin if wrapper has it */
    width: 100%; /* Ensure table takes full width of wrapper */
}

.player-table thead th {
    font-size: 0.8rem; /* Smaller header text */
    padding: 0.6rem 0.5rem; /* Adjust padding */
    text-align: center;
    white-space: nowrap;
}
.player-table thead th.col-name { text-align: left; } /* Align name left */
.player-table thead th.col-money { text-align: right; } /* Align money right */

.player-table tbody tr.player-row {
    cursor: pointer; /* Indicate clickable row */
    transition: background-color var(--speed-fast);
}
/* .player-table tbody tr:hover is already handled by .data-table */

.player-table tbody td {
    padding: 0.5rem 0.5rem; /* Adjust padding */
    font-size: 0.85rem; /* Slightly smaller body text */
    vertical-align: middle;
    white-space: nowrap; /* Prevent wrapping by default */
}

/* Column Specific Alignments & Widths */
.player-table .cell-center { text-align: center; }
.player-table .cell-right { text-align: right; }

.player-table .col-flag { width: 30px; padding: 0.5rem 0.2rem; }
.player-table .col-name { width: 180px; text-align: left; white-space: normal; } /* Allow name wrap */
.player-table .col-org, .player-table .col-class, .player-table .col-team {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player-table .col-money { width: 110px; text-align: right; font-weight: 500; }
.player-table .col-wanted { width: 40px; text-align: center; }
.player-table .col-health { width: 60px; text-align: center; }
.player-table .col-session { width: 70px; text-align: center; }
.player-table .col-ping { width: 50px; text-align: center; }
.player-table .col-roles { width: 70px; text-align: center; }


/* Table specific elements */
.player-country-table {
    width: 20px; /* Smaller flag */
    height: 15px;
    vertical-align: middle;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--color-bg-tertiary);
}

.player-name-table {
    font-weight: 600;
    font-size: 0.9rem;
    display: block; /* Stack name/username */
    line-height: 1.2;
}

.player-username-table {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: block;
    line-height: 1.1;
    margin-top: 2px;
}

.wanted-level-table {
    font-weight: 600;
    padding: 0.1rem 0.3rem;
    border-radius: var(--radius-sm);
    /* Background color can be added based on level if needed */
}

.health-bar-table-container {
    width: 40px; /* Narrower health bar */
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    display: inline-block; /* Center inline */
    vertical-align: middle;
    overflow: hidden;
}
.health-bar-table-fill {
    height: 100%;
    background: linear-gradient(to right, #ef4444, #f59e0b, #10b981);
    border-radius: var(--radius-full);
    transition: width var(--speed-normal);
}

.ping-value {
    font-weight: 500;
    font-size: 0.8rem;
}
.ping-value.ping-excellent { color: var(--color-success); }
.ping-value.ping-good { color: var(--color-info); }
.ping-value.ping-average { color: var(--color-warning); }
.ping-value.ping-poor { color: var(--color-danger); }

/* View Mode Toggle Buttons */
.view-mode-toggle {
    display: flex;
    align-items: center;
    background-color: var(--color-bg-card);
    border-radius: var(--radius-full);
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.view-mode-btn {
    padding: 0.5rem 0.75rem;
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--speed-fast);
    font-size: 0.9rem;
}
.view-mode-btn:hover {
    color: var(--color-text-primary);
}
.view-mode-btn.active {
    color: var(--color-primary);
    background-color: var(--color-bg-tertiary);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

/* Playtime Period Filter Buttons */
.playtime-period-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem; /* Space below title */
    justify-content: center; /* Center buttons */
}

.playtime-period-filters .button {
    font-size: 0.9rem;
}
/* --- Daily Stats Section --- */
.daily-stats-section {
    margin-bottom: 2rem;
    /* padding: 1.5rem; */
    background-color: var(--color-background-light);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
}

.daily-stats-section .section-title {
    font-family: var(--font-family-headings);
    font-size: 1.6rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary-light);
    display: flex;
    align-items: center;
}
 .daily-stats-section .section-title i {
     margin-right: 0.75rem;
     color: var(--color-primary);
 }

.daily-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    gap: 1.5rem;
}

.daily-stat-card {
    /* Inherits content-card styles */
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
     transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
 .daily-stat-card:hover {
     transform: translateY(-3px);
     box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
 }

.stat-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}
 .stat-card-title i {
     margin-right: 0.6rem;
     color: var(--color-accent); /* Or specific colors */
     width: 20px; /* Ensure icons align nicely */
     text-align: center;
 }
  /* Specific Icon Colors (Optional) */
 .fa-handcuffs { color: #3498db; }
 .fa-skull-crossbones { color: #e74c3c; }
 .fa-running { color: #f1c40f; }
 .fa-flag-checkered { color: #9b59b6; }


.no-daily-data {
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
    flex-grow: 1; /* Takes remaining space */
     display: flex;
     align-items: center;
     justify-content: center;
}

.top-player-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1; /* Takes remaining space */
}

.top-player-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.9rem;
}
 .top-player-list li:last-child {
     border-bottom: none;
 }

.top-player-list .rank {
    font-weight: 600;
    color: var(--color-primary);
    margin-right: 0.75rem;
     min-width: 25px; /* Ensure alignment */
     text-align: right;
}

.top-player-list .player-name {
    color: var(--color-text-primary);
    flex-grow: 1; /* Takes up available space */
    margin-right: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-player-list .stat-value {
    font-weight: 600;
    color: var(--color-accent);
    background-color: var(--color-background);
    padding: 2px 6px;
    border-radius: var(--border-radius-small);
    font-size: 0.85rem;
}