/*
    TNT | Cross Training — Setters & Encapsulation (Concept #7)
    Flash-themed: red #D81827, gold #FFD700
*/

/* ── Design tokens ────────────────────────────────────────────────────── */
:root {
    --flash-red:      #D81827;
    --flash-yellow:   #FFD700;
    --flash-dark:     #0a0e1a;
    --flash-panel:    #141a2e;
    --code-bg:        #0d1117;
    --code-text:      #e6edf3;
    --code-comment:   #8b949e;
    --code-keyword:   #ff7b72;
    --code-string:    #a5d6ff;
    --code-number:    #79c0ff;
    --code-fn:        #d2a8ff;
    --code-class:     #ffa657;
}

/* ── Back bar ─────────────────────────────────────────────────────────── */
.setter-back-bar {
    background: var(--flash-dark);
    padding: 0.55rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 2px solid var(--flash-red);
    font-size: 0.88rem;
}
.setter-back-bar a {
    color: var(--flash-yellow);
    font-weight: 700;
    text-decoration: none;
}
.setter-back-bar a:hover { text-decoration: underline; }
.setter-back-concept {
    color: rgba(255,255,255,0.35);
    font-size: 0.80rem;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
/* Hero background image: images/flashHeroBackground.jpg (user supplied) */
#setterHero {
    min-height: 65vh;
    background:
        linear-gradient(135deg, rgba(10,14,26,0.88) 0%, rgba(168,10,22,0.68) 100%),
        url('images/flashRunning.jpg') center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 1rem 4rem;
    color: #fff;
}

.setter-hero-content { max-width: 840px; }

.setter-eyebrow {
    font-size: 0.74rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--flash-yellow);
    opacity: 0.85;
    margin-bottom: 0.75rem;
}

.setter-hero-title {
    font-family: 'Boogaloo', cursive;
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    line-height: 1.12;
    margin-bottom: 1.1rem;
}

