/**
 * Modern Glassmorphism Theme for Verfploeter Visualization
 *
 * Features:
 * - Glassmorphism design
 * - Smooth animations
 * - Modern gradients
 * - Responsive design
 * - Dark/Light themes
 */

/* ============================================
   ROOT VARIABLES - MODERN COLOR PALETTE
   ============================================ */

:root {
    /* Primary Colors - Vibrant Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);

    /* Glassmorphism Colors */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-bg-hover: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);

    /* Dark Theme */
    --dark-bg-primary: #0f0f23;
    --dark-bg-secondary: #1a1a2e;
    --dark-bg-tertiary: #16213e;
    --dark-text-primary: #ffffff;
    --dark-text-secondary: #b8c1ec;
    --dark-accent: #6c5ce7;
    --dark-accent-glow: rgba(108, 92, 231, 0.4);

    /* Light Theme */
    --light-bg-primary: #f0f4ff;
    --light-bg-secondary: #ffffff;
    --light-bg-tertiary: #e8eeff;
    --light-text-primary: #1a1a2e;
    --light-text-secondary: #4a4a68;
    --light-accent: #6c5ce7;
    --light-accent-glow: rgba(108, 92, 231, 0.2);

    /* Site Colors */
    --site-lax: #ff4444;
    --site-scl: #00ff88;
    --site-mia: #4488ff;
    --site-sin: #ffdd44;
    --site-iad: #ff88ff;
    --site-ams: #44ffff;

    /* Shadows & Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-mono: 'Fira Code', 'Consolas', monospace;

    /* Z-Index Layers */
    --z-background: -1;
    --z-normal: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 1000;
    --z-toast: 2000;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--dark-bg-primary);
    color: var(--dark-text-primary);
    overflow-x: hidden;
    position: relative;
}

/* Light Theme */
body.light-theme {
    background: var(--light-bg-primary);
    color: var(--light-text-primary);
}

body.light-theme .glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body.light-theme .glass-hover:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.15);
}

/* Light theme - Control Panel */
body.light-theme #modern-control-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .modern-datepicker,
body.light-theme .timezone-container {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .modern-datepicker:hover,
body.light-theme .timezone-container:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .modern-datepicker input {
    color: var(--light-text-primary);
}

body.light-theme .modern-datepicker .icon,
body.light-theme .timezone-container .icon {
    color: var(--light-accent);
}

/* Light theme - Buttons */
body.light-theme .btn-icon {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--light-text-primary);
}

body.light-theme .btn-icon:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-theme .btn-text {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--light-text-primary);
}

body.light-theme .btn-text:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--light-text-primary);
}

