/* Scoped Styles for Chapter 5: Equation in One Variable */
.equation-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    overflow: hidden;
    position: relative;
    font-family: 'Poppins', sans-serif;
}

.equation-header {
    text-align: center;
    margin-bottom: 10px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.equation-header h2 {
    font-size: 1.5rem;
    color: #2b2d42;
    margin: 0;
    font-weight: 600;
}

.equation-display {
    font-size: 1.8rem;
    color: #4361ee;
    font-weight: 700;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
}

/* Input Section */
.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    z-index: 2;
}

.equation-input {
    padding: 8px 12px;
    border: 2px solid #4361ee;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    width: 200px;
    text-align: center;
}

.btn-load {
    padding: 8px 16px;
    background-color: #4361ee;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-load:hover {
    background-color: #3f37c9;
}

/* Scale Stage */
.scale-stage {
    flex-grow: 1;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    overflow: hidden;
}

#balance-svg {
    width: 100%;
    height: 100%;
    max-width: 800px;
    max-height: 400px;
}

/* SVG Elements Styling */
.beam {
    stroke: #2b2d42;
    stroke-width: 4;
    stroke-linecap: round;
}

.fulcrum {
    fill: #2b2d42;
}

.pan-string {
    stroke: #8d99ae;
    stroke-width: 2;
}

.pan-base {
    fill: rgba(255, 255, 255, 0.6);
    stroke: #8d99ae;
    stroke-width: 2;
}

.weight-x {
    fill: #4361ee; /* Blue Square */
    stroke: #3f37c9;
    stroke-width: 1;
}

.weight-one {
    fill: #f72585; /* Pink/Yellow Circle - Using Pink for better visibility against yellow BG, or Yellow as requested? Let's stick to requested Yellow but darker border */
    fill: #f9c74f; /* Yellow */
    stroke: #f3722c;
    stroke-width: 1;
}

.weight-text {
    font-size: 12px;
    fill: #2b2d42;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
}

/* Controls */
.controls-panel {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 2;
}

.control-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-op {
    background-color: #4cc9f0;
    color: #2b2d42;
}

.btn-op:hover:not(:disabled) {
    background-color: #48bfe3;
}

.btn-reset {
    background-color: #ef233c;
    color: white;
}

.btn-reset:hover {
    background-color: #d90429;
}

/* Tutorial Hint */
.tutorial-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
    text-align: center;
}

.tutorial-hint.visible {
    opacity: 1;
}

/* ===== Gonit Ongon 2.0 de-slop (tokens from design-system.css) ===== */
.equation-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-sans);
}
.equation-header { background: var(--color-surface-2); border: 1px solid var(--color-border); box-shadow: none; }
.equation-header h2 { color: var(--color-ink); }
.equation-container .equation-display { color: var(--color-ink); font-family: var(--font-mono); }
.equation-input { border: 2px solid var(--color-accent); border-radius: var(--radius-md); }
.btn-load { background: var(--color-accent); color: #fff; border-radius: var(--radius-md); box-shadow: var(--btn-inset); }
.btn-load:hover { background: var(--color-accent-hover); }
/* weight categories: x = emerald, unit = amber (kept distinct) */
.weight-x { fill: var(--color-accent); stroke: var(--color-accent-active); }
.weight-one { fill: var(--amber-500); stroke: var(--amber-600); }
.controls-panel { background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.btn-op { background: var(--color-accent-soft); color: var(--color-accent-active); }
.btn-op:hover:not(:disabled) { background: var(--emerald-200); }
.btn-reset { background: var(--color-danger-soft); color: var(--color-danger); }
.btn-reset:hover { background: var(--color-danger); color: #fff; }
