/**
 * Qtum Explorer - Futuristic Cyber Theme
 *
 * Design System:
 * - Base: Pure black with dark grey accents
 * - Primary: Cyan (#00FFFF)
 * - Accents: Electric blue, neon cyan
 * - Font: Orbitron (futuristic)
 */

/* Import futuristic font */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cyber Theme Colors */
    --primary-cyan: #00FFFF;
    --light-cyan: #00E5FF;
    --dark-cyan: #00B8D4;
    --electric-blue: #0091EA;
    --glassmorphic-cyan: rgba(0, 255, 255, 0.15);

    /* Dark Theme Base */
    --bg-primary: #000000;
    --bg-elevated-1dp: #0A0A0A;
    --bg-elevated-2dp: #121212;
    --bg-card: #1A1A1A;
    --bg-input: #1C1C1C;

    /* Text Hierarchy */
    --text-high: rgba(255, 255, 255, 0.87);
    --text-medium: rgba(255, 255, 255, 0.6);
    --text-low: rgba(255, 255, 255, 0.38);
    --text-disabled: rgba(255, 255, 255, 0.24);

    /* Status Colors */
    --success: #00C853;
    --error: #D32F2F;
    --warning: #FF9800;
    --info: #6C94D1;

    /* Typography */
    --font-mono: "Roboto Mono", "SF Mono", Monaco, Consolas, "Courier New", monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 255, 255, 0.15);
    --shadow-cyan-glow: 0 0 20px rgba(0, 255, 255, 0.3);
}

html {
    font-size: 16px;
}

body {
    font-family: 'Orbitron', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    color: var(--text-high);
    background-color: var(--bg-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Monospace for addresses and hashes */
.hash,
.address {
    font-family: "Roboto Mono", "SF Mono", Monaco, Consolas, "Courier New", monospace;
    font-size: 0.9em;
}

/* ============================================
   GLASS EFFECTS
   ============================================ */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
}

.glass-qtum {
    background: hsla(185, 70%, 50%, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid hsla(185, 70%, 50%, 0.25);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   LAYOUT
   ============================================ */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
    flex: 1;
}

.section {
    margin: var(--spacing-xl) 0;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) 0;
    margin-bottom: var(--spacing-lg);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-high);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-cyan);
}

.logo-subtitle {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.nav {
    display: flex;
    gap: var(--spacing-sm);
}

.nav-link {
    padding: var(--spacing-xs) var(--spacing-md);
    color: var(--text-medium);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-cyan);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--primary-cyan);
    background: var(--glassmorphic-cyan);
}

.nav-link:focus-visible {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Dropdown menu styles */
.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    padding: var(--spacing-xs) var(--spacing-md);
    color: var(--text-medium);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-trigger:hover {
    color: var(--primary-cyan);
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xs) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-medium);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-cyan);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: var(--spacing-xs) 0;
}

.search-wrapper {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: var(--spacing-xs) var(--spacing-md);
    padding-right: 2.5rem;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-high);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.2);
}

.search-input::placeholder {
    color: var(--text-low);
}

.search-icon {
    position: absolute;
    right: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-medium);
    pointer-events: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: auto;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
    color: var(--primary-cyan);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
}

.footer-text {
    color: var(--text-medium);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

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

.footer-list li {
    margin-bottom: var(--spacing-xs);
}

.footer-list a {
    color: var(--text-medium);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-list a:hover {
    color: var(--primary-cyan);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    color: var(--text-medium);
    text-decoration: none;
    font-size: 0.875rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--primary-cyan);
    border-color: var(--primary-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-medium);
    font-size: 0.875rem;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.footer-bottom p {
    margin: 0;
}

/* ============================================
   LIVE INDICATOR
   ============================================ */
.live-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 200, 83, 0.1);
    border: 1px solid var(--success);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--success);
    letter-spacing: 0.1em;
    animation: pulse 2s ease-in-out infinite;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

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

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
    margin: var(--spacing-xl) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

/* Extended stats grid for 14+ network statistics */
.stats-grid-extended {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
}

.stat-card {
    padding: var(--spacing-lg);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 255, 255, 0.25);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-xs);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-cyan);
}

/* ============================================
   TWO-COLUMN LAYOUT (Blocks & Transactions)
   ============================================ */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: var(--spacing-xl) 0;
}

.content-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

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

.view-all-link {
    color: var(--primary-cyan);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: var(--light-cyan);
}

.blocks-list,
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* ============================================
   BLOCK CARDS
   ============================================ */
.block-card {
    padding: var(--spacing-md);
    transition: all 0.3s ease;
}

.block-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.block-number-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.block-icon {
    font-size: 1.25rem;
    opacity: 0.7;
}

.block-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

.block-number:hover {
    color: var(--light-cyan);
}