/* Light theme - View Mode Selector */
body.light-theme .view-mode-selector {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .view-mode-btn {
    color: var(--light-text-secondary);
}

body.light-theme .view-mode-btn:hover {
    color: var(--light-text-primary);
    background: rgba(0, 0, 0, 0.08);
}

/* Light theme - Stats Dashboard */
body.light-theme .stats-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .stats-card-title {
    color: var(--light-text-secondary);
}

body.light-theme .stats-label {
    color: var(--light-text-secondary);
}

body.light-theme .stats-card-toggle {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .stats-card-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .stats-card-toggle i {
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme .stats-card-toggle:hover i {
    color: rgba(0, 0, 0, 0.8);
}

/* Light theme - Legend */
body.light-theme #modern-legend {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .legend-title {
    color: var(--light-text-primary);
}

body.light-theme .legend-toggle {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .legend-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .legend-item-modern:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .legend-item-modern.selected {
    background: rgba(0, 0, 0, 0.08);
}

body.light-theme .legend-count {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .legend-item-info {
    border-top-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .site-info-row {
    color: var(--light-text-secondary);
}

/* Light theme - Timezone selector */
body.light-theme .timezone-select-prominent {
    color: var(--light-text-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%236c5ce7' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
}

body.light-theme .timezone-select-prominent option {
    background: var(--light-bg-secondary);
    color: var(--light-text-primary);
}

/* Light theme - Site Distribution */
body.light-theme .site-progress {
    background: rgba(0, 0, 0, 0.08);
}

/* Light theme - Events Quick View */
body.light-theme .events-quickview-panel {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .events-quickview-header {
    background: rgba(0, 0, 0, 0.03);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .events-quickview-header h3 {
    color: var(--light-text-primary);
}

body.light-theme .events-quickview-close {
    color: var(--light-text-secondary);
}

body.light-theme .events-quickview-item {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .events-quickview-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

body.light-theme .events-quickview-title {
    color: var(--light-text-primary);
}

body.light-theme .events-quickview-viewall {
    background: rgba(108, 92, 231, 0.1);
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* Light theme - Popup */
body.light-theme .ol-popup {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: var(--light-text-primary) !important;
}

body.light-theme .ol-popup:after {
    border-top-color: rgba(255, 255, 255, 0.98) !important;
}

body.light-theme .ol-popup:before {
    border-top-color: rgba(0, 0, 0, 0.15);
}

body.light-theme #tabs-list {
    background: rgba(0, 0, 0, 0.03);
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-theme #tabs-list li a {
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--light-text-secondary) !important;
}

body.light-theme #tabs-list li a:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: var(--light-text-primary) !important;
}

body.light-theme #tabs-list li.ui-tabs-active a {
    background: rgba(108, 92, 231, 0.15) !important;
    color: var(--light-accent) !important;
    border-color: rgba(108, 92, 231, 0.2) !important;
}

body.light-theme .dd-tabs-location {
    display: none;
}

body.light-theme .dd-data-table {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .dd-data-table thead {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .dd-data-table th {
    color: var(--light-text-secondary);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .dd-data-table td {
    color: var(--light-text-primary);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .dd-data-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .site-button {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--light-text-secondary);
}

body.light-theme .site-button:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--light-text-primary);
}

body.light-theme .view-trend-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Light theme - Animated Background */
body.light-theme .animated-background {
    display: none;
}

body.light-theme #particles-js {
    background: var(--light-bg-primary) !important;
}

/* Light theme - Toast */
body.light-theme .toast {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--light-text-primary);
}

/* Light theme - Flatpickr */
body.light-theme .flatpickr-calendar {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .flatpickr-months {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .flatpickr-months .flatpickr-month,
body.light-theme .flatpickr-current-month .flatpickr-monthDropdown-months,
body.light-theme .flatpickr-current-month input.cur-year {
    color: var(--light-text-primary) !important;
}

body.light-theme .flatpickr-weekday {
    color: var(--light-text-secondary) !important;
}

body.light-theme .flatpickr-day {
    color: var(--light-text-primary);
}

body.light-theme .flatpickr-day:hover {
    background: rgba(108, 92, 231, 0.15) !important;
}

body.light-theme .flatpickr-day.flatpickr-unavailable,
body.light-theme .flatpickr-day.flatpickr-disabled {
    color: rgba(0, 0, 0, 0.2) !important;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.02) 2px,
        rgba(0, 0, 0, 0.02) 4px
    ) !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    opacity: 0.4 !important;
}

body.light-theme .flatpickr-months .flatpickr-prev-month,
body.light-theme .flatpickr-months .flatpickr-next-month {
    color: var(--light-text-primary) !important;
    fill: var(--light-text-primary) !important;
}

/* Light theme - Scrollbar */
body.light-theme ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Light theme - Tooltip */
body.light-theme .has-tooltip::after {
    background: rgba(30, 30, 50, 0.95);
}

body.light-theme .has-tooltip::before {
    border-top-color: rgba(30, 30, 50, 0.95);
}

/* Light theme - Legacy style.css overrides */
body.light-theme #legend {
    color: var(--light-text-primary);
}

body.light-theme .legend-label {
    color: var(--light-text-primary);
}

body.light-theme #timeslider button,
body.light-theme #play-speed,
body.light-theme #info-modal {
    color: var(--light-text-primary);
}

body.light-theme #debug {
    background: rgba(245, 248, 255, 0.98) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    color: #1a1a2e !important;
}

body.light-theme #debug * {
    color: inherit;
}

body.light-theme #debug label {
    color: #4a4a68 !important;
}

body.light-theme #debug em {
    color: #4a4a68 !important;
}

body.light-theme #debug span {
    background: rgba(102, 126, 234, 0.1);
    color: #6c5ce7 !important;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

body.light-theme #details-tab {
    background: rgba(245, 248, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-top: none !important;
    color: #1a1a2e !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.light-theme #details-tab:hover {
    background: rgba(235, 240, 255, 0.98) !important;
    color: #6c5ce7 !important;
}

body.light-theme .dd-tabs-ptli,
body.light-theme .dd-tabs-dtli,
body.light-theme .dd-tabs-isp,
body.light-theme .dd-tabs-blocks {
    color: var(--light-text-primary) !important;
}

/* Light theme - Timeline view button */
body.light-theme .timeline-view-icon {
    color: var(--light-accent) !important;
}

body.light-theme .timeline-view-text {
    color: var(--light-text-secondary) !important;
}

body.light-theme .dd-dynamicsparkline-labels {
    color: var(--light-text-secondary);
}

body.light-theme .ol-popup-closer:after {
    color: var(--light-text-primary) !important;
}

body.light-theme .ui-tabs .ui-tabs-nav li a {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: var(--light-text-primary) !important;
}

body.light-theme .ui-tabs-nav .ui-state-default {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .ui-state-active {
    background: rgba(245, 245, 255, 0.95) !important;
}

body.light-theme .ui-widget-header {
    border-bottom-color: rgba(0, 0, 0, 0.15);
}

body.light-theme table,
body.light-theme th,
body.light-theme td {
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--light-text-primary);
}

body.light-theme .ol-popup-closer,
body.light-theme .ol-popup-closer:after {
    color: var(--light-text-secondary);
}

body.light-theme .info-modal-button-show {
    color: var(--light-text-primary);
    border-color: rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #667eea 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #764ba2 0%, transparent 70%);
    top: 50%;
    right: -10%;
    animation-delay: 5s;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #f093fb 0%, transparent 70%);
    bottom: -10%;
    left: 30%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 30px) scale(0.9);
    }
    75% {
        transform: translate(30px, 50px) scale(1.05);
    }
}

