/* Styles spécifiques aux pages */
#playerModal p { margin: 0 !important; }
#stats p { margin: 0 !important; }
div img { width: auto; height: 50px; }

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1050;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.theme-switcher:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.theme-switcher svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
    color: #333;
}

[data-bs-theme="dark"] .theme-switcher svg {
    color: #e4e4e7;
}

.theme-switcher:hover svg {
    transform: rotate(15deg);
}

/* Dark Theme */
[data-bs-theme="dark"] {
    --bs-body-bg: #1a1a2e;
    --bs-body-color: #e4e4e7;
    --bs-border-color: #3d3d5c;
    --bs-secondary-bg: #16213e;
    --bs-tertiary-bg: #0f3460;
}

[data-bs-theme="dark"] body {
    background-color: #1a1a2e;
    color: #e4e4e7;
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: #16213e;
    --bs-table-color: #e4e4e7;
    --bs-table-border-color: #3d3d5c;
    --bs-table-striped-bg: #1a1a2e;
    --bs-table-hover-bg: #0f3460;
}

[data-bs-theme="dark"] .table thead {
    background-color: #0f3460;
}

[data-bs-theme="dark"] .table th {
    background-color: #0f3460;
    color: #e4e4e7;
    border-color: #3d3d5c;
}

[data-bs-theme="dark"] .table td {
    border-color: #3d3d5c;
}

/* Fix for th inside tbody (ID column) */
[data-bs-theme="dark"] .table tbody th {
    background-color: #16213e;
    color: #e4e4e7;
}

[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd) th {
    background-color: #1a1a2e;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #16213e;
    border-color: #3d3d5c;
    color: #e4e4e7;
}

[data-bs-theme="dark"] .modal-header {
    border-color: #3d3d5c;
}

[data-bs-theme="dark"] .modal-footer {
    border-color: #3d3d5c;
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-bs-theme="dark"] .form-control {
    background-color: #16213e;
    border-color: #3d3d5c;
    color: #e4e4e7;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #1a1a2e;
    border-color: #0d6efd;
    color: #e4e4e7;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #8888a0;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #0f3460;
    border-color: #3d3d5c;
    color: #e4e4e7;
}

[data-bs-theme="dark"] .card {
    background-color: #16213e;
    border-color: #3d3d5c;
}

[data-bs-theme="dark"] .alert-success {
    background-color: #0d3d2e;
    border-color: #198754;
    color: #75e6a0;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: #3d1a1a;
    border-color: #dc3545;
    color: #f5a0a0;
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] p.text-muted,
[data-bs-theme="dark"] span.text-muted,
[data-bs-theme="dark"] small.text-muted {
    color: #8888a0 !important;
}

[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] b,
[data-bs-theme="dark"] strong {
    color: #e4e4e7 !important;
}

[data-bs-theme="dark"] .text-secondary {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .text-warning {
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .text-info {
    color: #22d3ee !important;
}

[data-bs-theme="dark"] .text-success {
    color: #4ade80 !important;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
    color: #e4e4e7;
}

[data-bs-theme="dark"] a {
    color: #6ea8fe;
}

[data-bs-theme="dark"] a:hover {
    color: #9ec5fe;
}

[data-bs-theme="dark"] .progress {
    background-color: #3d3d5c;
}

[data-bs-theme="dark"] .spinner-border.text-primary {
    color: #6ea8fe !important;
}

[data-bs-theme="dark"] tr[data-player]:hover {
    background-color: #0f3460 !important;
    cursor: pointer;
}

/* Light theme hover for consistency */
[data-bs-theme="light"] tr[data-player]:hover,
html:not([data-bs-theme]) tr[data-player]:hover {
    background-color: #f8f9fa !important;
    cursor: pointer;
}

/* Highcharts dark theme support */
[data-bs-theme="dark"] .highcharts-background {
    fill: #16213e;
}

[data-bs-theme="dark"] .highcharts-title,
[data-bs-theme="dark"] .highcharts-subtitle,
[data-bs-theme="dark"] .highcharts-axis-title,
[data-bs-theme="dark"] .highcharts-legend-item text {
    fill: #e4e4e7 !important;
}

[data-bs-theme="dark"] .highcharts-axis-labels text {
    fill: #8888a0 !important;
}

[data-bs-theme="dark"] .highcharts-grid-line {
    stroke: #3d3d5c;
}

/* Minecraft colors adjustments for dark theme */
[data-bs-theme="dark"] .BLACK {
    color: #555555 !important;
}

[data-bs-theme="dark"] .DARK_GRAY {
    color: #888888 !important;
}

[data-bs-theme="dark"] .GRAY {
    color: #bbbbbb !important;
}

/* Footer text */
[data-bs-theme="dark"] footer,
[data-bs-theme="dark"] .footer {
    color: #8888a0;
}

/* Dropdown menus */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #16213e;
    border-color: #3d3d5c;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e4e4e7;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #0f3460;
    color: #ffffff;
}

/* General text color for dark theme */
[data-bs-theme="dark"] p,
[data-bs-theme="dark"] span,
[data-bs-theme="dark"] td,
[data-bs-theme="dark"] th,
[data-bs-theme="dark"] label,
[data-bs-theme="dark"] div {
    color: inherit;
}

[data-bs-theme="dark"] .fst-italic {
    color: #8888a0;
}

/* Ensure all text inherits dark theme color */
[data-bs-theme="dark"] .align-middle {
    color: #e4e4e7;
}

[data-bs-theme="dark"] .text-center {
    color: #e4e4e7;
}

/* Table cell spans (Hypixel level, etc.) - exclude Minecraft color classes */
[data-bs-theme="dark"] td span:not([class]),
[data-bs-theme="dark"] td > span:not([class]) {
    color: #e4e4e7;
}

/* Override for Minecraft color classes - they should keep their original colors */
[data-bs-theme="dark"] .vip,
[data-bs-theme="dark"] .vip_plus { color: #55FF55 !important; }
[data-bs-theme="dark"] .mvp,
[data-bs-theme="dark"] .mvp_plus { color: #55FFFF !important; }
[data-bs-theme="dark"] .mvp_plus_plus { color: #FFAA00 !important; }
[data-bs-theme="dark"] .default { color: #AAAAAA !important; }
[data-bs-theme="dark"] .DARK_BLUE { color: #0000AA !important; }
[data-bs-theme="dark"] .DARK_GREEN { color: #00AA00 !important; }
[data-bs-theme="dark"] .DARK_AQUA { color: #00AAAA !important; }
[data-bs-theme="dark"] .DARK_RED { color: #AA0000 !important; }
[data-bs-theme="dark"] .DARK_PURPLE { color: #AA00AA !important; }
[data-bs-theme="dark"] .GOLD { color: #FFAA00 !important; }
[data-bs-theme="dark"] .BLUE { color: #5555FF !important; }
[data-bs-theme="dark"] .GREEN { color: #55FF55 !important; }
[data-bs-theme="dark"] .AQUA { color: #55FFFF !important; }
[data-bs-theme="dark"] .RED { color: #FF5555 !important; }
[data-bs-theme="dark"] .LIGHT_PURPLE { color: #FF55FF !important; }
[data-bs-theme="dark"] .YELLOW { color: #FFFF55 !important; }
[data-bs-theme="dark"] .WHITE { color: #FFFFFF !important; }
