:root {
    --primary: rgb(30, 75, 105);
    --accent: rgb(70, 180, 200);
    --light-bg: #f5f7fa;
    --border: #dde2e8;
    --text: #2c3e50;
    --text-light: #6c7a89;
    --monolith-color: #3b82f6;
    --modular-color: #14b8a6;
    --micro-color: #22c55e;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--light-bg);
    color: var(--text);
    line-height: 1.5;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 24px 20px;
}

h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Canvas */
#canvas-container {
    margin-bottom: 14px;
    border-radius: var(--radius);
    overflow: hidden;
}

#canvas-container canvas {
    display: block;
}

/* Slider Panel */
.slider-panel {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.slider-group {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
}

.slider-group label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.slider-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary);
}

.slider-value {
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 600;
}

.slider-group input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.slider-range {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* Score Bar */
.score-bar-container {
    margin-bottom: 14px;
}

.score-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 4px;
    padding: 0 2px;
}

.label-monolith { color: var(--monolith-color); font-weight: 600; }
.label-modular { color: var(--modular-color); font-weight: 600; }
.label-micro { color: var(--micro-color); font-weight: 600; }

.score-bar {
    position: relative;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right, var(--monolith-color), var(--modular-color), var(--micro-color));
    overflow: visible;
}

.score-bar-fill {
    height: 100%;
    border-radius: 6px;
}

.score-marker {
    position: absolute;
    top: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transform: translateX(-50%);
    transition: left 0.3s ease;
}

/* Badge Row */
.badge-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.arch-badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    background: var(--monolith-color);
    transition: background 0.3s ease;
}

.score-text {
    font-size: 0.82rem;
    color: var(--text-light);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Trade-off Cards */
.tradeoff-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.tradeoff-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    text-align: center;
}

.tradeoff-icon {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.tradeoff-card h4 {
    font-size: 0.82rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.tradeoff-card p {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.4;
    transition: all 0.3s ease;
}

/* Recommendation Panel */
.recommendation-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
}

.recommendation-panel h4 {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.recommendation-panel p {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 600px) {
    .slider-panel {
        grid-template-columns: 1fr;
    }

    .tradeoff-cards {
        grid-template-columns: 1fr;
    }

    .score-bar-labels {
        font-size: 0.68rem;
    }
}
