/* Modern Tech-Inspired Styling */

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

:root {
    --primary-color: #0a1128;
    --secondary-color: #1e2749;
    --accent-blue: #2563eb;
    --accent-cyan: #06b6d4;
    --accent-wind: #3b82f6;
    --accent-solar: #f59e0b;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --bg-hover: #0f172a;
}

body {
    font-family: 'Segoe UI', Trebuchet MS, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-light);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 20px;
    background: rgba(30, 39, 73, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Tab Navigation */
/* Left Sidebar Tabs Layout */
.tab-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    margin-bottom: 30px;
    min-height: 600px;
}

.tabs-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 16px;
    background: linear-gradient(180deg, rgba(30, 39, 73, 0.9), rgba(10, 17, 40, 0.9));
    border-right: 2px solid var(--border-color);
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    border-radius: 12px 0 0 12px;
}

.tab-button {
    padding: 16px 20px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.tab-button:hover {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    transform: translateX(4px);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.tab-contents {
    padding: 30px;
    overflow: auto;
}

/* Main Summary */
.main-summary {
    margin-bottom: 40px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.summary-card {
    background: linear-gradient(135deg, rgba(30, 39, 73, 0.8), rgba(30, 39, 73, 0.4));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.summary-card:hover {
    background: linear-gradient(135deg, rgba(30, 39, 73, 1), rgba(30, 39, 73, 0.6));
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.1);
}

.summary-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.summary-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
    min-height: 400px;
    padding: 30px 0;
}

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

.tab-content h2 {
    color: var(--accent-cyan);
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(6, 182, 212, 0.2);
}

#sim-stats h2,
#sim-raw h2 {
    color: #ec4899;
    text-shadow: 0 2px 10px rgba(236, 72, 153, 0.2);
}

#nasa-stats h2,
#nasa-raw h2 {
    color: #8b5cf6;
    text-shadow: 0 2px 10px rgba(139, 92, 246, 0.2);
}

#openmeteo-stats h2,
#openmeteo-raw h2 {
    color: #fb923c;
    text-shadow: 0 2px 10px rgba(251, 146, 60, 0.2);
}

#weatherbit-stats h2,
#weatherbit-raw h2 {
    color: #14b8a6;
    text-shadow: 0 2px 10px rgba(20, 184, 166, 0.2);
}

/* Stats Metrics Section */
.stats-metrics {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

/* Individual Metric Row */
.metric-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(30, 39, 73, 0.8), rgba(30, 39, 73, 0.5));
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--accent-cyan);
    border-radius: 10px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.metric-item:hover {
    background: linear-gradient(135deg, rgba(30, 39, 73, 0.95), rgba(30, 39, 73, 0.7));
    border-left-color: var(--accent-solar);
    box-shadow: 0 8px 16px rgba(6, 182, 212, 0.15);
    transform: translateX(4px);
}

/* Metric type specific colors */
.metric-item:nth-child(1) {
    border-left-color: #ec4899;
}

.metric-item:nth-child(1):hover {
    border-left-color: #f472b6;
}

.metric-item:nth-child(2) {
    border-left-color: #8b5cf6;
}

.metric-item:nth-child(2):hover {
    border-left-color: #a78bfa;
}

.metric-item:nth-child(3) {
    border-left-color: #fb923c;
}

.metric-item:nth-child(3):hover {
    border-left-color: #fdba74;
}

.metric-item:nth-child(4) {
    border-left-color: #10b981;
}

.metric-item:nth-child(4):hover {
    border-left-color: #6ee7b7;
}

.metric-item:nth-child(5) {
    border-left-color: #06b6d4;
}

.metric-item:nth-child(5):hover {
    border-left-color: #22d3ee;
}

.metric-item:nth-child(6) {
    border-left-color: #f59e0b;
}

.metric-item:nth-child(6):hover {
    border-left-color: #fbbf24;
}

.metric-label {
    color: var(--text-light);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 8px 0;
}

.metric-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.metric-value {
    text-align: center;
    padding: 16px 12px;
    background: rgba(6, 182, 212, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(6, 182, 212, 0.2);
    transition: all 0.3s ease;
}

.metric-value:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

.metric-value-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    font-weight: 700;
}

.metric-value-number {
    color: var(--accent-cyan);
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Courier New', 'Monaco', monospace;
    letter-spacing: 0.5px;
}