/* ============================================
   GLASSMORPHISM COMPONENTS
   ============================================ */

.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--glass-shadow);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-hover {
    transition: all var(--transition-normal);
}

.glass-hover:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================
   DEBUG / DETAILS PANEL STYLING
   ============================================ */

#debug {
    background: rgba(20, 30, 50, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 16px 24px !important;
    font-family: var(--font-primary);
    font-size: 13px;
    line-height: 1.8;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
}

#debug span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    color: #a8d4ff !important;
    font-family: var(--font-mono);
    font-size: 13px;
}

#debug label {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#debug em {
    color: rgba(255, 255, 255, 0.5) !important;
    font-style: normal;
    font-size: 12px;
}

#details-tab {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0 !important;
    padding: 8px 24px !important;
    background: rgba(20, 30, 50, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: none !important;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    color: rgba(255, 255, 255, 0.8) !important;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-fast);
}

#details-tab:hover {
    background: rgba(30, 45, 70, 0.95) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ============================================
   MODERN CONTROL PANEL
   ============================================ */

#modern-control-panel {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-sticky);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-xl);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Date Picker - Modern Style */
.modern-datepicker {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-fast);
}

.modern-datepicker:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.modern-datepicker input {
    background: transparent;
    border: none;
    color: var(--dark-text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    min-width: 180px;
}

.modern-datepicker .icon {
    color: var(--dark-accent);
    font-size: 18px;
}

/* Hide datepicker during animation playback */
.modern-datepicker:has(input.playing),
.modern-datepicker input.playing {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================
   MODERN BUTTONS
   ============================================ */

.btn-modern {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    border: none;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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

.btn-modern span {
    position: relative;
    z-index: 1;
}

/* Primary Button */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Icon Button */
.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--dark-text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.95);
}

.btn-icon.active {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-icon.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-icon.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Text Button Style */
.btn-text {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--dark-text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-primary);
    text-decoration: none;
    white-space: nowrap;
}

.btn-text:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
    color: var(--dark-text-primary);
    text-decoration: none;
}

.btn-text:active {
    transform: scale(0.98);
}

.btn-text i {
    font-size: 14px;
}

/* Tooltip Styles */
.has-tooltip {
    position: relative;
}

.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    padding: 8px 12px;
    background: rgba(20, 20, 40, 0.95);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: var(--z-toast);
    pointer-events: none;
}

.has-tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(20, 20, 40, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: var(--z-toast);
}

.has-tooltip:hover::after,
.has-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.has-tooltip:hover::before {
    transform: translateX(-50%);
}

/* ============================================
   PLAYBACK CONTROLS
   ============================================ */

.playback-controls {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    padding: var(--space-xs);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
}

.playback-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--dark-text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.playback-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.playback-btn.play {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.playback-btn.play:hover {
    box-shadow: 0 6px 16px rgba(79, 172, 254, 0.6);
}

.speed-indicator {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-accent);
}

/* ============================================
   VIEW MODE SELECTOR
   ============================================ */

.view-mode-selector {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    color: var(--dark-text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.view-mode-btn:hover {
    color: var(--dark-text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.view-mode-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.view-mode-btn i {
    font-size: 12px;
}

/* ============================================
   STATS DASHBOARD
   ============================================ */

#stats-dashboard {
    position: fixed;
    top: 90px;
    right: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    z-index: var(--z-dropdown);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    animation: slideInRight 0.6s ease-out;
    padding-right: 8px;
}

/* Horizontal collapse styles - cards slide to the right edge */
#stats-dashboard .stats-card {
    width: 320px;
    transition: transform 0.3s ease, width 0.3s ease, margin-right 0.3s ease;
    transform: translateX(0);
}

#stats-dashboard .stats-card.collapsed-horizontal {
    transform: translateX(calc(100% - 48px));
}

#stats-dashboard .stats-card.collapsed-horizontal .stats-card-content {
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

#stats-dashboard .stats-card.collapsed-horizontal .stats-card-header {
    margin-bottom: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 12px 8px;
    height: 120px;
    max-height: 120px;
    justify-content: flex-start;
    gap: 12px;
    overflow: hidden;
}

#stats-dashboard .stats-card.collapsed-horizontal .stats-card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 90px;
}

#stats-dashboard .stats-card.collapsed-horizontal .stats-card-toggle {
    transform: rotate(-90deg);
}

#stats-dashboard .stats-card.collapsed-horizontal .stats-card-toggle i {
    transform: rotate(90deg);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.stats-card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stats-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.stats-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-card-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    color: white;
    font-size: 16px;
}

/* Collapsible card toggle button */
.stats-card-toggle {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: 8px;
}

.stats-card-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(180deg);
}

.stats-card-toggle i {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
}

.stats-card-toggle:hover i {
    color: white;
}

