/* Meta Militia Dashboard - Main Stylesheet */
/* Extracted from index.html */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: #1a1a2e;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    background-attachment: fixed;
    color: #eee;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(76, 209, 196, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 90%, rgba(255, 107, 157, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Sync Progress Bar */
.sync-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-tertiary);
    z-index: 9999;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.sync-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        var(--accent-primary) 0%, 
        var(--accent-secondary) 50%, 
        var(--accent-primary) 100%);
    background-size: 200% 100%;
    box-shadow: 
        0 0 20px var(--accent-primary),
        0 0 40px rgba(255, 215, 0, 0.3);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: shimmer 2s ease-in-out infinite;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sync-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%);
    animation: slide 1.5s ease-in-out infinite;
}

.sync-progress-text {
    position: fixed;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-primary);
    font-size: 10px;
    font-weight: 600;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 0 10px var(--accent-primary);
    white-space: nowrap;
    z-index: 10001;
    padding: 3px 12px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 0 0 6px 6px;
    border: 1px solid var(--accent-primary);
    border-top: none;
    backdrop-filter: blur(10px);
    animation: pulse 2s ease-in-out infinite;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 0;
    }
    50% {
        background-position: 100% 0;
    }
}

@keyframes slide {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.subtitle {
    color: #aaa;
    font-size: 1.1em;
}

.main-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    max-width: 100%;
    overflow-x: hidden;
}

.sidebar {
    width: 180px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.content-area {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
    padding-top: 5px;
}

.refresh-btn {
    padding: 14px 18px;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e0;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 100;
    pointer-events: auto;
}

.refresh-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--glow-color);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.refresh-btn:hover::before {
    width: 300px;
    height: 300px;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #000;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px var(--glow-color);
    transform: translateY(-2px);
}

.refresh-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px var(--glow-color);
}

.nav-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-tabs button {
    padding: 14px 18px;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e0;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-tabs button::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-tabs button:hover {
    background: rgba(26, 26, 46, 0.8);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateX(4px);
    box-shadow: 0 4px 8px var(--glow-color);
}

.nav-tabs button:hover::before {
    transform: scaleY(1);
}

.nav-tabs button.active {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #000;
    border-color: var(--accent-primary);
    font-weight: 600;
    box-shadow: 0 4px 12px var(--glow-color);
    transform: translateX(4px);
}

.nav-tabs button.active::before {
    transform: scaleY(1);
    background: #000;
}

.section {
    display: none;
    padding-top: 5px;
}

.section.active {
    display: block;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow-x: hidden; /* Prevent horizontal overflow */
    overflow-y: visible;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 20px var(--glow-color);
    border-color: var(--card-border);
}

.card h2 {
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--accent-primary), transparent) 1;
    padding-bottom: 10px;
    position: relative;
}

.card h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
}

.card:hover h2::after {
    width: 100%;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--accent-primary);
    font-weight: bold;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #16213e;
    border-radius: 4px;
    background: #1a1a2e;
    color: #eee;
    font-size: 1em;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 5px var(--glow-color);
}

button {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--glow-color);
    position: relative;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--glow-color);
    filter: brightness(1.1);
}

button:active {
    transform: translateY(0);
    filter: brightness(0.9);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
    padding-bottom: 12px; /* Space for scrollbar */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom scrollbar for table containers */
.table-responsive::-webkit-scrollbar,
div[style*="overflow-x: auto"]::-webkit-scrollbar {
    height: 12px; /* Larger scrollbar */
}

.table-responsive::-webkit-scrollbar-track,
div[style*="overflow-x: auto"]::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.4);
    border-radius: 6px;
    margin: 0 10px; /* Inset from edges */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-responsive::-webkit-scrollbar-thumb,
div[style*="overflow-x: auto"]::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 6px;
    border: 2px solid rgba(0,0,0,0.3);
    box-shadow: 0 0 6px var(--glow-color);
}

.table-responsive::-webkit-scrollbar-thumb:hover,
div[style*="overflow-x: auto"]::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    box-shadow: 0 0 10px var(--glow-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    display: table; /* Ensure proper table layout */
}

