/* ============================================
   LIGHT TRANSPORT LAB - STYLES
   ============================================ */

:root {
    --bg-void: #05080c;
    --bg-deep: #0a1018;
    --bg-panel: #111a24;
    --bg-card: #162230;
    --text-bright: #f0f4f8;
    --text-mid: #94a3b8;
    --text-dim: #64748b;
    --accent-cyan: #22d3ee;
    --accent-amber: #fbbf24;
    --accent-rose: #fb7185;
    --glow-cyan: rgba(34, 211, 238, 0.4);
    --glow-amber: rgba(251, 191, 36, 0.4);
    --red: #f87171;
    --green: #4ade80;
    --blue: #60a5fa;
    --red-glow: rgba(248, 113, 113, 0.3);
    --green-glow: rgba(74, 222, 128, 0.3);
    --blue-glow: rgba(96, 165, 250, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-void);
    color: var(--text-bright);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.bg-atmosphere {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(251, 191, 36, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 100% 100% at 50% 50%, var(--bg-void) 0%, var(--bg-deep) 100%);
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
}

/* ============================================
   HEADER
   ============================================ */

header {
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s;
}

.back-link:hover {
    color: var(--accent-cyan);
    gap: 0.75rem;
}

.hero-title {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-bright) 0%, var(--accent-cyan) 50%, var(--accent-amber) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lab-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(251, 191, 36, 0.1));
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-cyan);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.lab-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--glow-cyan);
}

.subtitle {
    margin-top: 0.75rem;
    color: var(--text-mid);
    font-size: 1.05rem;
    max-width: 700px;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.main-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ============================================
   VISUALIZATION PANEL
   ============================================ */

.viz-panel {
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.viz-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.5), transparent);
}

/* ============================================
   EFFECT TOGGLES
   ============================================ */

.effect-toggles {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.effect-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.effect-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--toggle-color, transparent) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s;
}

.effect-toggle:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.effect-toggle.active {
    border-color: var(--toggle-color);
    box-shadow: 0 0 20px var(--toggle-glow);
}

.effect-toggle.active::before {
    opacity: 0.15;
}

.effect-toggle[data-effect="absorption"] {
    --toggle-color: var(--accent-amber);
    --toggle-glow: rgba(251, 191, 36, 0.3);
}

.effect-toggle[data-effect="rayleigh"] {
    --toggle-color: var(--blue);
    --toggle-glow: rgba(96, 165, 250, 0.3);
}

.effect-toggle[data-effect="mie"] {
    --toggle-color: #e2e8f0;
    --toggle-glow: rgba(226, 232, 240, 0.3);
}

.toggle-indicator {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-dim);
}

.effect-toggle.active .toggle-indicator {
    background: var(--toggle-color);
    border-color: var(--toggle-color);
    color: var(--bg-void);
}

.toggle-indicator svg {
    width: 12px;
    height: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.effect-toggle.active .toggle-indicator svg {
    opacity: 1;
}

.toggle-content {
    position: relative;
}

.toggle-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-bright);
}

.toggle-desc {
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* ============================================
   VIEW MODE TOGGLE
   ============================================ */

.view-mode-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    padding: 0.35rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
}

.view-mode-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.view-mode-btn:hover {
    color: var(--text-mid);
    background: rgba(255,255,255,0.03);
}

.view-mode-btn.active {
    background: var(--bg-void);
    color: var(--text-bright);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.view-mode-icon {
    font-size: 1rem;
}

.view-mode-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ============================================
   SCENE WRAPPER
   ============================================ */

.scene-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 1.5rem;
    cursor: grab;
    user-select: none;
    aspect-ratio: 4/3;
}

.scene-wrapper:active {
    cursor: grabbing;
}

.scene-wrapper canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.scene-hint {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.5);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.light-label {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    color: var(--accent-amber);
    background: rgba(0,0,0,0.6);
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.light-label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-amber);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--glow-amber);
    animation: lightPulse 2s ease-in-out infinite;
}

@keyframes lightPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

/* ============================================
   ALBEDO BAR
   ============================================ */