/* Collapsed state (vertical - deprecated, kept for backwards compatibility) */
.stats-card.collapsed {
    padding-bottom: var(--space-md);
}

.stats-card.collapsed .stats-card-header {
    margin-bottom: 0;
}

.stats-card-content {
    overflow: hidden;
    transition: opacity 0.2s ease, height 0.3s ease;
}

/* Make header clickable */
.collapsible-card .stats-card-header {
    cursor: pointer;
    user-select: none;
}

/* Horizontal collapse toggle icon - chevron pointing left/right */
.stats-card .stats-card-toggle i.fa-chevron-left,
.stats-card .stats-card-toggle i.fa-chevron-right {
    transition: transform 0.3s ease;
}

.stats-card.collapsed-horizontal .stats-card-toggle {
    background: rgba(102, 126, 234, 0.3);
}

.stats-value {
    font-size: 32px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-xs);
}

.stats-label {
    font-size: 12px;
    color: var(--dark-text-secondary);
}

/* Event Card Styles */
.event-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.event-card.severity-high {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.15) 0%, rgba(255, 100, 100, 0.1) 100%);
    border-color: rgba(255, 68, 68, 0.4);
}

.event-card.severity-medium {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.15) 0%, rgba(255, 200, 50, 0.1) 100%);
    border-color: rgba(255, 170, 0, 0.4);
}

.event-card.severity-low {
    background: linear-gradient(135deg, rgba(68, 255, 68, 0.15) 0%, rgba(100, 255, 100, 0.1) 100%);
    border-color: rgba(68, 255, 68, 0.4);
}

.event-card .event-card-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-card .event-icon i {
    font-size: 16px;
}

.event-card-content {
    margin: var(--space-sm) 0;
}

.event-description {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-text-primary);
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

.event-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 11px;
    color: var(--dark-text-secondary);
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-meta i {
    font-size: 10px;
    opacity: 0.7;
}

.event-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-accent);
    text-decoration: none;
    margin-top: var(--space-sm);
    transition: all var(--transition-fast);
}

.event-more-link:hover {
    color: var(--dark-accent-hover);
    gap: 10px;
}

.event-more-link i {
    font-size: 10px;
    transition: transform var(--transition-fast);
}

.event-more-link:hover i {
    transform: translateX(3px);
}

/* Site Distribution Mini Chart */
.site-distribution {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.site-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.site-name {
    width: 40px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.site-progress {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.site-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.site-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: shimmer 2s infinite;
}

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

.site-percentage {
    width: 45px;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}

/* ============================================
   LEGEND - MODERN STYLE
   ============================================ */

#modern-legend {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    z-index: var(--z-dropdown);
    min-width: 250px;
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.legend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.legend-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-text-primary);
}

.legend-toggle {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.legend-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(180deg);
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.legend-item-modern {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.legend-item-modern::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.legend-item-modern:hover {
    background: rgba(255, 255, 255, 0.08);
}

.legend-item-modern:hover::before {
    opacity: 1;
}

.legend-item-modern.selected {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--site-color, rgba(255, 255, 255, 0.3));
}

.legend-item-modern.selected::before {
    opacity: 1;
    background: var(--site-color, var(--dark-accent));
}

.legend-item-modern.selected .legend-color-dot {
    animation: pulseSelected 1s infinite;
}

@keyframes pulseSelected {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px currentColor;
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 20px currentColor;
    }
}

.legend-color-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    box-shadow: 0 0 12px currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 8px currentColor;
    }
    50% {
        box-shadow: 0 0 16px currentColor;
    }
}

.legend-label {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.legend-label .legend-icon {
    margin-right: 8px;
    font-size: 14px;
}

.legend-count {
    font-size: 11px;
    font-family: var(--font-mono);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
}

/* Site Info Panel (expanded on click) */
.legend-item-info {
    width: 100%;
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--dark-text-secondary);
    padding: 4px 0;
}

.site-info-row i {
    width: 14px;
    font-size: 10px;
    opacity: 0.6;
    text-align: center;
}

.legend-item-modern.selected .legend-item-info {
    display: block;
}

.legend-item-modern {
    flex-wrap: wrap;
}

/* Disabled/Inactive site styles */
.legend-item-modern.disabled {
    opacity: 0.4;
    cursor: default;
    order: 100; /* Push to bottom of list */
}

.legend-item-modern.disabled:hover {
    background: rgba(255, 255, 255, 0.03);
}

.legend-item-modern.disabled:hover::before {
    opacity: 0;
}

.legend-item-modern.disabled .legend-color-dot {
    animation: none;
    box-shadow: none;
    background: rgba(128, 128, 128, 0.5) !important;
}

.legend-item-modern.disabled .legend-count {
    color: rgba(255, 255, 255, 0.3);
}

.site-not-active {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 170, 0, 0.8);
    padding: 6px 0;
    margin-bottom: 4px;
    border-bottom: 1px dashed rgba(255, 170, 0, 0.3);
}

.site-not-active i {
    font-size: 12px;
}

/* Light theme disabled styles */
body.light-theme .legend-item-modern.disabled {
    opacity: 0.35;
}

