/* Balloon Telemetry Dashboard Styles */

:root {
    --bg-dark: #0f1419;
    --bg-card: #1a1f26;
    --bg-card-hover: #242b35;
    --text-primary: #e7e9ea;
    --text-secondary: #8b98a5;
    --accent-blue: #1d9bf0;
    --accent-cold: #4fc3f7;
    --accent-hot: #ff6b6b;
    --border-color: #2f3640;
    --success: #00c853;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, background 0.2s;
}

.stat-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.highlight-cold .stat-value {
    color: var(--accent-cold);
}

.highlight-hot .stat-value {
    color: var(--accent-hot);
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.chart-container h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.chart-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

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

/* Global Heatmap */
.map-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.map-section h2 {
    margin-bottom: 0.5rem;
}

.heatmap-container {
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
}

/* Leaflet container styling */
.leaflet-container {
    background: #1a1f26;
    font-family: inherit;
}

/* Design Parameters Table */
.design-params {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.design-params h2 {
    margin-bottom: 0.5rem;
}

.section-intro {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-card-hover);
}

/* Download Section */
.download-section {
    background: linear-gradient(135deg, #1a2a3a 0%, #1a1f26 100%);
    border: 1px solid var(--accent-blue);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.download-section h2 {
    margin-bottom: 1rem;
}

.download-info {
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem auto;
    max-width: 500px;
}

.download-info code {
    display: block;
    font-family: 'Monaco', 'Menlo', monospace;
    color: var(--success);
    margin-bottom: 0.5rem;
}

.download-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.download-btn {
    display: inline-block;
    background: var(--accent-blue);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.2s, transform 0.2s;
}

.download-btn:hover {
    background: #1a8cd8;
    transform: translateY(-2px);
    text-decoration: none;
}

/* About Section */
.about-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.about-section h2 {
    margin-bottom: 1.5rem;
}

.about-section h3 {
    color: var(--accent-blue);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
}

.about-section h3:first-of-type {
    margin-top: 0;
}

.about-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.about-section strong {
    color: var(--text-primary);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .chart-container canvas {
        height: 250px !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
}

/* Loading state */
.loading {
    opacity: 0.5;
}

.error {
    color: var(--accent-hot);
    text-align: center;
    padding: 2rem;
}