/* Responsive design for smaller screens */
@media (max-width: 1024px) {
    .metric-item {
        grid-template-columns: 180px 1fr;
        gap: 18px;
        padding: 20px 24px;
    }

    .metric-values {
        gap: 12px;
    }

    .metric-value-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .metric-item {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 20px;
    }

    .metric-label {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .metric-values {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .metric-value {
        padding: 12px 8px;
    }

    .metric-value-number {
        font-size: 1.3rem;
    }
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Stat Card */
.stat-card {
    background: linear-gradient(135deg, rgba(30, 39, 73, 0.8), rgba(30, 39, 73, 0.4));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: default;
}

.stat-card:hover {
    background: linear-gradient(135deg, rgba(30, 39, 73, 1), rgba(30, 39, 73, 0.6));
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.1);
}

.stat-card.wind-card {
    border-top: 3px solid var(--accent-wind);
}

.stat-card.solar-card {
    border-top: 3px solid var(--accent-solar);
}

.stat-card.temp-card {
    border-top: 3px solid #ec4899;
}

.stat-card.humid-card {
    border-top: 3px solid #8b5cf6;
}

.stat-card.irrad-card {
    border-top: 3px solid #fb923c;
}

.stat-card.speed-card {
    border-top: 3px solid #10b981;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-light);
}

.stat-unit {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Raw Text Output */
#raw-content {
    background: rgba(10, 17, 40, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--accent-cyan);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Raw Data IFrame */
.raw-iframe {
    width: 100%;
    height: 600px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
}

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

::-webkit-scrollbar-track {
    background: rgba(30, 39, 73, 0.5);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* Responsive Design */
/* Mobile: Horizontal scrollable tabs */
@media (max-width: 1024px) {
    .tab-layout {
        grid-template-columns: 1fr;
    }

    .tabs-nav {
        flex-direction: row !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 16px;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        max-height: none;
        position: static;
        border-radius: 12px 12px 0 0;
    }

    .tab-button {
        flex-shrink: 0;
        padding: 12px 18px !important;
        font-size: 0.9rem;
        white-space: nowrap;
        min-width: 110px;
    }

    .tabs-nav::-webkit-scrollbar {
        height: 4px;
    }

    .tab-contents {
        padding: 20px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

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

    .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px 10px;
    }

    .header h1 {
        font-size: 1.4rem;
    }

    .tab-button {
        padding: 10px 14px !important;
        font-size: 0.85rem;
        min-width: 90px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px 10px;
    }

    .header h1 {
        font-size: 1.4rem;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 1.3rem;
    }
}

/* ML Illustration Board */
.board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 40px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: linear-gradient(135deg, rgba(30, 39, 73, 0.9), rgba(30, 39, 73, 0.6));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

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

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.2);
    border-color: var(--accent-cyan);
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: var(--accent-cyan);
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.card p {
    margin: 16px 0;
    font-size: 1.1rem;
    color: var(--text-light);
}

.card span {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--accent-cyan);
    font-family: 'Courier New', monospace;
}

/* Wind Card Specific */
.wind-card h3 {
    color: var(--accent-wind);
}

.wind-card:hover {
    border-color: var(--accent-wind);
}

/* Solar Card Specific */
.solar-card h3 {
    color: var(--accent-solar);
}

.solar-card:hover {
    border-color: var(--accent-solar);
}

/* Mobile Responsive for Board */
@media (max-width: 768px) {
    .board {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }

    .card {
        padding: 24px 20px;
    }

    .card h3 {
        font-size: 1.5rem;
    }

    .card span {
        font-size: 1.2rem;
    }
}

/* 7-Day Prediction Chart */
.chart-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 32px;
    background: linear-gradient(135deg, rgba(30, 39, 73, 0.8), rgba(30, 39, 73, 0.5));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.chart-title {
    text-align: center;
    font-size: 1.9rem;
    margin-bottom: 32px;
    color: var(--accent-cyan);
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(6, 182, 212, 0.3);
}

#predictionChart {
    max-height: 500px;
    width: 100%;
}

@media (max-width: 768px) {
    .chart-container {
        margin: 40px 20px;
        padding: 24px;
    }
    
    .chart-title {
        font-size: 1.6rem;
        margin-bottom: 24px;
    }
    
    #predictionChart {
        max-height: 400px;
    }
}