th {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    color: var(--accent-primary);
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid var(--accent-primary);
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap; /* Prevent header text wrapping */
}

th.dragging {
    opacity: 0.4;
}

th:hover {
    background: var(--bg-tertiary);
}

td {
    padding: 12px;
    border-bottom: 1px solid #16213e;
    white-space: nowrap; /* Prevent cell content wrapping by default */
}

tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: rgba(0, 255, 159, 0.15) !important;
    transform: translateX(4px);
    box-shadow: inset 3px 0 0 var(--accent-primary);
}

.rank-1 { color: var(--accent-primary); font-weight: bold; }
.rank-2 { color: #c0c0c0; font-weight: bold; }
.rank-3 { color: #cd7f32; font-weight: bold; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 5px 0;
}

.stat-box {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--glow-color), transparent);
    transition: left 0.5s ease;
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--glow-color);
    border-color: var(--card-border);
}

.stat-box:hover::before {
    left: 100%;
}

.stat-value {
    font-size: 2em;
    color: var(--accent-primary);
    font-weight: bold;
}

.stat-label {
    color: #aaa;
    font-size: 0.9em;
    margin-top: 5px;
}

.message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.message.success {
    background: #28a745;
    color: #fff;
}

.message.error {
    background: #dc3545;
    color: #fff;
}

.loading {
    text-align: center;
    color: var(--accent-primary);
}

.spinner {
    border: 3px solid #16213e;
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.time-range-btn {
    padding: 8px 16px;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #eee;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.time-range-btn:hover {
    background: rgba(26, 26, 46, 0.8);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--glow-color);
}

.time-range-btn.active {
    background: var(--accent-primary);
    color: #000;
    font-weight: bold;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px var(--glow-color);
}

.boss-item {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.boss-card {
    background: #1a2a4e;
    border: 1px solid #16213e;
    border-radius: 6px;
    padding: 15px;
}

.boss-card h3 {
    color: var(--accent-primary);
    margin-bottom: 10px;
}

.boss-stat {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    font-size: 0.95em;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #666;
    background: #1a1a2e;
    border-top: 1px solid #16213e;
}

/* Chart type selector */
.chart-type-selector {
    display: flex;
    gap: 5px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: 6px;
}

.chart-type-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-type-btn:hover {
    background: var(--card-bg);
    color: var(--accent-primary);
}

.chart-type-btn.active {
    background: var(--card-bg);
    color: var(--accent-primary);
    box-shadow: 0 2px 8px var(--glow-color);
}

.chart-type-btn svg {
    filter: drop-shadow(0 0 2px currentColor);
}

/* Raid legend buttons */
.raid-legend-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin: 4px 4px 4px 0;
    background: var(--card-bg);
    border: 2px solid var(--bg-tertiary);
    border-radius: 6px;
    color: #eee;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.raid-legend-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--glow-color);
    border-color: var(--accent-primary);
}

.raid-legend-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.raid-legend-btn.hidden {
    opacity: 0.5;
    text-decoration: line-through;
    border-color: #333;
}

.raid-legend-btn.hidden:hover {
    opacity: 0.7;
}

.raid-legend-btn .color-box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

/* Chart box styling with hover effects */
.chart-box {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    padding-bottom: 40px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chart-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--glow-color), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.chart-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--glow-color);
    border-color: var(--card-border);
}

.chart-box:hover::before {
    left: 100%;
}

/* Activity feed scrollbar styling - applies to all screen sizes */
#activityFeedContainer::-webkit-scrollbar {
    width: 8px;
}

#activityFeedContainer::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

#activityFeedContainer::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.2);
}

#activityFeedContainer::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
}

/* ========== MOBILE RESPONSIVE STYLES ========== */

/* Mobile Ribbon Bar */
.mobile-ribbon {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 15px 10px 10px;
    z-index: 1003;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
    transform: translateY(calc(-100% - 10px)); /* Start collapsed */
}

.mobile-ribbon.collapsed {
    transform: translateY(calc(-100% - 10px));
}

.mobile-ribbon.expanded {
    transform: translateY(0);
}

