/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #333;
}

/* Layout */
.container {
    display: flex;
    height: 100vh;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    text-align: left;  /* Changed from center */
}

.logo-image {
    height: 60px;  /* Adjust based on your title+subtitle height */
    width: auto;
    cursor: pointer;
    transition: opacity 0.3s ease;
    flex-shrink: 0;  /* Prevents logo from shrinking */
}

.logo-image:hover {
    opacity: 0.8;
}

.logo-text {
    flex: 1;  /* Takes remaining space */
}

.logo h1 {
    color: #39c0ba;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Navigation */
.nav-section {
    margin-bottom: 25px;
}

.nav-section h3 {
    color: #374151;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    display: block;
    padding: 12px 15px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(57, 192, 186, 0.1);  /* ← Light teal background */
    color: #39c0ba;  /* ← Teal text */
    border-color: rgba(57, 192, 186, 0.2);
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, #39c0ba, #5dd3cd);  /* ← Teal gradient */
    color: white;
    box-shadow: 0 4px 15px rgba(57, 192, 186, 0.3);  /* ← Teal shadow */
}

/* Main content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.header {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header h2 {
    color: #1f2937;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.header p {
    color: #6b7280;
    font-size: 1rem;
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(57, 192, 186, 0.2);  /* ← Teal border */
    border-radius: 8px;
    color: #39c0ba;  /* ← Teal text */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.control-btn:hover {
    background: #39c0ba;  /* ← Teal background */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(57, 192, 186, 0.3);  /* ← Teal shadow */
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    height: 70vh;  /* ← 70% of viewport height */
    min-height: 700px;
    max-height: 1000px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 15px;
    text-align: center;
}

.chart {
    width: 100%;
    height: calc(100% - 40px);
    border-radius: 8px;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #6b7280;
    font-style: italic;
}

/* Content pages */
.intro-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    line-height: 1.6;
}

.intro-content h3 {
    color: #1f2937;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.intro-content p {
    color: #4b5563;
    margin-bottom: 15px;
}

.intro-content ul,
.intro-content ol {
  margin: 0 0 1em 0;   
  padding-left: 1.2em; 
}

.intro-content li {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 300px);
        height: auto;
    }
    
    .controls {
        justify-content: center;
    }
}

/* Error states */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin: 20px 0;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    margin: 20px 0;
}

.site-footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: 0.9em;
  color: #555;
  border-top: 1px solid #ddd;
  background: #f9f9f9;
}
.site-footer a {
  color: #39c0ba;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
