/* ══════════════════════════════════════════════════════════════════════════════
   galtonBoardSimAppStyles.css
   TNT | Galton Board Simulator
   Created: 10/30/2026
   Palette: navy/steel-blue — extracted from images/robotGaltonBoard1.jpg
   ══════════════════════════════════════════════════════════════════════════════

   Color palette (HSB → hex):
     --gb-bg:     HSB(222, 45, 10)  → #0d1219  navy-dark background
     --gb-blue:   HSB(210, 75, 80)  → #3280cc  steel blue (robot color)
     --gb-gold:   HSB(40,  85, 95)  → #f2ae24  warm amber/gold
     --gb-light:  HSB(210, 15, 95)  → #cee0f2  near-white text
     --gb-card:   HSB(222, 40, 16)  → #181d29  card background
     --gb-border: HSB(210, 50, 35)  → #2c4359  border color
   ══════════════════════════════════════════════════════════════════════════════ */

:root {
    --gb-bg:            #0d1219;
    --gb-blue:          #3280cc;
    --gb-gold:          #f2ae24;
    --gb-light:         #cee0f2;
    --gb-card:          #181d29;
    --gb-border:        rgba(50, 128, 204, 0.25);
    --gb-border-solid:  #2c4359;
}

/* ── Body ────────────────────────────────────────────────────────────────────── */
body {
    background-color: var(--gb-bg);
    color: var(--gb-light);
    font-family: 'Inter', sans-serif;
}

/* ── Navbar — inherits tnt-base-styles; no overrides needed ─────────────────── */

/* ── Hero ────────────────────────────────────────────────────────────────────── */
#hero {
    min-height: 35vh;
    background:
        linear-gradient(180deg, rgba(13, 18, 25, 0.90) 0%, rgba(13, 18, 25, 0.48) 100%),
        url('../images/robotGaltonBoard2.jpg') center 30% / cover no-repeat;
    padding: 4rem 1rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    max-width: 760px;
}

.hero-eyebrow {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gb-gold);
    margin-bottom: 0.65rem;
    opacity: 0.88;
}

.hero-title {
    font-family: 'Boogaloo', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: #fff;
    margin-bottom: 0.55rem;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.70);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── Spark bar ───────────────────────────────────────────────────────────────── */
.spark-bar {
    background: rgba(24, 29, 41, 0.97);
    border-bottom: 1px solid var(--gb-border);
    padding: 0.45rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
}

.spark-bar a {
    color: var(--gb-blue);
    text-decoration: none;
    transition: color 0.15s;
}

.spark-bar a:hover {
    color: var(--gb-gold);
}

.spark-bar span {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.32);
    font-style: italic;
}

/* ── Main simulation section ─────────────────────────────────────────────────── */
#simSection {
    background: linear-gradient(180deg, var(--gb-bg) 0%, #080d14 100%);
    padding: 2.5rem 1rem 4.5rem;
}

/* ── About / details section ─────────────────────────────────────────────────── */
details.about-details {
    background: rgba(50, 128, 204, 0.07);
    border: 1px solid var(--gb-border);
    border-radius: 10px;
    padding: 0.9rem 1.15rem;
    margin-bottom: 1.4rem;
    color: rgba(255, 255, 255, 0.80);
    font-size: 0.9rem;
    line-height: 1.72;
}

details.about-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--gb-blue);
    font-style: italic;
    font-size: 0.92rem;
    list-style: none;
}

details.about-details summary::before {
    content: '\25B6\00A0';
    font-style: normal;
    font-size: 0.75em;
    opacity: 0.6;
}

details[open].about-details summary::before {
    content: '\25BC\00A0';
}

details.about-details p:last-child { margin-bottom: 0; }

details.about-details code {
    background: rgba(50, 128, 204, 0.15);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    font-size: 0.87em;
    color: var(--gb-gold);
}

/* ── Controls card ───────────────────────────────────────────────────────────── */
.gb-ctrl-card {
    background: var(--gb-card);
    border: 1px solid var(--gb-border);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.55);
}

/* ── Canvas wrap ─────────────────────────────────────────────────────────────── */
.gb-canvas-wrap {
    border: 1px solid var(--gb-border);
    border-radius: 12px;
    overflow: hidden;
    background: #090d13;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.gb-canvas-wrap canvas {
    display: block;
}

/* ── Control section headings ────────────────────────────────────────────────── */
.ctrl-section-heading {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gb-blue);
    margin-bottom: 0.6rem;
    margin-top: 0.05rem;
}

/* ── Dividers ────────────────────────────────────────────────────────────────── */
.gb-hr {
    border: none;
    border-top: 1px solid var(--gb-border);
    margin: 0.8rem 0;
}

/* ── Slider groups ───────────────────────────────────────────────────────────── */
.slider-group {
    margin-bottom: 0.65rem;
}

.slider-group label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.18rem;
    cursor: default;
}

.slider-val {
    font-weight: 700;
    color: var(--gb-gold);
    font-size: 0.82rem;
    min-width: 4ch;
    text-align: right;
}

.slider-group input[type="range"] {
    accent-color: var(--gb-blue);
}