.albedo-display {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(251, 191, 36, 0.05));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.albedo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.albedo-title {
    font-size: 0.8rem;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.albedo-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-bright);
}

.albedo-bar-container {
    height: 24px;
    background: var(--bg-void);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
}

.albedo-bar-absorbed {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f97316);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.albedo-bar-scattered {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #22d3ee);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.albedo-bar-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
    padding: 0 0.5rem;
}

.albedo-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.65rem;
    color: var(--text-dim);
}

.albedo-legend span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.absorbed { background: linear-gradient(135deg, #ef4444, #f97316); }
.legend-dot.scattered { background: linear-gradient(135deg, #3b82f6, #22d3ee); }

/* ============================================
   WAVELENGTH RESPONSE BARS
   ============================================ */

.wavelength-response {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: none;
}

.wavelength-response.visible {
    display: block;
}

.wavelength-title {
    font-size: 0.75rem;
    color: var(--text-mid);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.wavelength-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wavelength-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wavelength-label {
    width: 70px;
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}

.wavelength-bar-track {
    flex: 1;
    height: 16px;
    background: var(--bg-void);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.wavelength-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.3s ease;
    position: relative;
}

.wavelength-bar-fill.red { background: linear-gradient(90deg, rgba(248, 113, 113, 0.3), var(--red)); }
.wavelength-bar-fill.green { background: linear-gradient(90deg, rgba(74, 222, 128, 0.3), var(--green)); }
.wavelength-bar-fill.blue { background: linear-gradient(90deg, rgba(96, 165, 250, 0.3), var(--blue)); }

.wavelength-multiplier {
    width: 40px;
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-bright);
    text-align: right;
}

/* ============================================
   PHASE FUNCTION DIAGRAM
   ============================================ */

.phase-diagram {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: none;
}

.phase-diagram.visible {
    display: block;
}

.phase-title {
    font-size: 0.75rem;
    color: var(--text-mid);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.phase-svg-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phase-svg {
    width: 180px;
    height: 180px;
}

.phase-label-text {
    font-size: 0.6rem;
    fill: var(--text-dim);
    font-family: 'Space Grotesk', sans-serif;
}

.phase-label-forward { fill: var(--accent-cyan); }
.phase-label-backward { fill: var(--accent-amber); }

/* ============================================
   WHY IS QUESTIONS
   ============================================ */

.why-questions {
    background: linear-gradient(135deg, var(--bg-card), rgba(34, 211, 238, 0.03));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.why-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.why-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.4rem;
    background: var(--bg-void);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    color: var(--text-mid);
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.why-btn:last-child {
    margin-bottom: 0;
}

.why-btn:hover {
    background: var(--bg-card);
    border-color: rgba(255,255,255,0.12);
    color: var(--text-bright);
}

.why-btn.active {
    background: rgba(34, 211, 238, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.why-btn-icon {
    font-size: 1.1rem;
}

.why-answer {
    display: none;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: rgba(34, 211, 238, 0.05);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--text-mid);
    line-height: 1.5;
}

.why-answer.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.why-answer strong {
    color: var(--accent-cyan);
}

/* ============================================
   BUILDING BLOCKS EXPLANATION
   ============================================ */

.building-blocks {
    background: linear-gradient(135deg, var(--bg-card), rgba(34, 211, 238, 0.03));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 1.25rem;
}

.blocks-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blocks-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 2px;
}

.block-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}

.block-item:last-child {
    margin-bottom: 0;
}

.block-item.highlight {
    background: rgba(255,255,255,0.03);
}

.block-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.block-item[data-block="absorption"] .block-icon {
    background: rgba(251, 191, 36, 0.15);
}

.block-item[data-block="rayleigh"] .block-icon {
    background: rgba(96, 165, 250, 0.15);
}

.block-item[data-block="mie"] .block-icon {
    background: rgba(226, 232, 240, 0.1);
}

.block-text h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.15rem;
}

.block-text p {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.block-equation {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-top: 0.35rem;
    display: inline-block;
}

/* ============================================
   CONTROLS PANEL
   ============================================ */

.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.control-card {
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s;
}

.control-card:hover {
    border-color: rgba(255,255,255,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.card-icon {
    font-size: 1.1rem;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-bright);
}

/* ============================================
   PHYSICAL PARAMETER GROUPS
   ============================================ */

.param-group {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.param-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.param-group-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* ============================================
   SLIDERS
   ============================================ */

.slider-group {
    margin-bottom: 0.75rem;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.slider-label {
    font-size: 0.8rem;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.slider-label .unit {
    font-size: 0.65rem;
    color: var(--text-dim);
}

.slider-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* Regime Badge */
.regime-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 0.5rem;
}

.regime-badge.rayleigh {
    background: rgba(96, 165, 250, 0.2);
    color: var(--blue);
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.regime-badge.mie {
    background: rgba(226, 232, 240, 0.15);
    color: #e2e8f0;
    border: 1px solid rgba(226, 232, 240, 0.3);
}

.regime-badge.geometric {
    background: rgba(251, 191, 36, 0.2);
    color: var(--accent-amber);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Range Input Styling */
input[type="range"] {
    width: 100%;
    height: 24px;
    border-radius: 3px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-void);
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 12px var(--glow-cyan);
    cursor: pointer;
    margin-top: -6px;
    border: none;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 16px var(--glow-cyan);
}

input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.15);
    box-shadow: 0 0 20px var(--glow-cyan);
}

/* Firefox */
input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-void);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 12px var(--glow-cyan);
    cursor: pointer;
    border: none;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 16px var(--glow-cyan);
}

input[type="range"]:disabled {
    opacity: 0.4;
    pointer-events: none;
}

input[type="range"]:disabled::-webkit-slider-thumb {
    cursor: not-allowed;
}

input[type="range"]:disabled::-moz-range-thumb {
    cursor: not-allowed;
}

/* ============================================
   LIGHT COLOR PICKER
   ============================================ */

.light-color-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input[type="color"] {
    width: 40px;
    height: 28px;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

input[type="color"]:hover {
    border-color: var(--accent-cyan);
}

.color-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* ============================================
   LEARNING PATH TABS
   ============================================ */

.learning-path-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    background: var(--bg-void);
    padding: 0.25rem;
    border-radius: 8px;
}

.learning-tab {
    flex: 1;
    padding: 0.45rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.learning-tab:hover {
    color: var(--text-mid);
    background: rgba(255,255,255,0.03);
}

.learning-tab.active {
    background: var(--bg-card);
    color: var(--accent-cyan);
}

/* ============================================
   PRESETS GRID
   ============================================ */

.presets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.preset-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-void);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    color: var(--text-mid);
    font-family: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.preset-btn:hover {
    background: var(--bg-card);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

.preset-btn.active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(251, 191, 36, 0.1));
    border-color: var(--accent-cyan);
    color: var(--text-bright);
}

.preset-btn.hidden {
    display: none;
}

.preset-icon {
    font-size: 1rem;
}

.preset-info {
    font-size: 0.6rem;
    color: var(--text-dim);
    margin-left: auto;
}

/* ============================================
   PHYSICAL VALUES CARD
   ============================================ */

.physical-values {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(34, 211, 238, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.physical-values-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-amber);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.75rem;
}

.value-label {
    color: var(--text-dim);
}

.value-number {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-bright);
}

/* ============================================
   CODE SECTION
   ============================================ */

.code-section {
    margin-top: 2rem;
    animation: fadeIn 0.6s ease-out 0.4s both;
}

.code-card {
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-mid);
}

.code-title::before {
    content: '</>';
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-cyan);
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-void);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-mid);
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: var(--bg-void);
}

.copy-btn.copied {
    background: var(--green);
    border-color: var(--green);
    color: var(--bg-void);
}

pre {
    padding: 1.25rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-mid);
    max-height: 300px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer-note {
    margin-top: 2rem;
    text-align: center;
    padding: 1.5rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-note a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.footer-note a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    .effect-toggles {
        flex-direction: column;
    }

    .effect-toggle {
        justify-content: flex-start;
    }

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

    .view-mode-container {
        flex-wrap: wrap;
    }
}
