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

        body {
            font-family: 'Vazirmatn', 'Iranian Sans', 'Tahoma', 'Inter', 'Segoe UI', sans-serif;
            background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
            min-height: 100vh;
            color: #e4e4e7;
            overflow-x: hidden;
            direction: rtl;
        }

        .header {
            background: rgba(15, 15, 35, 0.95);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding: 30px 20px;
            text-align: center;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header h1 {
            font-size: 2.8rem;
            margin-bottom: 8px;
            background: linear-gradient(135deg, #60a5fa, #34d399);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 700;
            letter-spacing: -0.5px;
        }

        .header p {
            font-size: 1.1rem;
            color: #a1a1aa;
            font-weight: 400;
        }

        .controls {
            background: rgba(26, 26, 46, 0.8);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 25px;
            margin: 30px auto;
            max-width: 600px;
            text-align: center;
        }

        .controls h3 {
            color: #f4f4f5;
            margin-bottom: 20px;
            font-size: 1.2rem;
            font-weight: 600;
        }

        .time-period-buttons {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .period-btn {
            background: rgba(55, 65, 81, 0.8);
            border: 1px solid rgba(75, 85, 99, 0.6);
            color: #d1d5db;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.95rem;
            font-weight: 500;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .period-btn:hover {
            background: rgba(75, 85, 99, 0.9);
            border-color: rgba(156, 163, 175, 0.8);
            transform: translateY(-1px);
        }

        .period-btn.active {
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            border-color: #3b82f6;
            color: white;
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
        }

        .period-btn.active::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { left: -100%; }
            100% { left: 100%; }
        }

        .stats-container {
            padding: 0 20px 40px;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
            gap: 25px;
            max-width: 1400px;
            margin: 0 auto;
        }

        .stat-card {
            background: rgba(26, 26, 46, 0.8);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 32px;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            cursor: pointer;
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
        }

        .stat-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
            border-color: rgba(255, 255, 255, 0.2);
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
        }

        .modal-content {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            margin: 2% auto;
            padding: 0;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            width: 90%;
            max-width: 1200px;
            height: 90vh;
            overflow-y: auto;
            position: relative;
        }

        .modal-header {
            background: rgba(15, 15, 35, 0.9);
            padding: 25px 30px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px 20px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h2 {
            color: #f4f4f5;
            font-size: 1.8rem;
            font-weight: 600;
            margin: 0;
        }

        .close {
            color: #9ca3af;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            transition: color 0.3s ease;
        }

        .close:hover {
            color: #ef4444;
        }

        .modal-body {
            padding: 30px;
        }

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

        .modal-stat-item {
            background: rgba(55, 65, 81, 0.8);
            padding: 20px;
            border-radius: 12px;
            border: 1px solid rgba(75, 85, 99, 0.6);
            text-align: center;
        }

        .modal-stat-label {
            display: block;
            color: #9ca3af;
            font-size: 0.9rem;
            margin-bottom: 8px;
        }

        .modal-stat-value {
            display: block;
            color: #60a5fa;
            font-size: 2rem;
            font-weight: 700;
            font-family: 'Vazirmatn', 'Iranian Sans', 'Tahoma', monospace;
        }

        .chart-container {
            background: rgba(55, 65, 81, 0.8);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 30px;
            border: 1px solid rgba(75, 85, 99, 0.6);
        }

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

        .modal-description {
            background: rgba(26, 26, 46, 0.8);
            border-radius: 12px;
            padding: 25px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .modal-description h3 {
            color: #f4f4f5;
            font-size: 1.4rem;
            margin-bottom: 15px;
            border-bottom: 2px solid rgba(60, 130, 246, 0.5);
            padding-bottom: 10px;
        }

        .modal-description h4 {
            color: #f4f4f5;
            font-size: 1.2rem;
            margin: 20px 0 10px 0;
        }

        .modal-description p {
            color: #d1d5db;
            line-height: 1.8;
            margin-bottom: 20px;
        }

        .modal-sources ul {
            list-style: none;
            padding: 0;
        }

        .modal-sources li {
            color: #9ca3af;
            padding: 8px 0;
            padding-right: 20px;
            border-bottom: 1px solid rgba(75, 85, 99, 0.3);
            position: relative;
        }

        .modal-sources li:before {
            content: "📄";
            position: absolute;
            right: 0;
            top: 8px;
        }

        @media (max-width: 768px) {
            .modal-content {
                width: 95%;
                height: 95vh;
                margin: 2.5% auto;
            }
            
            .modal-stats {
                grid-template-columns: 1fr;
            }
            
            .modal-header {
                padding: 20px;
            }
            
            .modal-body {
                padding: 20px;
            }
        }

        .stat-card.danger {
            --accent-color: #ef4444;
            --accent-light: #f87171;
        }

        .stat-card.warning {
            --accent-color: #f59e0b;
            --accent-light: #fbbf24;
        }

        .stat-card.info {
            --accent-color: #3b82f6;
            --accent-light: #60a5fa;
        }

        .stat-card.success {
            --accent-color: #10b981;
            --accent-light: #34d399;
        }

        .stat-header {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
        }

        .stat-icon {
            font-size: 2.2rem;
            margin-right: 15px;
            padding: 12px;
            background: rgba(var(--accent-rgb), 0.1);
            border-radius: 12px;
            border: 1px solid rgba(var(--accent-rgb), 0.2);
        }

        .stat-card.danger {
            --accent-rgb: 239, 68, 68;
        }

        .stat-card.warning {
            --accent-rgb: 245, 158, 11;
        }

        .stat-card.info {
            --accent-rgb: 59, 130, 246;
        }

        .stat-card.success {
            --accent-rgb: 16, 185, 129;
        }

        .stat-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: #f4f4f5;
            line-height: 1.3;
        }

        .stat-number {
            font-size: 3.2rem;
            font-weight: 800;
            color: var(--accent-color);
            margin-bottom: 12px;
            font-family: 'Vazirmatn', 'Iranian Sans', 'Tahoma', monospace;
            transition: all 0.4s ease;
            letter-spacing: -1px;
            direction: ltr;
            text-align: center;
        }

        .stat-period {
            font-size: 0.9rem;
            color: #9ca3af;
            margin-bottom: 18px;
            font-weight: 500;
        }

        .stat-details {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 18px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .stat-rate {
            font-size: 0.85rem;
            color: #6b7280;
            background: rgba(55, 65, 81, 0.6);
            padding: 8px 12px;
            border-radius: 20px;
            border: 1px solid rgba(75, 85, 99, 0.4);
        }

        .stat-trend {
            font-size: 0.85rem;
            color: var(--accent-color);
            font-weight: 600;
        }

        .update-info {
            text-align: center;
            margin-top: 50px;
            padding: 25px;
            background: rgba(15, 15, 35, 0.6);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .update-info p {
            color: #a1a1aa;
            margin-bottom: 8px;
        }

        .update-info small {
            color: #6b7280;
            font-size: 0.8rem;
        }

        .pulse-dot {
            display: inline-block;
            width: 8px;
            height: 8px;
            background: #10b981;
            border-radius: 50%;
            margin-right: 8px;
            animation: pulse 2s infinite;
        }

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

        .counter-animation {
            animation: counterUpdate 0.6s ease-out;
        }

        @keyframes counterUpdate {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); filter: brightness(1.3); }
            100% { transform: scale(1); }
        }

        @media (max-width: 768px) {
            .header h1 {
                font-size: 2.2rem;
            }
            
            .stats-grid {
                grid-template-columns: 1fr;
            }
            
            .stat-number {
                font-size: 2.6rem;
            }
            
            .controls {
                margin: 20px;
                padding: 20px;
            }
            
            .period-btn {
                padding: 10px 18px;
                font-size: 0.9rem;
            }
        }

        @media (max-width: 480px) {
            .time-period-buttons {
                flex-direction: column;
            }
            
            .period-btn {
                width: 100%;
            }
        }