* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e8e8e8;
    min-height: 100vh;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section h3 {
    font-size: 0.9rem;
    color: #90caf9;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 5px;
    color: #b0b0b0;
}

.section input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1rem;
    margin-bottom: 10px;
}

.section input[type="number"]:focus {
    outline: none;
    border-color: #ffd700;
}

.section input[type="range"] {
    width: 100%;
    margin-bottom: 15px;
    accent-color: #ffd700;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.radio-group label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.radio-group input[type="radio"] {
    accent-color: #ffd700;
}

.allocation-display {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    padding: 15px;
}

.allocation-display p {
    margin: 8px 0;
    font-weight: 500;
}

.run-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ffd700 0%, #ffab00 100%);
    border: none;
    border-radius: 10px;
    color: #1a1a2e;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.run-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.info {
    font-size: 0.8rem;
    color: #90caf9;
    font-style: italic;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #ffd700, #ffab00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: #90caf9;
    font-style: italic;
}

/* Metrics */
.metrics-section {
    margin-bottom: 30px;
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metric {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: #90caf9;
    margin-bottom: 10px;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.metric-delta {
    display: inline-block;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 8px;
}

.metric-delta.positive {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.metric-delta.negative {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

/* Charts */
.chart-section {
    margin-bottom: 40px;
}

.chart-section h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.chart-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #90caf9;
}

.chart-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart, .chart-full {
    width: 100%;
    height: 350px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.chart-full {
    height: 450px;
}

.pie-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pie-chart {
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Table */
.table-section {
    margin-bottom: 40px;
}

.table-section h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.table-container {
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: rgba(255, 215, 0, 0.1);
}

th, td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th:first-child, td:first-child {
    text-align: left;
}

th {
    font-weight: 600;
    color: #ffd700;
    white-space: nowrap;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Alerts */
.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid #f44336;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    color: #ff8a80;
}

.warning {
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid #ff9800;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    color: #ffcc80;
}

/* Responsive */
@media (max-width: 1200px) {
    .chart-row {
        grid-template-columns: 1fr;
    }
    
    .pie-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
}