.ribbon-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.ribbon-toggle {
    position: fixed;
    top: 0; /* Start at top when ribbon is collapsed */
    left: 0;
    right: 0;
    transform: none;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-primary);
    padding: 8px 20px;
    cursor: pointer;
    font-size: 1em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    z-index: 1004;
    display: none;
    line-height: 1;
    transition: top 0.3s ease;
    text-align: center;
    border-radius: 0 0 12px 12px;
}

.ribbon-toggle:hover {
    background: linear-gradient(135deg, #252541 0%, #1e2f4f 100%);
    transform: none !important;
}

.ribbon-toggle:active {
    opacity: 0.8;
    transform: none !important;
}

.ribbon-toggle.expanded {
    top: 77px; /* Move down when ribbon is expanded */
}

/* Hamburger menu button (hidden on desktop) */
.mobile-menu-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    color: #000;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn:active {
    opacity: 0.9;
}

/* Mobile theme button (hidden on desktop) */
.mobile-theme-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    color: #000;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-theme-btn:active {
    opacity: 0.9;
}

/* Mobile admin button */
.mobile-admin-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    color: #000;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-admin-btn:active {
    opacity: 0.9;
}

/* Mobile overlay for sidebar */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    pointer-events: none;
}

.mobile-overlay.active {
    display: block;
    pointer-events: auto;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 0 10px;
    }

    header {
        margin-bottom: 20px;
        padding: 60px 10px 10px;
    }

    h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    /* Show ribbon on mobile */
    .mobile-ribbon {
        display: block;
    }

    .ribbon-toggle {
        display: block;
    }

    /* Show hamburger menu on mobile */
    .mobile-menu-btn {
        display: block;
    }

    /* Show mobile theme button on mobile */
    .mobile-theme-btn {
        display: block;
    }

    /* Main layout becomes vertical on mobile */
    .main-layout {
        flex-direction: column;
        gap: 20px;
    }

    /* Sidebar transforms to bottom slide-up menu */
    .sidebar {
        position: fixed;
        bottom: -100%;
        left: 0;
        width: 100%;
        height: 60vh;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        padding: 20px;
        transition: bottom 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.5);
        border-radius: 20px 20px 0 0;
    }

    .sidebar.active {
        bottom: 0;
    }

    .nav-tabs {
        gap: 10px;
    }

    .nav-tabs button {
        font-size: 1em;
        padding: 16px 20px;
    }

    .refresh-btn {
        font-size: 1em;
        padding: 16px 20px;
    }

    /* Hide desktop theme selector on mobile */
    .theme-selector {
        display: none !important;
    }

    /* Remove theme menu overrides - use base styles */

    .theme-menu h4 {
        font-size: 1.3em;
        margin-bottom: 20px;
    }

    /* Content area uses full width with top padding for ribbon */
    .content-area {
        width: 100%;
        padding-top: 80px;
    }

    /* Stats grid becomes single column on mobile */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    /* Card headers with toggle buttons - responsive layout */
    .card h2 {
        font-size: 1.1em !important;
    }

    /* Toggle buttons - slightly smaller on mobile */
    #categoriesKillsBtn,
    #categoriesPointsBtn {
        font-size: 0.7em !important;
        padding: 3px 8px !important;
    }
}

/* Medium screens - reduce chart height for smaller desktops/laptops */
@media (max-width: 1400px) and (min-width: 769px) {
    .chart-box[style*="height: 520px"] {
        height: 400px !important;
    }
}

