* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Inter', sans-serif; background-color: #000000; color: #ffffff; display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }

/* --- Top Navigation --- */
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; background: rgba(5, 5, 5, 0.9); border-bottom: 1px solid #1a1a1a; z-index: 10; }
.back-link { color: #888888; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.back-link:hover { color: #ffffff; }
.sim-title { font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #ffffff; font-size: 0.95rem; }

/* --- Dashboard Layout --- */
.dashboard { display: grid; grid-template-columns: 320px 1fr 380px; gap: 1px; background: #1a1a1a; flex: 1; }

.panel { background: #050505; padding: 2rem; display: flex; flex-direction: column; gap: 2rem; overflow-y: auto; }
.canvas-container { background: radial-gradient(circle at center, #0a0e17 0%, #000000 100%); display: flex; flex-direction: column; position: relative; }

/* --- Panel Typography & Elements --- */
.panel-header h2 { font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #f8fafc; border-bottom: 1px solid #1a1a1a; padding-bottom: 1rem; }
.control-group { display: flex; flex-direction: column; gap: 1rem; }
.control-group label { display: flex; justify-content: space-between; font-size: 0.95rem; font-weight: 600; color: #cbd5e1; }
.helper-text { font-size: 0.8rem; color: #64748b; line-height: 1.4; }

/* --- Accent Colors --- */
.highlight-blue { color: #3b82f6; }
.highlight-orange { color: #f59e0b; }

/* --- Precision Sliders --- */
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; padding: 10px 0; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; border-radius: 2px; background: #1e293b; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%; margin-top: -8px; cursor: pointer; border: 2px solid #000; box-shadow: 0 0 10px rgba(255,255,255,0.1); }

/* Themed Slider Thumbs */
.slider-blue::-webkit-slider-thumb { background: #3b82f6; }
.slider-orange::-webkit-slider-thumb { background: #f59e0b; }

/* --- Canvas Header --- */
.canvas-header { position: absolute; top: 1.5rem; left: 1.5rem; z-index: 5; display: flex; align-items: center; gap: 1rem; }
.canvas-header h3 { font-size: 0.9rem; font-weight: 600; color: #ffffff; letter-spacing: 0.05em; text-transform: uppercase; }
.live-indicator { font-size: 0.75rem; color: #10b981; font-weight: 600; display: flex; align-items: center; gap: 0.4rem; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

canvas { width: 100%; height: 100%; display: block; flex: 1; }

/* --- Output Data Grid --- */
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.data-box { background: #0a0a0c; border: 1px solid #1e293b; padding: 1.25rem; border-radius: 12px; display: flex; flex-direction: column; gap: 0.5rem; }
.data-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; font-weight: 600; }
.data-value { font-size: 1.25rem; font-weight: 700; color: #f8fafc; }

/* --- Urine Analysis & Summary Note --- */
.urine-analysis { background: #0a0a0c; border: 1px solid #1e293b; padding: 1.25rem; border-radius: 12px; }
.urine-display { display: flex; align-items: center; gap: 1.5rem; margin-top: 1rem; }
.color-box { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #334155; box-shadow: inset 0 2px 10px rgba(0,0,0,0.5); transition: background-color 0.4s ease; }
.urine-state { font-size: 1.25rem; font-weight: 700; color: #ffffff; }

.summary-box { background: rgba(59, 130, 246, 0.05); border: 1px solid rgba(59, 130, 246, 0.2); border-left: 4px solid #3b82f6; padding: 1.5rem; border-radius: 8px; display: flex; flex-direction: column; gap: 0.75rem; }
.summary-text { font-size: 0.9rem; line-height: 1.6; color: #cbd5e1; }

/* --- Mobile Responsiveness --- */
@media (max-width: 1200px) {
    .dashboard { grid-template-columns: 280px 1fr; grid-template-rows: auto auto; }
    .output-panel { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
    .dashboard { display: flex; flex-direction: column; gap: 0; }
    .canvas-container { height: 50vh; min-height: 400px; border-top: 1px solid #1a1a1a; border-bottom: 1px solid #1a1a1a; }
    .panel { padding: 1.5rem; }
}