body.light-theme .legend-item-modern.disabled .legend-color-dot {
    background: rgba(100, 100, 100, 0.4) !important;
}

body.light-theme .site-not-active {
    color: rgba(200, 120, 0, 0.9);
    border-bottom-color: rgba(200, 120, 0, 0.3);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--dark-accent);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    #modern-control-panel {
        flex-direction: column;
        top: 10px;
    }

    #stats-dashboard {
        width: 280px;
        top: 10px;
        right: 10px;
    }

    #modern-legend {
        bottom: 10px;
        left: 10px;
    }
}

@media (max-width: 768px) {
    #stats-dashboard {
        position: relative;
        width: 100%;
        max-height: none;
        top: 0;
        right: 0;
        margin: var(--space-md);
    }

    #modern-control-panel {
        width: calc(100% - 40px);
        left: 20px;
        transform: none;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

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

.glow {
    box-shadow: 0 0 20px currentColor;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   SITE MARKERS - ANIMATED
   ============================================ */

.site-marker-container {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
}

/* Pulse container for overlay-based pulse animations */
.site-marker-pulse-container {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.site-marker-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    position: absolute;
    z-index: 3;
    transition: transform 0.3s ease;
}

.site-marker-container:hover .site-marker-dot {
    transform: scale(1.3);
}

.site-marker-pulse {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--site-color);
    opacity: 0;
    animation: sitePulse 2.5s ease-out infinite;
    z-index: 1;
}

.site-marker-pulse.pulse-2 {
    animation-delay: 1.25s;
}

@keyframes sitePulse {
    0% {
        transform: scale(0.3);
        opacity: 0.6;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.site-marker-label {
    position: absolute;
    top: -22px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    text-shadow:
        0 0 4px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(0, 0, 0, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    z-index: 4;
    letter-spacing: 1px;
}

.site-marker-container:hover .site-marker-label {
    transform: translateY(-3px);
    transition: transform 0.2s ease;
}

/* ============================================
   USER LOCATION MARKER
   ============================================ */

.user-location-marker {
    position: relative;
    width: 20px;
    height: 20px;
}

.user-location-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #4285f4;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.user-location-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(66, 133, 244, 0.3);
    border-radius: 50%;
    animation: user-location-pulse 2s ease-out infinite;
    z-index: 1;
}

@keyframes user-location-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* ============================================
   TIMEZONE SELECTOR
   ============================================ */

.timezone-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    padding: 6px 12px;
    color: var(--dark-text-primary);
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
    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='%23ffffff' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    min-width: 100px;
}

.timezone-select:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.timezone-select:focus {
    border-color: var(--dark-accent);
    box-shadow: 0 0 0 2px var(--dark-accent-glow);
}

.timezone-select option {
    background: var(--dark-bg-secondary);
    color: var(--dark-text-primary);
    padding: 8px;
}

/* Light theme timezone selector */
body.light-theme .timezone-select {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--light-text-primary);
    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='%231a1a2e' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
}

body.light-theme .timezone-select option {
    background: var(--light-bg-secondary);
    color: var(--light-text-primary);
}

/* Flatpickr custom styles for disabled dates */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: rgba(255, 255, 255, 0.2) !important;
    background: transparent !important;
    cursor: not-allowed !important;
    text-decoration: line-through;
}

.flatpickr-day.flatpickr-disabled::after {
    content: none;
}

/* Available dates styling */
.flatpickr-calendar {
    background: rgba(15, 15, 35, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-xl) !important;
}

.flatpickr-months {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.flatpickr-months .flatpickr-month {
    color: var(--dark-text-primary);
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    color: var(--dark-text-primary) !important;
}

.flatpickr-weekdays {
    background: transparent !important;
}

.flatpickr-weekday {
    color: var(--dark-text-secondary) !important;
    font-weight: 600;
}

.flatpickr-day {
    color: var(--dark-text-primary);
    border-radius: var(--radius-sm) !important;
    transition: all var(--transition-fast);
}

.flatpickr-day:hover {
    background: rgba(102, 126, 234, 0.3) !important;
    border-color: transparent !important;
}

.flatpickr-day.selected {
    background: var(--primary-gradient) !important;
    border-color: transparent !important;
    color: white !important;
}

.flatpickr-day.today {
    border-color: var(--dark-accent) !important;
}

.flatpickr-day.today:hover {
    background: rgba(102, 126, 234, 0.3) !important;
}

/* Navigation arrows */
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: var(--dark-text-primary) !important;
    fill: var(--dark-text-primary) !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: var(--dark-accent) !important;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    fill: currentColor !important;
}

/* ============================================
   MODERN POPUP/DRILLDOWN STYLES
   ============================================ */

