/*
 * butterFlyEffect1Styles.css
 * TNT | Chaos Game Saga — Butterfly Effect Stage 1
 * Created: 2026-10-21
 * Palette: warm amber (butterfly wings), blue-teal (water reflections), deep dark
 * Refactored from: ButterflyFx2026-10-21-Stg1/index.php
 */

:root {
    --bf-amber:       #C4882A;
    --bf-amber-lt:    rgba(196,136,42,0.14);
    --bf-amber-glow:  rgba(196,136,42,0.22);
    --bf-teal:        #2A7A96;
    --bf-teal-lt:     rgba(42,122,150,0.14);
    --bf-dark:        #060C14;
    --bf-card:        #0B1824;
    --bf-border:      rgba(196,136,42,0.20);
}


/* ══════════════════════════════════════════
   HERO
   Background image path relative to this file:
   styles/ → ButterflyFx2026-10-21-Stg1/ → TNT-2026-Live-WorkingDev/ → images/
══════════════════════════════════════════ */
#hero {
    min-height: 34vh;
    background:
        linear-gradient(135deg, rgba(6,12,20,0.80) 0%, rgba(20,36,58,0.62) 100%),
        url('../../images/butterfly-effect.jpg') center 62% / cover no-repeat;
    background-color: var(--bf-dark);
    padding: 3.5rem 1rem 2.5rem;
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.hero-icon {
    height: 1.8rem;
    width: auto;
    vertical-align: middle;
    margin-right: 0.4rem;
    filter: drop-shadow(0 0 6px rgba(196,136,42,0.6));
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.7rem;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    margin-bottom: 0;
}


/* ══════════════════════════════════════════
   BODY / PAGE BACKGROUND
══════════════════════════════════════════ */
body {
    background: var(--bf-dark);
    color: rgba(255,255,255,0.85);
}


/* ══════════════════════════════════════════
   APP SECTION
══════════════════════════════════════════ */
#appSection {
    background: linear-gradient(180deg, var(--bf-dark) 0%, #020608 100%);
    padding: 2.5rem 1rem 4rem;
}


/* ══════════════════════════════════════════
   ABOUT / DETAILS PANEL
══════════════════════════════════════════ */
details.about-panel {
    background: var(--bf-card);
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    margin-bottom: 1.5rem;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

details.about-panel summary {
    cursor: pointer;
    font-style: italic;
    font-weight: 600;
    color: var(--bf-amber);
    font-size: 0.95rem;
    list-style: none;
}

details.about-panel summary::-webkit-details-marker { display: none; }

details.about-panel summary::before {
    content: '▶ ';
    font-size: 0.7em;
    opacity: 0.7;
}

details.about-panel[open] summary::before {
    content: '▼ ';
}

details.about-panel .about-body {
    padding-top: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.65;
}

details.about-panel .about-body strong {
    color: var(--bf-amber);
}


/* ══════════════════════════════════════════
   MAIN APP CARD
══════════════════════════════════════════ */
.bf-app-card {
    background: var(--bf-card);
    border: 1px solid var(--bf-border);
    border-radius: 10px;
    padding: 1.5rem;
    max-width: 860px;
    margin: 0 auto;
    box-shadow: 0 4px 28px rgba(0,0,0,0.60);
}


/* ══════════════════════════════════════════
   CONTROLS FORM
══════════════════════════════════════════ */
.bf-controls-form {
    margin-bottom: 1.25rem;
}

.bf-fieldset {
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    padding: 1rem 1.2rem 1.2rem;
}

.bf-fieldset legend {
    color: var(--bf-amber);
    font-family: 'Boogaloo', cursive;
    font-size: 1.05rem;
    padding: 0 0.5rem;
}

.bf-controls-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.bf-label {
    color: rgba(255,255,255,0.72);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

.bf-seed-input {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(196,136,42,0.35);
    border-radius: 6px;
    color: #fff;
    padding: 0.3rem 0.65rem;
    font-size: 0.92rem;
    width: 110px;
    transition: border-color 0.2s;
}

.bf-seed-input:focus {
    outline: none;
    border-color: var(--bf-amber);
    background: rgba(196,136,42,0.08);
}

.bf-seed-input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.bf-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-bf-primary,
.btn-bf-secondary {
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, opacity 0.2s;
}

.btn-bf-primary {
    background: var(--bf-amber);
    color: #000;
}

.btn-bf-primary:hover:not(:disabled) {
    background: #d4972f;
    transform: translateY(-1px);
}

.btn-bf-secondary {
    background: rgba(42,122,150,0.22);
    color: rgba(255,255,255,0.88);
    border: 1px solid rgba(42,122,150,0.4);
}

.btn-bf-secondary:hover:not(:disabled) {
    background: rgba(42,122,150,0.38);
    transform: translateY(-1px);
}

.btn-bf-primary:disabled,
.btn-bf-secondary:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
}


/* ══════════════════════════════════════════
   SLIDER ROW
══════════════════════════════════════════ */
.slider-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.slider-label {
    color: rgba(255,255,255,0.72);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

.slider-row input[type="range"] {
    flex: 1;
    min-width: 120px;
    accent-color: var(--bf-amber);
    cursor: pointer;
}

.slider-value {
    color: var(--bf-amber);
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    min-width: 6rem;
}


/* ══════════════════════════════════════════
   P5.JS CANVAS CONTAINER
══════════════════════════════════════════ */
#myCanvas {
    width: 100%;
    border: 2px solid var(--bf-amber-glow);
    border-radius: 6px;
    overflow: hidden;
    background: #040810;
    box-shadow: 0 0 22px rgba(196,136,42,0.14);
    margin: 0.5rem 0 1.25rem;
}

#myCanvas canvas {
    display: block;
    width: 100% !important;
}


