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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: white;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.main-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 0;
}

.controls-panel {
    background: #f8fafc;
    padding: 30px;
    border-right: 2px solid #e2e8f0;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.results-panel {
    padding: 30px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.control-group {
    margin-bottom: 25px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.control-group h3 {
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group h3::before {
    content: '●';
    color: #3b82f6;
}

.slider-control {
    margin-bottom: 15px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: #475569;
}

.slider-value {
    font-weight: 600;
    color: #1e293b;
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: 4px;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 20px;
}

.preset-btn {
    padding: 10px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preset-btn.optimistic {
    border-color: #10b981;
    color: #10b981;
}

.preset-btn.optimistic:hover {
    background: #d1fae5;
}

.preset-btn.baseline {
    border-color: #f59e0b;
    color: #f59e0b;
}

.preset-btn.baseline:hover {
    background: #fef3c7;
}

.preset-btn.pessimistic {
    border-color: #ef4444;
    color: #ef4444;
}

.preset-btn.pessimistic:hover {
    background: #fee2e2;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.metric-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.metric-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
}

.metric-change {
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 600;
}

.metric-change.positive {
    color: #10b981;
}

.metric-change.negative {
    color: #ef4444;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

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

canvas {
    max-height: 300px !important;
}

.warning-box {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.warning-box.critical {
    background: #fee2e2;
    border-color: #ef4444;
}

.warning-title {
    font-weight: 700;
    color: #92400e;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-box.critical .warning-title {
    color: #991b1b;
}

.warning-text {
    font-size: 0.9rem;
    color: #78350f;
}

.warning-box.critical .warning-text {
    color: #7f1d1d;
}

.info-panel {
    background: #eff6ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #1e3a8a;
}

.historical-note {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #475569;
    border-left: 4px solid #64748b;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .controls-panel {
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
        max-height: none;
    }

    .results-panel {
        max-height: none;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Tab Navigation */
.app-container {
    min-height: 100vh;
}

.tab-navigation {
    background: #1e293b;
    padding: 0;
    display: flex;
    gap: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tab-button {
    flex: 1;
    padding: 20px 30px;
    border: none;
    background: #1e293b;
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #334155;
    color: white;
}

.tab-button.active {
    background: #0f172a;
    color: white;
    border-bottom: 3px solid #3b82f6;
}

.tab-content {
    background: white;
}

/* Greek Tab Styles */
.greek-tab {
    padding: 40px;
    max-width: 1600px;
    margin: 0 auto;
}

.greek-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.greek-header h1 {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.greek-header .subtitle {
    font-size: 1.2rem;
    color: #64748b;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.greek-tab .chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    height: 400px;
}

.greek-tab .chart-container canvas {
    max-height: 360px;
}

/* Insights Panel */
.insights-panel {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.insights-panel h2 {
    color: #1e293b;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.insight-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.insight-card h3 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.insight-card p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Lessons Panel */
.lessons-panel {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 30px;
}

.lessons-panel h2 {
    color: #1e293b;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.lessons-panel ul {
    list-style: none;
    padding: 0;
}

.lessons-panel li {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 12px;
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.lessons-panel li strong {
    color: #1e293b;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .greek-tab {
        padding: 20px;
    }

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

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

    .tab-button {
        font-size: 0.9rem;
        padding: 15px 20px;
    }
}

/* France Tab - Updated to match Greek style */
.france-tab {
    padding: 40px;
    max-width: 1600px;
    margin: 0 auto;
    background: white;
}

.france-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
    background: white;
}

.france-header h1 {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.france-header .subtitle {
    font-size: 1.2rem;
    color: #64748b;
}

/* Override old container styles for France tab */
.france-tab .container {
    box-shadow: none;
    border-radius: 0;
}

.france-tab .header {
    background: white;
    color: #1e293b;
}

.france-tab .main-content {
    background: white;
}

.france-tab .controls-panel {
    background: #f8fafc;
}