.ol-popup {
    position: absolute;
    background: rgba(15, 15, 35, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    font-family: var(--font-primary);
    color: var(--dark-text-primary) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    bottom: 15px;
    left: -50px;
    min-width: 380px;
    max-width: 420px;
    height: auto;
    min-height: 200px;
    max-height: 300px;
    padding: 0;
    overflow: hidden;
    animation: popupSlideIn 0.3s ease-out;
}

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

.ol-popup:after {
    border-top-color: rgba(15, 15, 35, 0.95) !important;
    border-width: 12px;
    left: 50px;
    margin-left: -12px;
}

.ol-popup:before {
    border-top-color: rgba(255, 255, 255, 0.15);
    border-width: 13px;
    left: 50px;
    margin-left: -13px;
}

.ol-popup-closer {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.ol-popup-closer:hover {
    background: rgba(255, 68, 68, 0.3);
    transform: scale(1.1);
}

.ol-popup-closer:after {
    content: "\00d7";
    color: var(--dark-text-primary);
    font-size: 16px;
    font-weight: 600;
}

/* Tabs styling */
#tabs {
    font-family: var(--font-primary) !important;
    font-size: 13px !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

#tabs-list {
    display: flex;
    gap: 4px;
    padding: 12px 12px 0 12px !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 100% !important;
    box-sizing: border-box;
}

#tabs-list li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

#tabs-list li a,
.ui-tabs .ui-tabs-nav li a {
    display: block;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--dark-text-secondary) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
    border: 1px solid transparent !important;
    border-bottom: none !important;
}

#tabs-list li a:hover,
.ui-tabs .ui-tabs-nav li a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--dark-text-primary) !important;
}

#tabs-list li.ui-tabs-active a,
.ui-tabs .ui-tabs-nav li.ui-tabs-active a,
.ui-state-active a {
    background: rgba(102, 126, 234, 0.2) !important;
    color: var(--dark-accent) !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
}

.ui-widget-header {
    background: transparent !important;
    border: none !important;
}

.ui-tabs-nav .ui-state-default {
    background: transparent !important;
    border: none !important;
}

#tabs-container {
    padding: 16px !important;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 200px;
}

/* Tab content panels */
.dd-tabs-ptli,
.dd-tabs-dtli,
.dd-tabs-isp {
    padding: 0 !important;
    background-color: transparent !important;
    color: var(--dark-text-primary) !important;
}

.dd-tabs-isp {
    max-height: none !important;
}

.dd-tabs-location {
    display: none;
}

.dd-tabs-blocks {
    font-size: 13px;
    line-height: 1.6;
}

/* Site buttons in ISP tab */
.site-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin-bottom: 12px;
}

.site-button {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--dark-text-secondary);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.site-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--dark-text-primary);
}

.site-button.active {
    background: var(--primary-gradient) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Data table in popup */
.dd-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dd-data-table thead {
    background: rgba(255, 255, 255, 0.05);
}

.dd-data-table th {
    padding: 10px 8px;
    font-weight: 600;
    text-align: left;
    color: var(--dark-text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dd-data-table td {
    padding: 8px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--dark-text-primary);
}

.dd-data-table tbody tr {
    transition: background var(--transition-fast);
}

.dd-data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dd-data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Sparkline area */
.dd-dynamicsparkline {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.dd-dynamicsparkline-labels {
    font-size: 10px;
    color: var(--dark-text-secondary);
    margin-top: 4px;
}

/* Timeout/retry message */
.dd-timeout-block {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px 24px;
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: #ff6b6b;
}

.dd-timeout-retry {
    padding: 6px 12px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dd-timeout-retry:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* View Trend button in popup */
.dd-tabs-actions {
    margin: 8px 0;
    display: flex;
    justify-content: flex-end;
}

.view-trend-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-end) 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-trend-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.view-trend-btn i {
    font-size: 14px;
}

/* jQuery UI overrides for popup */
.ui-tabs .ui-tabs-panel {
    padding: 0 !important;
}

.ui-widget-content {
    border: none !important;
    background: transparent !important;
    color: var(--dark-text-primary) !important;
}

/* ============================================
   ENHANCED DATEPICKER - UNAVAILABLE DATES
   ============================================ */

/* Unavailable/disabled dates - grayed out and unclickable */
.flatpickr-day.flatpickr-unavailable,
.flatpickr-day.flatpickr-unavailable:hover,
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: rgba(255, 255, 255, 0.15) !important;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.02) 2px,
        rgba(255, 255, 255, 0.02) 4px
    ) !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    text-decoration: none;
    opacity: 0.4 !important;
}

/* Available dates - show small dot indicator */
.flatpickr-day.flatpickr-available {
    color: var(--dark-text-primary);
    position: relative;
}

.flatpickr-day.flatpickr-available::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--dark-accent);
    border-radius: 50%;
    opacity: 0.7;
}

.flatpickr-day.flatpickr-available:hover::after {
    opacity: 1;
    background: white;
}

.flatpickr-day.flatpickr-available.selected::after {
    background: white;
    opacity: 1;
}

/* Pending state - dates not yet loaded */
.flatpickr-day.flatpickr-pending {
    color: rgba(255, 255, 255, 0.4) !important;
}

body.light-theme .flatpickr-day.flatpickr-pending {
    color: rgba(0, 0, 0, 0.3) !important;
}