/* ── Drop / action buttons ───────────────────────────────────────────────────── */
.btn-gb-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.46rem 0.75rem;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid var(--gb-blue);
    background: transparent;
    color: var(--gb-blue);
    transition: background 0.18s, color 0.18s, transform 0.1s;
    margin-bottom: 0.42rem;
    line-height: 1.4;
    text-align: center;
}

.btn-gb-drop:hover {
    background: rgba(50, 128, 204, 0.14);
    transform: translateY(-1px);
}

.btn-gb-drop.btn-active {
    background: var(--gb-blue);
    color: #fff;
}

/* Auto-drop toggle: gold when active */
.btn-gb-toggle.btn-active {
    background: var(--gb-gold);
    border-color: var(--gb-gold);
    color: #1a1000;
}

.btn-gb-toggle.btn-active:hover {
    background: #e09f14;
    border-color: #e09f14;
}

/* ── Reset button ────────────────────────────────────────────────────────────── */
.btn-gb-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.46rem 0.75rem;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.28);
    background: transparent;
    color: rgba(255, 255, 255, 0.52);
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.1s;
    margin-bottom: 0;
    line-height: 1.4;
}

.btn-gb-reset:hover {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.48);
    transform: translateY(-1px);
}

/* ── Theoretical note block ──────────────────────────────────────────────────── */
.gb-theory-note {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.48);
    line-height: 1.55;
    margin: 0.2rem 0 0.5rem;
    padding: 0.5rem 0.65rem;
    border-left: 2px solid rgba(242, 174, 36, 0.35);
    background: rgba(242, 174, 36, 0.04);
    border-radius: 0 6px 6px 0;
}

.gb-theory-note code {
    color: var(--gb-gold);
    font-size: 0.78rem;
    background: rgba(242, 174, 36, 0.10);
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
}

/* ── Snapshot button ─────────────────────────────────────────────────────────── */
.btn-gb-snap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.46rem 0.75rem;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid rgba(242, 174, 36, 0.50);
    background: transparent;
    color: var(--gb-gold);
    transition: background 0.18s, border-color 0.18s, transform 0.1s;
    margin-top: 0.42rem;
    margin-bottom: 0;
    line-height: 1.4;
}

.btn-gb-snap:hover {
    background: rgba(242, 174, 36, 0.12);
    border-color: var(--gb-gold);
    transform: translateY(-1px);
}

/* ── Statistics panel ────────────────────────────────────────────────────────── */
.gb-stats-panel {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--gb-border);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    margin-top: 0.2rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.22rem 0;
    border-bottom: 1px solid rgba(50, 128, 204, 0.10);
    font-size: 0.83rem;
}

.stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-label {
    color: rgba(255, 255, 255, 0.52);
}

.stat-value {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    color: var(--gb-gold);
    min-width: 7ch;
    text-align: right;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.tnt-footer {
    background: #070b10;
    border-top: 1px solid var(--gb-border);
    padding: 1.25rem 1rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.33);
}

/* ── Layout Toggle ───────────────────────────────────────────────────────────── */
.layout-toggle-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 0.35rem;
    transition: opacity 0.2s;
}

.toggle-label {
    font-size: 0.81rem;
    font-weight: 600;
    color: rgba(195, 228, 248, 0.78);
}

.gb-layout-switch:checked {
    background-color: var(--gb-blue);
    border-color: var(--gb-blue);
}

.gb-layout-switch:focus {
    box-shadow: 0 0 0 3px rgba(50, 128, 204, 0.28);
}

.gb-layout-switch {
    cursor: pointer;
}

.toggle-hint {
    font-size: 0.72rem;
    color: rgba(195, 228, 248, 0.40);
    margin: 0 0 0.65rem;
    font-style: italic;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
/* ── Ball-Physics Warning Banner ─────────────────────────────────────────────── */
.gb-physics-warning {
    background: rgba(232, 160, 32, 0.18);
    border: 1px solid rgba(232, 160, 32, 0.55);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin: 0.4rem 0 0.5rem;
    font-size: 0.77rem;
    color: rgba(255, 220, 100, 0.92);
    line-height: 1.45;
}

@media (max-width: 991px) {
    /* Stack: controls appear below the canvas on md and smaller */
    .gb-canvas-wrap {
        margin-top: 0.5rem;
    }

    .row.g-3 > .col-lg-8 { order: 1; }
    .row.g-3 > .col-lg-4 { order: 2; }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .spark-bar span {
        display: none;
    }

    .gb-ctrl-card {
        padding: 0.85rem 0.9rem;
    }
}

/* ── Snapshot modal ──────────────────────────────────────────────────────────── */
.gb-snapshot-modal {
    background: var(--gb-card);
    border: 1px solid var(--gb-border-solid);
    color: var(--gb-light);
}

.gb-snapshot-modal .modal-header {
    border-bottom: 1px solid var(--gb-border-solid);
}

.gb-snapshot-modal .modal-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gb-gold);
}

.gb-snapshot-modal .modal-footer {
    border-top: 1px solid var(--gb-border-solid);
}