/* ══════════════════════════════════════════
   TABULAR RESULTS
══════════════════════════════════════════ */
details.table-panel {
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.25rem;
}

details.table-panel summary {
    cursor: pointer;
    background: rgba(196,136,42,0.10);
    color: var(--bf-amber);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.55rem 1rem;
    list-style: none;
}

details.table-panel summary::-webkit-details-marker { display: none; }

details.table-panel summary::before {
    content: '▶ ';
    font-size: 0.7em;
    opacity: 0.7;
}

details.table-panel[open] summary::before {
    content: '▼ ';
}

#tableDisplay {
    max-height: 220px;
    overflow-y: auto;
    background: rgba(4,8,16,0.6);
}

#orderedPairsTable {
    border-collapse: collapse;
    width: 95%;
    margin: 0.5rem auto;
    font-size: 0.82rem;
}

#orderedPairsTable th {
    background: #b03020;
    color: #fff;
    text-align: center;
    padding: 4px 8px;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}

#orderedPairsTable td {
    border: 1px solid rgba(255,255,255,0.12);
    padding: 3px 8px;
    text-align: right;
    background: rgba(255,245,188,0.08);
    color: rgba(255,255,255,0.80);
}

#orderedPairsTable tr.created:hover td {
    background: rgba(196,136,42,0.12);
}

#orderedPairsTable tr.created {
    font-style: italic;
}

/* Copy-Die button — lives inside the sticky Die column header */
.btn-copy-die {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 5px;
    font-size: 0.68rem;
    line-height: 1.4;
    cursor: pointer;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 3px;
    vertical-align: middle;
}
.btn-copy-die:hover {
    background: rgba(196,136,42,0.40);
    border-color: var(--bf-amber);
}


/* ══════════════════════════════════════════
   SPARK BAR  (below hero, above app section)
══════════════════════════════════════════ */
.spark-bar {
    background: #040a10;
    padding: 0.5rem 1.2rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.4rem;
    border-bottom: 1px solid var(--bf-border);
}

.spark-bar a {
    color: var(--bf-amber);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
}

.spark-bar a:hover {
    color: #fff;
    text-decoration: underline;
}

.spark-bar span {
    color: rgba(255,255,255,0.38);
    font-size: 0.80rem;
    margin-left: auto;
}
