/*
    mathMambo-Stg4Styles.css
    TNT | Math Mambo Saga — Stage 4
    Deep-black disco palette with tricolor accents.
    Requires CSS custom properties from ../styles/tnt-base-styles.css.
    Rule: no bare tag selectors here — tnt-base-styles owns those.
*/

/* ── Body ── */
body {
    background: #050508;
}

/* ── Hero: disco dance floor image ── */
#hero {
    min-height: 36vh;
    background:
        linear-gradient(135deg, rgba(5,5,25,0.40) 0%, rgba(20,8,50,0.35) 100%),
        url('../../images/discoDanceFloor.webp') center / cover no-repeat;
    padding: 3.5rem 1rem 2.5rem;
}

/* ── Spark bar ── */
.spark-bar {
    background: #0c080f;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.4rem;
    border-bottom: 1px solid rgba(230,159,77,0.28);
}
.spark-bar a {
    color: var(--tnt-amber);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
}
.spark-bar a:hover { text-decoration: underline; color: #ffc261; }
.spark-bar span    { color: rgba(255,255,255,0.42); font-size: 0.80rem; margin-left: auto; }

/* ── Game section ── */
#gameSection {
    background: #070509;
    padding: 2rem 0 4rem;
}

/* ── About / details block ── */
#gameSection details summary {
    color: var(--tnt-amber);
    font-style: italic;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    padding: 0.4rem 0;
}
#gameSection details summary::before         { content: "\25B6\00a0"; font-style: normal; font-size: 0.75em; }
#gameSection details[open] summary::before   { content: "\25BC\00a0"; }
#gameSection details .about-body {
    margin-top: 0.5rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--tnt-amber);
    color: rgba(255,255,255,0.70);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ── Card container ── */
.game-card {
    background: #110d1c;
    border: 1px solid rgba(100,180,255,0.18);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 30px rgba(0,0,0,0.70);
}

/* ── Canvas wrapper ── */
#myCanvas {
    border-radius: 10px;
    overflow: hidden;
    display: inline-block;
}
#myCanvas canvas {
    border-radius: 10px;
    display: block;
}

/* ── Status line under canvas ── */
#msgPara {
    text-align: center;
    min-height: 1.4rem;
    margin: 0.4rem 0 0;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.40);
    font-style: italic;
}

/* ── Controls section ── */
.ctrl-heading {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--tnt-amber);
    margin-bottom: 0.6rem;
}

.ctrl-hr {
    border-color: rgba(255,255,255,0.10);
    margin: 0.9rem 0;
}

/* ── Primary action button (Start/Stop) ── */
#startStopBtn {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: filter 0.15s;
}
#startStopBtn.btn-start {
    background: var(--tnt-amber);
    color: #0f0a1e;
}
#startStopBtn.btn-pause {
    background: #27AE60;
    color: #fff;
}
#startStopBtn:hover { filter: brightness(1.12); }

/* ── Secondary buttons ── */
.btn-secondary-ctrl {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #1e1530;
    border: 1px solid rgba(230,159,77,0.30);
    color: rgba(255,255,255,0.70);
    border-radius: 7px;
    padding: 5px 14px;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-secondary-ctrl:hover {
    border-color: var(--tnt-amber);
    color: var(--tnt-amber);
}

.btn-secondary-ctrl:disabled {
    opacity: 0.30;
    cursor: not-allowed;
    pointer-events: none;
}

.ctrl-btn-active {
    border-color: var(--tnt-amber) !important;
    color: var(--tnt-amber) !important;
}

/* ── Save button (always visible once canvas has content) ── */
#saveBtn {
    width: 100%;
    margin-top: 0.6rem;
    padding: 5px 0;
    background: #1a2a1a;
    border: 1px solid rgba(39,174,96,0.40);
    color: #27AE60;
    border-radius: 7px;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.15s;
}
#saveBtn:hover { background: rgba(39,174,96,0.18); border-color: #27AE60; }

/* ── Sliders ── */
.slider-group {
    margin-bottom: 0.9rem;
}
.slider-group label {
    display: block;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.52);
    margin-bottom: 3px;
    text-align: center;
}

/* ── Info stats ── */
.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.80rem;
    color: rgba(255,255,255,0.50);
    margin-bottom: 0.25rem;
}
.stat-row span:last-child {
    color: rgba(230,159,77,0.85);
    font-weight: 600;
}

/* ── Click hint ── */
#clickHint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.32);
    font-style: italic;
    text-align: center;
    margin-top: 0.5rem;
}

/* ── Locked slider (light size: can’t change once dots are on canvas) ── */
.lock-note {
    display: none;
    font-style: italic;
    font-size: 0.72em;
    color: rgba(255,255,255,0.28);
}
.slider-locked .lock-note       { display: inline; }
.slider-locked label            { opacity: 0.40; }
.slider-locked .form-range      { opacity: 0.30; cursor: not-allowed; }

/* ── Color legend dots ── */
.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.dot-red   { background: #ff4515; box-shadow: 0 0 6px #ff4515; }
.dot-green { background: #2ade7b; box-shadow: 0 0 6px #2ade7b; }
.dot-blue  { background: #2bc8ff; box-shadow: 0 0 6px #2bc8ff; }