.setter-hero-subtitle {
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    color: rgba(255,255,255,0.72);
    line-height: 1.72;
    margin-bottom: 2.25rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.setter-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.btn-setter-primary {
    background: var(--flash-red);
    color: #fff;
    border: none;
    font-family: 'Boogaloo', cursive;
    font-size: 1.15rem;
    padding: 0.6rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s, transform 0.15s;
}
.btn-setter-primary:hover {
    background: #a80c18;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-setter-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,215,0,0.55);
    font-family: 'Boogaloo', cursive;
    font-size: 1.15rem;
    padding: 0.6rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.btn-setter-secondary:hover {
    background: rgba(255,215,0,0.12);
    border-color: var(--flash-yellow);
    color: var(--flash-yellow);
    text-decoration: none;
    transform: translateY(-2px);
}

/* ── Section chrome (labels, titles) ─────────────────────────────────── */
.setter-section-label {
    font-size: 0.72rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.setter-section-title {
    font-family: 'Boogaloo', cursive;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    margin-bottom: 1.25rem;
}

.concept-badge {
    display: inline-block;
    background: var(--flash-red);
    color: #fff;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
}

/* ── Note / callout boxes ─────────────────────────────────────────────── */
.note-box {
    background: rgba(26,92,138,0.09);
    border-left: 4px solid #1a5c8a;
    border-radius: 0 8px 8px 0;
    padding: 0.85rem 1.1rem;
    font-size: 0.875rem;
    color: #444;
    line-height: 1.65;
    margin-top: 1.5rem;
}
.note-box strong { color: #1a5c8a; }

.insight-box {
    background: rgba(216,24,39,0.10);
    border: 1.5px solid rgba(216,24,39,0.32);
    border-radius: 12px;
    padding: 1.1rem 1.4rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.68;
}
.insight-box strong { color: var(--flash-yellow); }

/* ── Section 1: The Object You Already Know ──────────────────────────── */
#theObject {
    background: #f4f5f7;
    padding: 5rem 0;
}
#theObject .setter-section-label { color: var(--flash-red); }
#theObject .setter-section-title { color: #0a0e1a; }
#theObject > .container > .row > div > p {
    font-size: 0.96rem;
    color: #444;
    line-height: 1.77;
}

.object-bridge-card {
    background: #fff;
    border: 1.5px solid #e2e4e8;
    border-top: 4px solid var(--flash-red);
    border-radius: 14px;
    padding: 1.4rem 1.3rem;
    height: 100%;
}
.object-bridge-card .obc-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.object-bridge-card h3 {
    font-family: 'Boogaloo', cursive;
    font-size: 1.14rem;
    color: #0a0e1a;
    margin-bottom: 0.4rem;
}
.object-bridge-card p { font-size: 0.875rem; color: #555; line-height: 1.62; margin: 0; }
.object-bridge-card code {
    background: #f0f0f0;
    border-radius: 3px;
    padding: 0.1rem 0.3rem;
    font-size: 0.82rem;
    color: var(--flash-red);
}

/* Attribute mapping table */
.attr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.attr-table th {
    background: #0a0e1a;
    color: #fff;
    padding: 0.55rem 0.85rem;
    text-align: left;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.attr-table td {
    padding: 0.48rem 0.85rem;
    border-bottom: 1px solid #e2e4e8;
    color: #333;
    vertical-align: middle;
}
.attr-table tr:last-child td { border-bottom: none; }
.attr-table tr:hover td { background: rgba(216,24,39,0.03); }
.attr-table code {
    background: #f0f0f0;
    border-radius: 3px;
    padding: 0.1rem 0.3rem;
    font-size: 0.80rem;
    color: var(--flash-red);
}

/* ── Section 2: Two Ways to Set ──────────────────────────────────────── */
#twoWays {
    background: var(--flash-dark);
    padding: 5rem 0;
    color: #fff;
}
#twoWays .setter-section-label { color: var(--flash-yellow); }
#twoWays .setter-section-title { color: #fff; }

.lang-panel {
    background: var(--flash-panel);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lang-panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.lang-panel-header.js-header   { background: rgba(247,223,30,0.07);  border-left: 4px solid #f7df1e; }
.lang-panel-header.java-header { background: rgba(90,200,245,0.07);  border-left: 4px solid #5ac8f5; }

.lang-panel-icon { font-size: 1.5rem; line-height: 1; }
.lang-panel-name {
    font-family: 'Boogaloo', cursive;
    font-size: 1.22rem;
    color: #fff;
}
.lang-panel-tagline {
    font-size: 0.73rem;
    color: rgba(255,255,255,0.38);
    margin-top: 0.08rem;
    font-style: italic;
}

.lang-panel-body {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.lang-panel-body > p {
    font-size: 0.845rem;
    color: rgba(255,255,255,0.60);
    line-height: 1.62;
    margin-bottom: 1rem;
}

/* ── Code blocks ─────────────────────────────────────────────────────── */
pre.ct-code {
    background: var(--code-bg);
    border-radius: 10px;
    padding: 1.1rem 1.2rem;
    overflow-x: auto;
    margin: 0;
    font-size: 0.81rem;
    line-height: 1.68;
    color: var(--code-text);
    font-family: 'Consolas', 'Courier New', monospace;
    border: 1px solid rgba(255,255,255,0.06);
    flex: 1;
}

pre.ct-code .kw  { color: var(--code-keyword); }
pre.ct-code .str { color: var(--code-string);  }
pre.ct-code .cmt { color: var(--code-comment); }
pre.ct-code .num { color: var(--code-number);  }
pre.ct-code .fn  { color: var(--code-fn);      }
pre.ct-code .cls { color: var(--code-class);   }

/* Highlighted line: full-width yellow stripe */
pre.ct-code .hl {
    display: block;
    background: rgba(255,215,0,0.09);
    border-left: 3px solid var(--flash-yellow);
    margin-left: -1.2rem;
    margin-right: -1.2rem;
    padding-left: calc(1.2rem - 3px);
    padding-right: 1.2rem;
}

/* ── Section 3: The Side Effect Problem ──────────────────────────────── */
#sideEffects {
    background: #111827;
    padding: 5rem 0;
    color: #fff;
}
#sideEffects .setter-section-label { color: var(--flash-yellow); }
#sideEffects .setter-section-title { color: #fff; }
#sideEffects > .container > .row > div > p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.70);
    line-height: 1.77;
}
#sideEffects code {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    padding: 0.1rem 0.35rem;
    font-size: 0.85em;
    color: #ffa657;
}

.se-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
}
@media (max-width: 767px) {
    .se-comparison { grid-template-columns: 1fr; }
}

.se-panel { border-radius: 12px; overflow: hidden; }

.se-label {
    padding: 0.55rem 1rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.se-label.danger { background: rgba(190,30,30,0.88);  color: #fff; }
.se-label.safe   { background: rgba(22,130,70,0.88);  color: #fff; }

.se-panel pre.ct-code {
    border-radius: 0 0 10px 10px;
    border-top: none;
}

/* ── Section 4: Try It Live ───────────────────────────────────────────── */
#tryItLive {
    background: var(--flash-dark);
    padding: 4rem 0;
}

.live-demo-callout {
    background: linear-gradient(135deg, rgba(216,24,39,0.16) 0%, rgba(255,215,0,0.06) 100%);
    border: 1.5px solid rgba(255,215,0,0.22);
    border-radius: 20px;
    padding: 2.75rem 2rem;
    text-align: center;
    max-width: 740px;
    margin: 0 auto;
}

.live-demo-callout .bolt-icon {
    font-size: 3.2rem;
    display: block;
    margin-bottom: 0.9rem;
}

.live-demo-callout h2 {
    font-family: 'Boogaloo', cursive;
    font-size: clamp(1.6rem, 3.5vw, 2rem);
    color: var(--flash-yellow);
    margin-bottom: 0.75rem;
}

.live-demo-callout p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.68);
    line-height: 1.72;
    margin-bottom: 1.5rem;
}

.live-demo-callout code {
    background: rgba(255,255,255,0.10);
    border-radius: 4px;
    padding: 0.1em 0.45em;
    font-size: 0.88em;
    color: #ffa657;
    white-space: nowrap;
}

.btn-live {
    background: var(--flash-yellow);
    color: #0a0e1a;
    font-family: 'Boogaloo', cursive;
    font-size: 1.15rem;
    padding: 0.6rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s;
}
.btn-live:hover {
    background: #e6c200;
    color: #0a0e1a;
    text-decoration: none;
    transform: translateY(-2px);
}

/* ── Section 5: Language Summary ─────────────────────────────────────── */
#langSummary {
    background: #f4f5f7;
    padding: 4.5rem 0;
}
#langSummary .setter-section-label { color: var(--flash-red); }
#langSummary .setter-section-title { color: #0a0e1a; }

.lang-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.lang-summary-table th {
    background: #0a0e1a;
    color: #fff;
    padding: 0.72rem 1rem;
    text-align: left;
    font-size: 0.76rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.lang-summary-table td {
    padding: 0.72rem 1rem;
    border-bottom: 1px solid #e2e4e8;
    vertical-align: top;
    line-height: 1.62;
    color: #333;
}
.lang-summary-table tr:last-child td { border-bottom: none; }
.lang-summary-table tr:hover td { background: rgba(216,24,39,0.03); }
.lang-summary-table td:first-child { font-weight: 600; color: #0a0e1a; }
.lang-summary-table code {
    background: #f0f0f0;
    border-radius: 3px;
    padding: 0.1rem 0.32rem;
    font-size: 0.82rem;
    color: var(--flash-red);
}

.py-later-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(74,222,128,0.10);
    border: 1px solid rgba(74,222,128,0.32);
    border-radius: 50px;
    padding: 0.22rem 0.75rem;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #4ade80;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Copy button ──────────────────────────────────────────────────────── */
.setter-copy-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.50);
    border-radius: 6px;
    padding: 0.18rem 0.55rem;
    font-size: 0.70rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    font-family: inherit;
    line-height: 1.4;
    flex-shrink: 0;
    margin-left: auto;
}
.setter-copy-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
    border-color: rgba(255,255,255,0.28);
}
.setter-copy-btn.copied {
    background: rgba(39,174,96,0.18);
    color: #4ade80;
    border-color: rgba(74,222,128,0.50);
}

/* ── Driver panel (hljs-highlighted code block) ───────────────────────── */
.driver-panel pre {
    margin: 0;
    background: #0d1117 !important;
}
.driver-panel pre code.hljs {
    padding: 1.1rem 1.2rem;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.81rem;
    line-height: 1.68;
}

/* ── Lang panel footer ────────────────────────────────────────────────── */
.lang-panel-footer {
    padding: 0.65rem 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.76rem;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
}
.lang-panel-footer a {
    color: #5ac8f5;
    font-weight: 400;
    text-decoration: underline;
}
.lang-panel-footer a:hover { color: #E69F4D; }