.time-ago {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.block-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.block-details .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.block-details .detail-label {
    color: var(--text-medium);
    font-size: 0.875rem;
}

.block-details .detail-value {
    color: var(--text-high);
    font-weight: 600;
}

.qtum-amount {
    color: var(--primary-cyan);
    font-weight: 700;
}

/* ============================================
   TRANSACTION CARDS
   ============================================ */
.tx-card {
    padding: var(--spacing-md);
    transition: all 0.3s ease;
}

.tx-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.tx-hash-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.tx-icon {
    font-size: 1.125rem;
    opacity: 0.7;
}

.tx-hash {
    font-family: var(--font-mono, monospace);
    font-size: 0.9rem;
    color: var(--text-high);
    text-decoration: none;
    transition: color 0.3s ease;
}

.tx-hash:hover {
    color: var(--primary-cyan);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.success {
    background: var(--success);
    color: white;
}

.status-badge.failed {
    background: var(--error);
    color: white;
}

.status-badge.pending {
    background: var(--warning);
    color: white;
}

.tx-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.tx-flow {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.tx-address {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tx-address .label {
    font-size: 0.75rem;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tx-address .address {
    font-family: var(--font-mono, monospace);
    font-size: 0.875rem;
    color: var(--text-high);
}

.arrow {
    font-size: 1.25rem;
    color: var(--primary-cyan);
}

.tx-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.amount-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-cyan);
}

/* ============================================
   GENERIC CARDS (Legacy)
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-md);
}

.card {
    padding: var(--spacing-md);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.card-link {
    text-decoration: none;
    color: var(--text-high);
    display: flex;
    align-items: baseline;
    gap: var(--spacing-xs);
}

.card-link:hover {
    color: var(--primary-cyan);
}

.card-link:focus-visible {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.card-title {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-cyan);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
}

.label {
    color: var(--text-medium);
    font-size: 0.875rem;
}

.value {
    color: var(--text-high);
    font-weight: 600;
}

/* ============================================
   DETAIL PAGES
   ============================================ */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-cyan);
}

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

.detail-card {
    padding: var(--spacing-lg);
}

.detail-row {
    display: flex;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    flex: 0 0 200px;
    color: var(--text-medium);
    font-weight: 600;
}

.detail-value {
    flex: 1;
    color: var(--text-high);
    word-break: break-all;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-error {
    background: var(--error);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: var(--spacing-xs) var(--spacing-md);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-cyan);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--light-cyan);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-high);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:focus-visible {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 2px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.pagination-info {
    color: var(--text-medium);
}

/* ============================================
   LOADING & ERRORS
   ============================================ */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    gap: var(--spacing-md);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    color: var(--text-medium);
}

.error-container {
    padding: var(--spacing-lg);
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.error-title {
    color: var(--error);
    margin-bottom: var(--spacing-sm);
}

.error-message {
    color: var(--text-medium);
}

.info-message {
    padding: var(--spacing-lg);
    text-align: center;
    margin-top: var(--spacing-lg);
}

.info-message p {
    margin-bottom: var(--spacing-sm);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-muted {
    color: var(--text-medium);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-high);
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-high);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-cyan);
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 2px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1199px) {
    /* Tablet: stack two-column grid */
    .content-grid {
        grid-template-columns: 1fr;
    }

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

    .stats-grid-extended {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 768px) {
    .header-content {
        position: relative;
        flex-wrap: nowrap;
    }

    /* Show hamburger menu button on mobile */
    .mobile-menu-toggle {
        display: block;
        order: 2;
    }

    /* Logo stays on left */
    .logo {
        order: 1;
    }

    /* Search bar moves to bottom, full width */
    .search-wrapper {
        order: 4;
        max-width: 100%;
        width: 100%;
        margin-top: var(--spacing-md);
    }

    /* Hide navigation by default on mobile */
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
        margin-top: var(--spacing-sm);
        padding: var(--spacing-md);
        flex-direction: column;
        gap: 0;
        z-index: 100;
        box-shadow: var(--shadow-md);
        order: 3;
    }

    /* Show navigation when mobile menu is open */
    .nav.mobile-nav-open {
        display: flex;
    }

    /* Style nav links for mobile */
    .nav .nav-link {
        display: block;
        width: 100%;
        padding: var(--spacing-md);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: left;
    }

    .nav .nav-link:last-child {
        border-bottom: none;
    }

    /* Tokens dropdown adjustments for mobile */
    .nav .nav-dropdown {
        width: 100%;
    }

    .nav .dropdown-trigger {
        width: 100%;
        text-align: left;
        justify-content: space-between;
        display: flex;
        align-items: center;
    }

    .nav .dropdown-menu {
        position: static;
        width: 100%;
        margin-top: var(--spacing-xs);
        border: none;
        border-left: 2px solid var(--primary-cyan);
        padding-left: var(--spacing-md);
        background: transparent;
    }

    .nav .dropdown-menu.show {
        transform: none;
    }

    .nav .dropdown-item {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .detail-row {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .detail-label {
        flex: none;
    }
}


/* Spinning animation for search loader */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Pagination button disabled state */
.pagination-button.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: rgba(0, 255, 255, 0.1) !important;
}

/* Preloader styles */
.preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #121212;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in;
}

.preloader-overlay.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.preloader-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(0, 255, 255, 0.1);
    border-top-color: #00FFFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.preloader-text {
    text-align: center;
    color: #FAFAFA;
}

.preloader-text h2 {
    color: #00FFFF;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.preloader-text p {
    color: #CCCCCC;
    font-size: 1rem;
    margin: 0;
}

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

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

/* ========================================
   CHARTS SECTION
   ======================================== */

.charts-section {
    margin: 40px 0;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.chart-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.chart-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

.chart-container {
    width: 100%;
}

.chart-container h3 {
    color: #00FFFF;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
}

/* Responsive charts */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-wrapper {
        height: 250px;
    }

    .chart-container h3 {
        font-size: 1.1rem;
    }
}
