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

:root {
    /* Theme Colors */
    --bg-primary: #0f0f23;
    --text-primary: #ffffff;
    --accent-color: #00ffcc;
    --revenue-color: #ff4d4d;
    --banner-gradient-start: #ff7e5f;
    --banner-gradient-end: #feb47b;
    --chart-bg: #ffffff;
    --card-bg: #1a1a2e;
    --card-border: #16213e;
    --card-hover: #0e3460;
    
    /* Typography */
    --font-heading: 'Orbitron', monospace;
    --font-body: 'Poppins', sans-serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 4rem 0;
    --card-padding: 2rem;
    --border-radius: 12px;
    
    /* Shadows */
    --shadow-light: 0 4px 6px rgba(0, 255, 204, 0.1);
    --shadow-medium: 0 8px 25px rgba(0, 255, 204, 0.15);
    --shadow-heavy: 0 15px 35px rgba(0, 255, 204, 0.2);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 35, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 255, 204, 0.3);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Header */
.header {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--accent-color);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.logo h1 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Banner Section */
.banner {
    background: linear-gradient(135deg, var(--banner-gradient-start), var(--banner-gradient-end));
    padding: 8rem 0 6rem;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 35, 0.7);
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.banner-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 30px rgba(255, 255, 255, 0.5); }
    to { text-shadow: 0 0 40px rgba(0, 255, 204, 0.8), 0 0 60px rgba(0, 255, 204, 0.6); }
}

.banner-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(0, 255, 204, 0.3);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
    background: linear-gradient(135deg, #00cc66, #00ff88);
}

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

/* Error Container */
.error-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid var(--revenue-color);
    border-radius: var(--border-radius);
    text-align: center;
}

/* Section Titles */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
}

/* Analytics Section */
.analytics-section {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.analytics-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
    background: var(--card-hover);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}

.card-value.large {
    font-size: 2.2rem;
}

/* Revenue Section */
.revenue-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.1), rgba(255, 77, 77, 0.05));
}

.revenue-block {
    background: var(--revenue-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}

.revenue-block::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.revenue-block h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.revenue-amount {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.revenue-details {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.revenue-disclaimer {
    font-size: 0.9rem;
    opacity: 0.8;
    position: relative;
    z-index: 2;
}

/* Charts Section */
.charts-section {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.chart-card {
    background: var(--chart-bg);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.chart-card h3 {
    font-family: var(--font-heading);
    color: var(--bg-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.2rem;
}

.chart-card canvas {
    max-height: 300px;
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
    padding: 2rem 0;
    text-align: center;
}

.footer-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .banner-title {
        font-size: 2.5rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card {
        min-width: unset;
    }
    
    .revenue-amount {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .banner {
        padding: 6rem 0 4rem;
    }
    
    .banner-title {
        font-size: 2rem;
    }
    
    .analytics-card,
    .chart-card {
        padding: 1.5rem;
    }
    
    .revenue-block {
        padding: 2rem;
    }
    
    .revenue-amount {
        font-size: 2rem;
    }
}

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

/* Focus styles for accessibility */
button:focus,
input:focus,
a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --text-primary: #ffffff;
        --accent-color: #00ffff;
        --card-bg: #111111;
        --card-border: #333333;
    }
}