/* Loading state for datepicker */
.flatpickr-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.flatpickr-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 35, 0.5);
    z-index: 10;
    border-radius: var(--radius-full);
}

/* ============================================
   TIMEZONE SELECTOR - PROMINENT STYLE
   ============================================ */

.timezone-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-fast);
}

.timezone-container:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.timezone-container .icon {
    color: var(--dark-accent);
    font-size: 16px;
}

.timezone-select-prominent {
    background: transparent;
    border: none;
    color: var(--dark-text-primary);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    min-width: 140px;
    padding-right: 20px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23667eea' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

.timezone-select-prominent option {
    background: var(--dark-bg-secondary);
    color: var(--dark-text-primary);
    padding: 10px;
}

/* Timezone change animation */
.timezone-refreshing {
    animation: timezoneRefresh 0.5s ease-out;
}

@keyframes timezoneRefresh {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

/* ============================================
   EVENTS QUICK VIEW PANEL
   ============================================ */

.events-quickview-panel {
    position: fixed;
    top: 90px;
    left: 20px;
    width: 360px;
    max-height: 450px;
    border-radius: var(--radius-lg);
    z-index: var(--z-dropdown);
    overflow: hidden;
    animation: slideInLeft 0.3s ease-out;
}

.events-quickview-panel.hidden {
    display: none;
}

.events-quickview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.events-quickview-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.events-quickview-header h3 i {
    color: var(--dark-accent);
}

.events-quickview-close {
    background: transparent;
    border: none;
    color: var(--dark-text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.events-quickview-close:hover {
    background: rgba(255, 68, 68, 0.2);
    color: #ff6b6b;
}

.events-quickview-content {
    padding: var(--space-md);
    max-height: 320px;
    overflow-y: auto;
}

.events-quickview-loading {
    text-align: center;
    padding: var(--space-xl);
    color: var(--dark-text-secondary);
}

.events-quickview-loading i {
    margin-right: var(--space-sm);
}

.events-quickview-item {
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.events-quickview-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: var(--dark-accent);
    transform: translateX(4px);
}

.events-quickview-item:last-child {
    margin-bottom: 0;
}

.events-quickview-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.events-quickview-date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--dark-accent);
    font-weight: 600;
}

.events-quickview-type {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.events-quickview-type.badge-outage {
    background: rgba(255, 68, 68, 0.2);
    color: #ff6b6b;
}

.events-quickview-type.badge-deployment {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.events-quickview-type.badge-recovery {
    background: rgba(68, 136, 255, 0.2);
    color: #4488ff;
}

.events-quickview-type.badge-traffic {
    background: rgba(255, 221, 68, 0.2);
    color: #ffdd44;
}

.events-quickview-type.badge-missing_data {
    background: rgba(136, 136, 136, 0.2);
    color: #888;
}

.events-quickview-type.badge-issue {
    background: rgba(255, 136, 255, 0.2);
    color: #ff88ff;
}

.events-quickview-title {
    font-size: 13px;
    color: var(--dark-text-primary);
    line-height: 1.4;
}

.events-quickview-sites {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.events-quickview-site {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
}

.events-quickview-site.site-lax { background: rgba(255, 68, 68, 0.2); color: var(--site-lax); }
.events-quickview-site.site-scl { background: rgba(0, 255, 136, 0.2); color: var(--site-scl); }
.events-quickview-site.site-mia { background: rgba(68, 136, 255, 0.2); color: var(--site-mia); }
.events-quickview-site.site-sin { background: rgba(255, 221, 68, 0.2); color: var(--site-sin); }
.events-quickview-site.site-iad { background: rgba(255, 136, 255, 0.2); color: var(--site-iad); }
.events-quickview-site.site-ams { background: rgba(68, 255, 255, 0.2); color: var(--site-ams); }

.events-quickview-viewall {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: var(--space-md);
    background: rgba(102, 126, 234, 0.1);
    color: var(--dark-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all var(--transition-fast);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.events-quickview-viewall:hover {
    background: rgba(102, 126, 234, 0.2);
}

.events-quickview-viewall i {
    transition: transform var(--transition-fast);
}

.events-quickview-viewall:hover i {
    transform: translateX(4px);
}

.no-events {
    text-align: center;
    padding: var(--space-xl);
    color: var(--dark-text-secondary);
    font-size: 13px;
}

/* ============================================
   ENHANCED POPUP STYLING
   ============================================ */

/* Improved popup container */
.ol-popup {
    animation: popupSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced popup closer */
.ol-popup-closer {
    background: rgba(255, 68, 68, 0.1) !important;
    border: 1px solid rgba(255, 68, 68, 0.2);
}

.ol-popup-closer:hover {
    background: rgba(255, 68, 68, 0.25) !important;
    transform: scale(1.1) rotate(90deg);
}

.ol-popup-closer:after {
    color: #ff6b6b !important;
}

/* Enhanced tabs */
#tabs-list li.ui-tabs-active a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px 2px 0 0;
}

#tabs-list li a {
    position: relative;
}

/* Enhanced data table */
.dd-data-table th {
    color: var(--dark-accent) !important;
    font-size: 10px !important;
    letter-spacing: 0.8px;
}

.dd-data-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.08) !important;
}

/* ============================================
   ISP TAB STATE CELLS
   ============================================ */

.loading-cell,
.error-cell,
.no-data-cell,
.timeout-cell {
    text-align: center !important;
    padding: 24px !important;
    color: var(--dark-text-secondary);
    font-size: 13px;
}

.loading-cell i,
.error-cell i,
.no-data-cell i,
.timeout-cell i {
    margin-right: 8px;
    font-size: 16px;
}

.error-cell {
    color: #ff6b6b !important;
}

.error-cell i {
    color: #ff6b6b;
}

.timeout-cell {
    color: #ffdd44 !important;
}

.retry-btn {
    margin-left: 12px;
    padding: 6px 14px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.retry-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Table cell specific styling */
.dd-data-table .count-cell {
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--dark-accent);
}

.dd-data-table .asn-cell {
    font-family: var(--font-mono);
    font-size: 11px;
}

.dd-data-table .site-cell {
    font-weight: 700;
    font-family: var(--font-mono);
}

.dd-data-table .name-cell {
    max-width: 160px;
}

.dd-data-table .name-cell .asn-name-wrap {
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    line-height: 1.3;
    font-size: 11px;
}

/* ============================================
   QUARTER TIMELINE - VIEW BUTTON STYLE
   ============================================ */

.timeline-view-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    text-align: center;
}

.timeline-view-icon {
    font-size: 32px;
    color: var(--dark-accent);
    margin-bottom: var(--space-md);
    opacity: 0.8;
}

.timeline-view-text {
    font-size: 13px;
    color: var(--dark-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.timeline-view-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.timeline-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.timeline-view-btn i {
    font-size: 14px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: var(--space-md) var(--space-lg);
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--dark-text-primary);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    animation: toastSlideIn 0.3s ease-out;
    box-shadow: var(--shadow-lg);
}

.toast.toast-success {
    border-left: 3px solid #00ff88;
}

.toast.toast-success i {
    color: #00ff88;
}

.toast.toast-error {
    border-left: 3px solid #ff6b6b;
}

.toast.toast-error i {
    color: #ff6b6b;
}

.toast.toast-info {
    border-left: 3px solid var(--dark-accent);
}

.toast.toast-info i {
    color: var(--dark-accent);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-exit {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================
   BUG REPORT MODAL
   ============================================ */

.bug-report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.bug-report-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.bug-report-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.bug-report-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(1);
    transition: transform 0.3s ease;
}

.bug-report-modal.hidden .bug-report-content {
    transform: scale(0.9);
}

.bug-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bug-report-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bug-report-header h3 i {
    color: #ff6b6b;
}

.bug-report-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bug-report-close:hover {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.bug-report-body {
    padding: 24px;
}

.bug-report-description {
    margin: 0 0 20px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.bug-report-field {
    margin-bottom: 16px;
    position: relative;
}

.bug-report-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.bug-report-field textarea,
.bug-report-field input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.bug-report-field textarea {
    resize: vertical;
    min-height: 100px;
}

.bug-report-field textarea:focus,
.bug-report-field input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bug-report-field textarea::placeholder,
.bug-report-field input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Fira Code', monospace;
}

.bug-report-context {
    padding: 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    margin-top: 8px;
}

.bug-report-context small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bug-report-context i {
    color: #667eea;
}

.bug-report-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bug-report-footer .btn-see-reports {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-right: auto;
}

.bug-report-footer .btn-see-reports:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.bug-report-footer .btn-cancel {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bug-report-footer .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.bug-report-footer .btn-submit {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bug-report-footer .btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.bug-report-footer .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Light Theme Bug Report Modal */
body.light-theme .bug-report-content {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .bug-report-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .bug-report-header h3 {
    color: #1a1a2e;
}

body.light-theme .bug-report-close {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .bug-report-close:hover {
    background: rgba(255, 107, 107, 0.2);
}

body.light-theme .bug-report-description {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .bug-report-field label {
    color: rgba(0, 0, 0, 0.8);
}

body.light-theme .bug-report-field textarea,
body.light-theme .bug-report-field input {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
    color: #1a1a2e;
}

body.light-theme .bug-report-field textarea:focus,
body.light-theme .bug-report-field input:focus {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(102, 126, 234, 0.5);
}

body.light-theme .bug-report-field textarea::placeholder,
body.light-theme .bug-report-field input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .char-count {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .bug-report-context {
    background: rgba(102, 126, 234, 0.08);
}

body.light-theme .bug-report-context small {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .bug-report-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .bug-report-footer .btn-cancel {
    border-color: rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.7);
}

body.light-theme .bug-report-footer .btn-cancel:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1a1a2e;
}

body.light-theme .bug-report-footer .btn-see-reports {
    border-color: rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.7);
}

body.light-theme .bug-report-footer .btn-see-reports:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1a1a2e;
}

/* ============================================
   TIMELINE PLAYBACK STATE
   ============================================ */

/* Control panel stays visible during playback - no hiding */
