/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Focus management for accessibility */
*:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
    }
    
    .btn {
        border: 2px solid black;
    }
    
    .modal-content {
        border: 2px solid black;
    }
}

/* Root font size for better accessibility */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    font-display: swap;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title i {
    color: #e74c3c;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 400;
    margin-left: 4rem;
}

.header-controls {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
}

.btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    gap: 2rem;
    padding: 2rem;
    position: relative;
}

.map-section {
    flex: 1;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.map-container {
    height: 70vh;
    width: 100%;
    border-radius: 20px;
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.map-legend h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.superpower { background: linear-gradient(45deg, #e74c3c, #c0392b); }
.major { background: linear-gradient(45deg, #f39c12, #e67e22); }
.regional { background: linear-gradient(45deg, #f1c40f, #d4ac0d); }
.minor { background: linear-gradient(45deg, #27ae60, #229954); }
.limited { background: linear-gradient(45deg, #95a5a6, #7f8c8d); }

.legend-item span {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 500;
}

/* Info Panel */
.info-panel {
    width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

.panel-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

.panel-content {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.welcome-message {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-top: 2rem;
}

/* Country Info Styles */
.country-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    padding: 1.2rem;
    border-radius: 15px;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateX(5px);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.stat-header i {
    font-size: 1.5rem;
    color: #3498db;
}

.stat-header h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
}

.power-index {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin: 1rem 0;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.rankings-list {
    display: grid;
    gap: 1rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ranking-position {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2c3e50;
    min-width: 40px;
}

.ranking-position.top-3 {
    background: linear-gradient(45deg, #f1c40f, #d4ac0d);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ranking-info {
    flex: 1;
}

.ranking-country {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.ranking-score {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 500;
}



/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .info-panel {
        width: 100%;
        max-height: 400px;
    }
    
    .map-container {
        height: 50vh;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        margin-left: 0;
    }
    
    .header-controls {
        justify-content: center;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .map-legend {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .map-container {
        height: 40vh;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: fadeInUp 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }

/* ===============================
   NEW ADVANCED FEATURES 
   =============================== */

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    align-items: center;
    animation: slideInFromTop 0.6s ease-out;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-select, .search-input {
    padding: 0.5rem 0.8rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-select:focus, .search-input:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

.filter-select option {
    background: white;
    color: #2c3e50;
    padding: 0.5rem;
}

.search-input::placeholder {
    color: #7f8c8d;
}



/* Panel Actions */
.panel-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.compare-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compare-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Comparison Modal */
.comparison-modal {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.comparison-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.country-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.country-selector label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.country-select {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.country-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.vs-divider {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
    text-align: center;
    margin: 0 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comparison-content {
    min-height: 400px;
    padding: 1rem;
}

.comparison-instruction {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 2rem;
    font-size: 1.1rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
}

.country-comparison {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.country-comparison.winner {
    border-color: #27ae60;
    background: linear-gradient(135deg, #d5f4e6, #f8f9fa);
    animation: slideInFromTop 0.5s ease-out;
}

.country-comparison h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.country-comparison.winner h3 {
    color: #27ae60;
    border-bottom-color: #27ae60;
}

.comparison-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.vs-icon {
    font-size: 2rem;
    color: #e74c3c;
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comparison-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e9ecef;
}

.comparison-stat:last-child {
    border-bottom: none;
}

.stat-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.stat-value {
    font-weight: bold;
    color: #3498db;
    font-size: 1rem;
}

.stat-advantage {
    color: #27ae60;
    font-weight: bold;
}

/* Theme system removed - keeping only light theme */

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .filter-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-group {
        width: 100%;
        justify-content: space-between;
    }
    

    
    .comparison-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .vs-divider {
        order: 2;
        margin: 1rem 0;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .comparison-divider {
        order: 2;
        flex-direction: row;
    }
    
    .country-selector {
        width: 100%;
    }
}

/* Advanced Animations */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.filter-controls {
    animation: slideInFromTop 0.6s ease-out;
}

.country-comparison.winner {
    animation: slideInFromTop 0.5s ease-out;
}

.compare-btn:active {
    animation: shake 0.5s ease-in-out;
}

/* Tooltip Enhancements */
[title] {
    position: relative;
    cursor: help;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
}



/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 6px;
}

/* Print styles */
@media print {
    .header-controls,
    .theme-toggle,
    .modal-overlay,
    .loading-overlay {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .map-container {
        border: 1px solid #ccc;
    }
}

/* SEO-friendly hidden content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Tabbed Interface */
.panel-tabs {
    display: flex;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #5a6fd8;
}

.tab-btn.active {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.tab-btn i {
    font-size: 1rem;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 1.5rem;
    animation: fadeInUp 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Chart Containers */
.chart-container {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-height: 300px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.chart-container::after {
    content: '🔍';
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.chart-container:hover::after {
    opacity: 1;
}

.chart-container:last-child {
    margin-bottom: 0;
}

.chart-container canvas {
    max-width: 100%;
    height: auto !important;
    max-height: 250px !important;
}

/* Chart Modal */
.chart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chart-modal.active {
    opacity: 1;
    visibility: visible;
}

.chart-modal-content {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    max-width: 95vw;
    max-height: 90vh;
    width: 900px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.chart-modal.active .chart-modal-content {
    transform: scale(1);
}

.chart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
    flex-shrink: 0;
}

.chart-modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.chart-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #95a5a6;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.3rem;
    border-radius: 50%;
    line-height: 1;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-modal-close:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.chart-modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
    padding: 1rem;
    overflow: hidden;
}

.chart-modal-body canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
}

/* Enhanced Info Panel */
.info-panel {
    width: 450px;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    color: #2c3e50;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

/* Chart Animations */
@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-container {
    animation: chartFadeIn 0.4s ease-out;
    will-change: transform, opacity;
    contain: layout;
}

/* Responsive Charts */
@media (max-width: 768px) {
    .info-panel {
        width: 100%;
        max-width: 100%;
        max-height: 60vh;
    }
    
    .tab-btn {
        padding: 0.8rem;
        font-size: 0.8rem;
    }
    
    .tab-btn i {
        font-size: 0.9rem;
    }
    
    .chart-container {
        padding: 0.8rem;
        margin-bottom: 1rem;
        max-height: 200px;
    }
    
    .chart-container canvas {
        max-height: 150px !important;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .panel-content {
        max-height: calc(60vh - 100px);
    }
    
    /* Chart Modal Mobile */
    .chart-modal-content {
        width: 95vw;
        max-height: 95vh;
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .chart-modal-title {
        font-size: 1.1rem;
    }
    
    .chart-modal-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .chart-modal-body {
        padding: 0.5rem;
        min-height: 400px;
    }
    
    .chart-modal-body canvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
    }
}

/* Chart Legends */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #666;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Chart Tooltips */
.chart-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 1000;
}

/* Dark theme support removed - using light theme only */

/* Advanced Animations & Micro-interactions */

/* Smooth zoom animations */
.map-container {
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.map-container:hover {
    transform: scale(1.001);
}

/* Skeleton loading animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

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

/* 3D hover effects for cards */
.stat-card {
    transform-style: preserve-3d;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    backface-visibility: hidden;
}

.stat-card:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
    z-index: 1;
}

.stat-card:hover::before {
    transform: translateX(100%);
}

/* Counter animations removed for better performance */

/* Marker pulse animation */
.marker-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Page transition animations */
.page-transition {
    animation: pageTransition 0.5s ease-in-out;
}

@keyframes pageTransition {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button ripple effect */
.btn {
    position: relative;
    overflow: hidden;
}

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

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Floating elements */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}



/* Particle effect background */
.particle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 10s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Modal entrance animations */
.modal-overlay {
    animation: modalFadeIn 0.3s ease-out;
}

.modal-overlay.active .modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Text typing animation */
.typewriter {
    overflow: hidden;
    border-right: 0.15em solid #667eea;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #667eea;
    }
}

/* Gradient text animation */
.gradient-text {
    background: linear-gradient(45deg, #667eea, #764ba2, #e74c3c, #f39c12);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 4s ease infinite;
}

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

/* Hover reveal animations */
.hover-reveal {
    position: relative;
    overflow: hidden;
}

.hover-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hover-reveal:hover::after {
    left: 100%;
}

/* Staggered animations */
.stagger-animation {
    animation: staggerIn 0.6s ease-out forwards;
}

.stagger-animation:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation:nth-child(5) { animation-delay: 0.5s; }

@keyframes staggerIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Performance optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Micro-interactions for improved UX */
.interactive-element {
    transition: all 0.2s ease;
    cursor: pointer;
}

.interactive-element:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.interactive-element:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Modern UI Components */

/* Glassmorphism Effects */
.glassmorphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glassmorphism-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Gradient Borders */
.gradient-border {
    background: linear-gradient(45deg, #667eea, #764ba2);
    padding: 2px;
    border-radius: 20px;
}

.gradient-border-content {
    background: white;
    border-radius: 18px;
    padding: 1rem;
}

/* Floating Action Button */
.fab-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-main:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.fab-main.active {
    transform: rotate(45deg);
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.fab-menu.active {
    opacity: 1;
    visibility: visible;
}

.fab-item {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    color: #667eea;
    border: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transform: translateY(20px);
}

.fab-menu.active .fab-item {
    transform: translateY(0);
}

.fab-menu.active .fab-item:nth-child(1) { transition-delay: 0.1s; }
.fab-menu.active .fab-item:nth-child(2) { transition-delay: 0.2s; }
.fab-menu.active .fab-item:nth-child(3) { transition-delay: 0.3s; }
.fab-menu.active .fab-item:nth-child(4) { transition-delay: 0.4s; }

.fab-item:hover {
    transform: translateY(0) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #667eea;
    color: white;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-left: 4px solid #667eea;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #27ae60;
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast.warning {
    border-left-color: #f39c12;
}

.toast-icon {
    font-size: 1.5rem;
    color: #667eea;
}

.toast.success .toast-icon {
    color: #27ae60;
}

.toast.error .toast-icon {
    color: #e74c3c;
}

.toast.warning .toast-icon {
    color: #f39c12;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #95a5a6;
    cursor: pointer;
    transition: color 0.3s ease;
}

.toast-close:hover {
    color: #e74c3c;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-bar.active {
    opacity: 1;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
    width: 0%;
}

/* Modern Switches */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 34px;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.4s;
}

input:checked + .slider {
    background: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.context-menu.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.context-menu-item:hover {
    background: #f8f9fa;
}

.context-menu-item i {
    font-size: 1rem;
    color: #667eea;
}

/* Neumorphism Effects */
.neumorphism {
    background: #e0e5ec;
    border-radius: 20px;
    box-shadow: 20px 20px 60px #bebebe, -20px -20px 60px #ffffff;
}

.neumorphism-inset {
    background: #e0e5ec;
    border-radius: 20px;
    box-shadow: inset 20px 20px 60px #bebebe, inset -20px -20px 60px #ffffff;
}

/* Responsive Design for Modern Components */
@media (max-width: 768px) {
    .fab-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    .fab-main {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .fab-item {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
    
    .context-menu {
        max-width: 250px;
    }
}

/* Theme system removed - using light theme only */

/* Performance Optimizations */
* {
    will-change: auto;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimizeQuality;
}

/* Lazy loading support */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Optimize map tiles */
.leaflet-tile {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimizeQuality;
    transform: translateZ(0);
}

/* Critical resource hints */

/* Reduce motion for better performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* GPU acceleration for critical elements */
.map-container,
.modal-content,
.fab-container,
.toast {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Optimize scrolling performance */
.modal-body,
.info-panel,
.rankings-list {
    -webkit-overflow-scrolling: touch;
}

/* Contain layout shifts */
.chart-container {
    contain: layout style paint;
}

/* Optimize paint containment */
.stat-card,
.ranking-item,
.legend-item {
    contain: layout paint;
}

/* Critical CSS inlining optimization */
.above-fold {
    contain: strict;
}

/* Optimize font loading */
@font-face {
    font-family: 'System';
    src: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-display: swap;
}

/* Content visibility optimization */
.info-panel {
    content-visibility: auto;
    contain-intrinsic-size: 400px;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    padding: 0.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '>';
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #667eea;
}

.breadcrumb-item.active span {
    color: #667eea;
    font-weight: 500;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section h4 {
    color: #94a3b8;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.footer-section p {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #667eea;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #667eea;
    transform: translateY(-2px);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #667eea;
}

.last-updated {
    font-size: 0.8rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Responsive breadcrumb and footer */
@media (max-width: 768px) {
    .breadcrumb-nav {
        padding: 0.5rem 1rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    .footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
}

/* Accessibility Improvements */

/* Enhanced focus management */
*:focus {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
}

/* High contrast focus for interactive elements */
button:focus,
select:focus,
input:focus,
a:focus {
    outline: 3px solid #667eea !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2) !important;
}

/* Screen reader only content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focusable screen reader content */
.sr-only:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background: #667eea !important;
    color: white !important;
    border-radius: 4px !important;
}

/* Color contrast improvements */
.btn-primary {
    background: #4c51bf !important; /* Higher contrast */
    border-color: #4c51bf !important;
}

.btn-primary:hover {
    background: #3730a3 !important;
    border-color: #3730a3 !important;
}

.btn-secondary {
    background: #4a5568 !important;
    border-color: #4a5568 !important;
}

.btn-secondary:hover {
    background: #2d3748 !important;
    border-color: #2d3748 !important;
}

/* Enhanced tab navigation */
.tab-btn:focus {
    background: rgba(102, 126, 234, 0.1) !important;
    border-color: #667eea !important;
}

.tab-btn[aria-selected="true"] {
    background: #667eea !important;
    color: white !important;
}

/* Modal accessibility */
.modal-overlay[aria-hidden="true"] {
    display: none !important;
}

.modal-overlay[aria-hidden="false"] {
    display: flex !important;
}

/* Skip link enhancement */
.skip-to-content:focus {
    z-index: 10000 !important;
    background: #667eea !important;
    color: white !important;
    padding: 1rem !important;
    border-radius: 0 0 4px 4px !important;
}

/* Keyboard navigation for fab menu */
.fab-main[aria-expanded="true"] + .fab-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.fab-item:focus {
    transform: scale(1.1) !important;
    z-index: 1000 !important;
}

/* Chart accessibility */
canvas[role="img"] {
    border: 1px solid transparent;
}

canvas[role="img"]:focus {
    border-color: #667eea !important;
}

/* Live region updates */
[aria-live="polite"] {
    position: relative;
}

[aria-live="polite"]:empty::before {
    content: "No information available";
    color: #718096;
    font-style: italic;
}

/* Filter controls accessibility */
.filter-controls select:focus,
.filter-controls input:focus {
    background: rgba(102, 126, 234, 0.05) !important;
}

/* Improved button states */
button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

button:disabled:focus {
    outline: 2px solid #cbd5e0 !important;
}

/* Toast accessibility */
.toast[role="alert"] {
    border-left: 4px solid #667eea;
}

.toast.success[role="alert"] {
    border-left-color: #48bb78;
}

.toast.error[role="alert"] {
    border-left-color: #e53e3e;
}

.toast.warning[role="alert"] {
    border-left-color: #ed8936;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background: black !important;
        color: white !important;
    }
    
    .btn {
        border: 2px solid white !important;
        background: black !important;
        color: white !important;
    }
    
    .btn:hover {
        background: white !important;
        color: black !important;
    }
    
    .modal-content {
        background: black !important;
        border: 2px solid white !important;
    }
    
    .header {
        background: black !important;
        border-bottom: 2px solid white !important;
    }
}

/* Print styles update */
@media print {
    .breadcrumb-nav {
        background: white !important;
        border-bottom: 1px solid #ccc;
    }
    
    .breadcrumb-item a,
    .breadcrumb-item.active span {
        color: black !important;
    }
    
    .footer {
        display: none !important;
    }
    
    /* Hide interactive elements in print */
    .fab-container,
    .toast-container,
    .modal-overlay {
        display: none !important;
    }
} 