/* Mobile specific styles */
@media (max-width: 768px) {
    /* Stats grid becomes single column on mobile (already defined above, kept for clarity) */

    /* Tables become scrollable horizontally */
    .table-responsive,
    .table-container,
    div[style*="overflow-x"] {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        display: block;
    }

    table {
        min-width: 100%;
        font-size: 0.85em;
        display: table;
    }

    /* Ensure tables with many columns have minimum width */
    table thead tr th:nth-child(4) ~ th,
    table tbody tr td:nth-child(4) ~ td {
        white-space: nowrap;
    }

    th, td {
        padding: 8px 6px;
        font-size: 0.85em;
    }

    /* Make sure long content doesn't break layout */
    th, td {
        max-width: none;
        overflow: visible;
    }

    /* Cards have less padding on mobile */
    .card {
        padding: 15px;
        backdrop-filter: blur(5px); /* Reduce blur for performance */
        -webkit-backdrop-filter: blur(5px);
    }

    /* Chart boxes also reduce blur on mobile */
    .chart-box {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

    /* Stat boxes reduce blur */
    .stat-box {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    /* Reduce stat box font sizes on mobile */
    .stat-value {
        font-size: 1.5em !important;
    }
    
    .stat-label {
        font-size: 0.75em !important;
    }
    
    /* Reduce heading sizes to prevent wrapping */
    #activity h3,
    #activity h4 {
        font-size: 0.95em !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Modals take full screen on mobile */
    .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        margin: 5vh auto;
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 1.3em;
    }

    .modal-body {
        max-height: calc(90vh - 120px);
    }

    /* Form inputs are larger on mobile */
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px;
    }

    button {
        padding: 12px 20px;
        font-size: 1em;
    }

    /* Achievement badges smaller on mobile */
    .achievement-badge {
        width: 45px;
        height: 45px;
        font-size: 1.8em;
    }

    /* Chart containers responsive */
    .chart-container {
        height: 300px !important;
    }

    /* Chart boxes should stack on mobile */
    .chart-box {
        margin-bottom: 15px;
        height: auto !important;
    }

    /* Activity tab chart grid becomes single column on mobile */
    #activity .card > div > div[style*="grid-template-columns: 1fr 1fr 1fr"],
    #activity div[style*="display: grid; grid-template-columns: 1fr 1fr 1fr"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Make activity charts stack and maintain readability */
    #activity .chart-box,
    #activity div[style*="height: 520px"] {
        padding: 15px !important;
        height: auto !important;
        min-height: 300px !important;
        max-height: 400px !important;
        min-width: 100% !important;
        width: 100% !important;
    }
    
    /* Points leaderboard container */
    #ehbLeaderboardContainer {
        max-height: 350px !important;
        overflow-y: auto !important;
    }
    
    /* Make points leaderboard table more compact on mobile */
    #ehbLeaderboardContainer table {
        font-size: 0.85em !important;
    }
    
    #ehbLeaderboardContainer th,
    #ehbLeaderboardContainer td {
        padding: 6px 4px !important;
        white-space: nowrap !important;
    }
    
    /* Hide Points/Day column on mobile to save space */
    #ehbLeaderboardContainer th:nth-child(4),
    #ehbLeaderboardContainer td:nth-child(4) {
        display: none !important;
    }

    #activity .chart-box > div[style*="position: relative; flex: 1"] {
        min-height: 350px !important;
        height: auto !important;
    }

    /* Time range buttons wrap on mobile */
    #activity .card > div > div[style*="display: flex; justify-content: space-between"] {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    #activity .time-range-btn {
        font-size: 0.8em !important;
        padding: 6px 10px !important;
    }

    /* Activity stats grid - 2 columns on mobile */
    #activity .stats-grid[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Chart box styling with hover effects */
    .chart-box {
        background: var(--card-bg);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 15px;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .chart-box::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, var(--glow-color), transparent);
        transition: left 0.6s ease;
    }

    /* Use active state for mobile instead of hover */
    @media (hover: hover) {
        .chart-box:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 32px var(--glow-color);
            border-color: var(--card-border);
        }

        .chart-box:hover::before {
            left: 100%;
        }
    }

    .chart-box:active {
        transform: scale(0.98);
    }

    /* Chart type selectors more compact on mobile */
    .chart-type-selector {
        gap: 4px !important;
    }

    .chart-type-btn {
        padding: 4px 6px !important;
    }

    .chart-type-btn svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* Raid legend buttons smaller on mobile */
    .raid-legend-btn {
        padding: 4px 6px !important;
        margin: 2px !important;
        font-size: 10px !important;
        gap: 4px !important;
    }

    .raid-legend-btn .color-box {
        width: 12px !important;
        height: 12px !important;
    }

    /* Boss grid 2 columns on mobile */
    .boss-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .boss-card {
        padding: 10px;
    }

    /* Bosses tab table responsive */
    #bossesContainer {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        display: block;
        scrollbar-gutter: stable;
        -webkit-overflow-scrolling: touch;
    }

    #bossesContainer table {
        width: 100% !important;
        table-layout: auto;
        min-width: 100%;
        font-size: 0.75em;
    }

    #bossesContainer th,
    #bossesContainer td {
        padding: 8px 6px !important;
        font-size: 0.85em;
        white-space: nowrap !important;
    }

    /* Hide less important columns on mobile to show critical info */
    #bossesContainer th:nth-child(5), /* EHB Rate */
    #bossesContainer td:nth-child(5),
    #bossesContainer th:nth-child(6), /* Weight */
    #bossesContainer td:nth-child(6),
    #bossesContainer th:nth-child(7), /* Status */
    #bossesContainer td:nth-child(7) {
        display: none;
    }

    /* Make sure boss name column has enough space */
    #bossesContainer th:nth-child(1),
    #bossesContainer td:nth-child(1) {
        min-width: 120px;
    }

    /* Boss search input on mobile */
    #bossSearch {
        width: 140px !important;
        max-width: 140px !important;
        font-size: 0.75em !important;
        padding: 8px 10px 8px 28px !important;
    }

    /* Search icon smaller on mobile */
    #bossSearch + span {
        font-size: 12px !important;
        left: 8px !important;
    }

    /* Boss category leaders - center the 5th box when alone on mobile */
    .boss-category-leaders {
        justify-items: stretch !important;
    }
    
    .boss-category-leaders > .card:nth-child(5):last-child {
        grid-column: 1 / -1;
        max-width: 280px;
        margin: 0 auto;
        justify-self: center;
    }

    /* Dashboard Meta Members - adjust for mobile */
    #dashboard .card h2 {
        font-size: 0.95em !important;
    }

    #dashboard label {
        font-size: 0.7em !important;
        white-space: nowrap;
    }

    #dashboard input[type="checkbox"] {
        width: 12px !important;
        height: 12px !important;
    }

    /* Make bonus toggle grid more compact on mobile */
    #dashboard .card > div > div[style*="grid-template-columns: 1fr 1fr"] {
        gap: 3px 5px !important;
    }

    /* Player search and filters - make smaller on mobile */
    #playerSearch {
        width: 140px !important;
        font-size: 0.75em !important;
        padding: 6px 8px !important;
    }

    #accountTypeFilter {
        width: 110px !important;
        font-size: 0.75em !important;
        padding: 6px 8px !important;
    }

    /* Make dashboard table scrollable horizontally */
    #dashboardPlayersContainer {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Population Census grid scrolls horizontally on mobile instead of stacking */
    .card > div[style*="display: grid; grid-template-columns: 2fr 1fr"] {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: grid !important;
        grid-template-columns: 2fr 1fr !important;
    }

    /* Force census chart and feed to maintain size */
    .card > div[style*="display: grid; grid-template-columns: 2fr 1fr"] > div {
        min-width: 300px !important;
    }

    .card > div[style*="display: grid; grid-template-columns: 2fr 1fr"] > div:last-child {
        min-width: 200px !important;
    }

    /* Keep Population Census header inline on mobile */
    #dashboard .card > div[style*="display: flex; justify-content: space-between; align-items: center"] {
        flex-direction: row !important;
        align-items: center !important;
    }

    /* Make activity feed entries consistent width */
    #activityFeedContainer > div {
        width: 100%;
        padding: 2px 4px !important;
        font-size: 0.6em !important;
        line-height: 1 !important;
        margin-bottom: 2px !important;
        min-height: unset !important;
    }

    #activityFeedContainer > div * {
        font-size: inherit !important;
        line-height: inherit !important;
    }

    /* Hide some columns on very small screens */
    .hide-mobile {
        display: none !important;
    }

    /* Player breakdown modal - mobile responsive */
    div[onclick*="this.remove()"] > div[style*="max-width: 750px"] {
        max-width: 95vw !important;
        max-height: 95vh !important;
        padding: 15px !important;
        margin: 10px !important;
    }

    /* Breakdown modal header */
    div[onclick*="this.remove()"] > div[style*="max-width: 750px"] h2 {
        font-size: 1.2em !important;
    }

    /* Breakdown modal stat grid - stack on mobile */
    div[onclick*="this.remove()"] > div[style*="max-width: 750px"] div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Breakdown modal stat boxes */
    div[onclick*="this.remove()"] > div[style*="max-width: 750px"] div[style*="grid-template-columns: 1fr 1fr 1fr"] > div {
        padding: 10px !important;
    }

    div[onclick*="this.remove()"] > div[style*="max-width: 750px"] div[style*="grid-template-columns: 1fr 1fr 1fr"] > div > div:first-child {
        font-size: 0.75em !important;
    }

    div[onclick*="this.remove()"] > div[style*="max-width: 750px"] div[style*="grid-template-columns: 1fr 1fr 1fr"] > div > div:last-child {
        font-size: 1.5em !important;
    }

    /* Breakdown modal table - make scrollable */
    div[onclick*="this.remove()"] > div[style*="max-width: 750px"] table {
        font-size: 0.85em !important;
    }

    div[onclick*="this.remove()"] > div[style*="max-width: 750px"] table th,
    div[onclick*="this.remove()"] > div[style*="max-width: 750px"] table td {
        padding: 8px 6px !important;
        font-size: 0.9em !important;
    }

    /* Edit Member button in breakdown modal */
    div[onclick*="this.remove()"] > div[style*="max-width: 750px"] button[onclick*="editPlayer"] {
        font-size: 0.85em !important;
        padding: 8px 12px !important;
    }

    /* Member Since badge */
    div[onclick*="this.remove()"] > div[style*="max-width: 750px"] span[style*="Member Since"] {
        font-size: 0.75em !important;
        padding: 3px 6px !important;
    }

    /* Edit Player Modal - mobile responsive */
    #editPlayerModal > div {
        min-width: auto !important;
        max-width: 95vw !important;
        width: 95vw !important;
        max-height: 95vh !important;
        padding: 15px !important;
    }

    #editPlayerModal h2 {
        font-size: 1.2em !important;
    }

    #editPlayerModal label {
        font-size: 0.9em !important;
        padding: 8px !important;
    }

    #editPlayerModal input[type="date"],
    #editPlayerModal input[type="checkbox"] {
        font-size: 0.9em !important;
    }

    #editPlayerModal button {
        font-size: 0.85em !important;
        padding: 10px 16px !important;
    }

    /* Boss Breakdown Modal - mobile responsive */
    #bossBreakdownModal > div {
        width: 95vw !important;
        max-width: 95vw !important;
        max-height: 95vh !important;
        padding: 15px !important;
        margin: 10px !important;
    }

    #bossBreakdownModal h2 {
        font-size: 1.2em !important;
    }

    /* Boss breakdown stat grid - stack on mobile */
    #bossBreakdownModal div[style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    #bossBreakdownModal div[style*="grid-template-columns: repeat(auto-fit"] > div {
        padding: 10px !important;
    }

    #bossBreakdownModal div[style*="grid-template-columns: repeat(auto-fit"] > div > div:first-child {
        font-size: 0.75em !important;
    }

    #bossBreakdownModal div[style*="grid-template-columns: repeat(auto-fit"] > div > div:last-child {
        font-size: 1.5em !important;
    }

    /* Boss breakdown table - make scrollable */
    #bossBreakdownModal table {
        font-size: 0.85em !important;
    }

    #bossBreakdownModal table th,
    #bossBreakdownModal table td {
        padding: 8px 6px !important;
        font-size: 0.9em !important;
    }

    /* Progress modal positioning for mobile */
    #persistentProgressModal {
        top: auto !important;
        bottom: 10px !important;
        right: 10px !important;
        left: 10px !important;
        min-width: unset !important;
        max-width: unset !important;
        padding: 15px !important;
        font-size: 0.9em !important;
    }

    /* Wealth tab adjustments */
    .wealth-stat-card {
        min-width: 0 !important;
        padding: 15px !important;
    }
    
    .wealth-stat-card > div:first-child {
        font-size: 11px !important;
    }
    
    .wealth-stat-card > div:nth-child(2) {
        font-size: 24px !important;
    }
    
    /* Stack charts vertically on mobile */
    .wealth-charts-row {
        grid-template-columns: 1fr !important;
    }
    
    /* Make transaction form stack vertically */
    .wealth-form-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Top contributors grid */
    #topContributors {
        grid-template-columns: 1fr !important;
    }
    
    /* Transaction filter layout */
    #wealth .card > div:has(#transactionFilter) {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    /* Reduce wealth header size */
    #wealth h2 {
        font-size: 1.5em !important;
    }
    
    /* Reduce card padding */
    #wealth .card {
        padding: 15px !important;
    }

    .transaction-form {
        gap: 10px;
    }

    /* Event creator adjustments */
    .event-form {
        gap: 15px;
    }

    /* Discord widget */
    #discord-widget iframe {
        height: 400px !important;
    }
}

/* Tablet-specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 160px;
    }

    .nav-tabs button {
        padding: 12px 16px;
        font-size: 0.9em;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    table {
        font-size: 0.95em;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }

    .boss-grid {
        grid-template-columns: 1fr !important;
    }

    .modal-content {
        width: 98%;
        padding: 15px;
    }

    /* Card title even smaller on very small screens */
    .card h2 {
        font-size: 1em !important;
    }

    /* Toggle buttons - extra compact */
    #categoriesKillsBtn,
    #categoriesPointsBtn {
        font-size: 0.65em !important;
        padding: 3px 6px !important;
    }

    table {
        font-size: 0.85em;
    }

    th, td {
        padding: 8px 5px;
    }
}

/* Chart.js tooltip overrides */
.chartjs-tooltip {
    max-height: 80vh !important;
    overflow-y: auto !important;
}

/* ========== COLOR THEMES ========== */
:root {
    --bg-primary: #0f0c29;
    --bg-secondary: #302b63;
    --bg-tertiary: #24243e;
    --accent-primary: #ffd700;
    --accent-secondary: #ffa500;
    --card-bg: rgba(15, 52, 96, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #eee;
    --text-secondary: #aaa;
    --glow-color: rgba(255, 215, 0, 0.05);
}

/* Theme: Ocean Blue */
body[data-theme="ocean"] {
    --bg-primary: #0a192f;
    --bg-secondary: #172a45;
    --bg-tertiary: #1e3a5f;
    --accent-primary: #64ffda;
    --accent-secondary: #00d9ff;
    --card-bg: rgba(23, 42, 69, 0.6);
    --glow-color: rgba(100, 255, 218, 0.05);
}

/* Theme: Purple Haze */
body[data-theme="purple"] {
    --bg-primary: #1a0033;
    --bg-secondary: #2d1b69;
    --bg-tertiary: #3d2b7a;
    --accent-primary: #b794f6;
    --accent-secondary: #9f7aea;
    --card-bg: rgba(45, 27, 105, 0.6);
    --glow-color: rgba(183, 148, 246, 0.05);
}

/* Theme: Emerald Forest */
body[data-theme="emerald"] {
    --bg-primary: #0d2818;
    --bg-secondary: #1a3d2e;
    --bg-tertiary: #245239;
    --accent-primary: #10b981;
    --accent-secondary: #34d399;
    --card-bg: rgba(26, 61, 46, 0.6);
    --glow-color: rgba(16, 185, 129, 0.05);
}

/* Theme: Sunset Orange */
body[data-theme="sunset"] {
    --bg-primary: #2d1b1b;
    --bg-secondary: #4a2c2c;
    --bg-tertiary: #5c3737;
    --accent-primary: #ff6b6b;
    --accent-secondary: #ff8787;
    --card-bg: rgba(74, 44, 44, 0.6);
    --glow-color: rgba(255, 107, 107, 0.05);
}

/* Theme: Midnight Blue */
body[data-theme="midnight"] {
    --bg-primary: #0c1445;
    --bg-secondary: #1a2351;
    --bg-tertiary: #283464;
    --accent-primary: #4facfe;
    --accent-secondary: #00f2fe;
    --card-bg: rgba(26, 35, 81, 0.6);
    --glow-color: rgba(79, 172, 254, 0.05);
}

/* Theme: Rose Gold */
body[data-theme="rose"] {
    --bg-primary: #2d1b2e;
    --bg-secondary: #442244;
    --bg-tertiary: #5c365c;
    --accent-primary: #ff6090;
    --accent-secondary: #ffb3d9;
    --card-bg: rgba(68, 34, 68, 0.6);
    --glow-color: rgba(255, 96, 144, 0.05);
}

/* Theme: Cyber Neon */
body[data-theme="cyber"] {
    --bg-primary: #0a0e27;
    --bg-secondary: #16213e;
    --bg-tertiary: #1f2c4a;
    --accent-primary: #00ff9f;
    --accent-secondary: #00ffff;
    --card-bg: rgba(22, 33, 62, 0.6);
    --glow-color: rgba(0, 255, 159, 0.05);
}

/* Theme: Autumn */
body[data-theme="autumn"] {
    --bg-primary: #2d1f1f;
    --bg-secondary: #4a3333;
    --bg-tertiary: #5c4343;
    --accent-primary: #ffa94d;
    --accent-secondary: #ff922b;
    --card-bg: rgba(74, 51, 51, 0.6);
    --glow-color: rgba(255, 169, 77, 0.05);
}

/* Theme: Arctic */
body[data-theme="arctic"] {
    --bg-primary: #1a2332;
    --bg-secondary: #2d3e50;
    --bg-tertiary: #3d5266;
    --accent-primary: #a5f3fc;
    --accent-secondary: #67e8f9;
    --card-bg: rgba(45, 62, 80, 0.6);
    --glow-color: rgba(165, 243, 252, 0.05);
}

/* Apply theme variables */
body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}

body::before {
    background: 
        radial-gradient(circle at 20% 50%, var(--glow-color) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--glow-color) 0%, transparent 50%),
        radial-gradient(circle at 40% 90%, var(--glow-color) 0%, transparent 50%);
}

h1 {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}

.card h2 {
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-image: linear-gradient(90deg, var(--accent-primary), transparent) 1;
}

.card h2::after {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.nav-tabs button.active {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

button {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

th {
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
}

label {
    color: var(--accent-primary);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 5px var(--glow-color);
}

/* Theme Selector Styles */
.theme-selector {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1003;
    transition: transform 0.3s ease;
}

.theme-selector.hidden {
    transform: translateX(-100px);
}

.theme-toggle-btn {
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 1.2em;
    color: var(--accent-primary);
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
}

.theme-toggle-btn:hover {
    background: rgba(26, 26, 46, 0.95);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.theme-menu {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 60vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    display: block;
    z-index: 999999;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.5);
    transition: bottom 0.3s ease;
    overflow-y: auto;
}

/* Hide theme button in desktop menu */
.theme-menu .theme-toggle-btn {
    display: none;
}

.theme-menu.active {
    bottom: 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-menu h4 {
    color: var(--accent-primary);
    margin: 0 0 10px 0;
    font-size: 14px;
    text-align: center;
}

.theme-option {
    padding: 10px;
    margin: 5px 0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.theme-option.active {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--accent-primary);
}

.theme-preview {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.theme-name {
    color: #eee;
    font-size: 13px;
    font-weight: 500;
}

/* Custom scrollbar styles for menus */
.theme-menu::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    width: 12px;
}

.theme-menu::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.4);
    margin-top: 30px;
    margin-bottom: 30px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-menu::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 6px;
    border: 2px solid rgba(0,0,0,0.3);
    box-shadow: 0 0 6px var(--glow-color);
}

.theme-menu::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    box-shadow: 0 0 10px var(--glow-color);
}

/* Add padding to prevent scrollbar from covering rounded corners */
.theme-menu,
.sidebar {
    padding-right: 20px;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 3px;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--glow-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(28px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(76, 209, 196, 0.2);
}

.toggle-slider:hover {
    border-color: var(--accent-primary);
}

/* Select Dropdown Styling */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234cd1c4' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

select:hover {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 8px var(--glow-color);
}

select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px var(--glow-color);
}

select option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 10px;
    font-size: 1em;
}

select option:hover,
select option:focus,
select option:checked {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #000;
    font-weight: bold;
}

select option:disabled {
    color: var(--text-secondary);
    font-style: italic;
}