/* ==========================================================================
   Terminal — a console window. Green phosphor on black, scanlines, and a
   blinking cursor wherever output is still being produced.
   ========================================================================== */

:root {
    --bg: #05080a;
    --panel: #0a1014;
    --green: #4ade80;
    --green-2: #86efac;
    --dim: #3f7a56;
    --amber: #fbbf24;
    --red: #f87171;
    --cyan: #22d3ee;
    --wa: #16a34a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--green);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Scanline overlay across the whole viewport. */
.scan {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px);
    pointer-events: none;
}

.shell { max-width: 1000px; margin: 22px auto; padding: 0 12px 40px; }

/* --------------------------------------------------------------- window */

.bar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: #16211d; border: 1px solid #1e3a2c; border-bottom: 0; border-radius: 8px 8px 0 0; }
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.dots i:nth-child(2) { background: #f59e0b; }
.dots i:nth-child(3) { background: #22c55e; }
.bar .title { color: #7ea690; font-size: 12.5px; letter-spacing: .5px; }
.bar-links { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.bar-links a { padding: 3px 10px; border: 1px solid #1e3a2c; border-radius: 4px; color: var(--dim); font-size: 12px; }
.bar-links a:hover, .bar-links a.on { background: var(--green); border-color: var(--green); color: #05080a; text-decoration: none; }

.screen {
    padding: 18px 16px 26px;
    background: var(--panel);
    border: 1px solid #1e3a2c;
    border-radius: 0 0 8px 8px;
    box-shadow: inset 0 0 90px rgba(74, 222, 128, .06);
}

.banner { color: var(--dim); font-size: 9px; line-height: 1.15; overflow-x: auto; }

/* --------------------------------------------------------------- lines */

.cmd { margin-top: 18px; color: var(--green-2); font-size: 14px; word-break: break-word; }
.cmd .ps1 { color: var(--cyan); }
.cmd.end { margin-top: 22px; }

.line { font-size: 14px; word-break: break-word; }
.line.dim { color: var(--dim); }
.line.out { color: var(--green-2); }
.line.warn { color: var(--amber); }
.line.warn a { color: var(--amber); }

/* Blinking cursor — the one animated thing that is genuinely "terminal". */
.cur { display: inline-block; width: 8px; height: 15px; margin-left: 4px; background: var(--green); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.cur.block { width: 10px; height: 17px; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------------------------------------------------------------- hero */

.hero { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 8px; padding: 16px; background: rgba(74, 222, 128, .05); border: 1px solid #1e3a2c; border-left: 3px solid var(--green); border-radius: 6px; }
.hero-l { flex: 1 1 240px; display: grid; grid-template-columns: 62px 1fr; gap: 2px 10px; align-content: start; }
.hero-l .k { color: var(--dim); font-size: 12px; }
.hero-l .v { color: var(--green-2); font-size: 15px; font-weight: bold; word-break: break-word; }
.hero-l .k:first-child + .v { font-size: 21px; letter-spacing: 1px; }

.hero-r { flex: 0 1 200px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.hero-r .big { font-size: 62px; font-weight: bold; line-height: 1; color: var(--green-2); text-shadow: 0 0 22px rgba(74, 222, 128, .55); }
.hero-r .ok { color: var(--dim); font-size: 12px; }
.hero-r .run { color: var(--amber); font-size: 13px; }

/* Block-character progress bar; blocks light up in sequence. */
.bar-blocks { display: flex; gap: 3px; margin-bottom: 6px; }
.bar-blocks i { width: 14px; height: 20px; background: #143024; border: 1px solid #1e3a2c; animation: fill 1.6s linear infinite; }
.bar-blocks i:nth-child(1) { animation-delay: 0s; }
.bar-blocks i:nth-child(2) { animation-delay: .1s; }
.bar-blocks i:nth-child(3) { animation-delay: .2s; }
.bar-blocks i:nth-child(4) { animation-delay: .3s; }
.bar-blocks i:nth-child(5) { animation-delay: .4s; }
.bar-blocks i:nth-child(6) { animation-delay: .5s; }
.bar-blocks i:nth-child(7) { animation-delay: .6s; }
.bar-blocks i:nth-child(8) { animation-delay: .7s; }
.bar-blocks i:nth-child(9) { animation-delay: .8s; }
.bar-blocks i:nth-child(10) { animation-delay: .9s; }
@keyframes fill { 0%, 60% { background: #143024; } 20% { background: var(--amber); } }

/* ---------------------------------------------------------------- list */

.list { margin-top: 6px; }

.li {
    display: flex;
    align-items: baseline;
    gap: 9px;
    padding: 9px 8px;
    border-bottom: 1px dashed #16311f;
    opacity: 0;
    animation: typein .3s ease forwards;
    animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes typein { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.li:hover { background: rgba(74, 222, 128, .06); }
.li .t { flex: 0 0 auto; color: var(--dim); font-size: 12.5px; }

/* Game name is the loudest thing on the row. */
.li .n { flex: 0 0 auto; color: #eafff2; font-size: 18px; font-weight: bold; letter-spacing: 1px; text-shadow: 0 0 14px rgba(74, 222, 128, .4); }

.li .lead { flex: 1 1 30px; min-width: 14px; border-bottom: 1px dotted #1e4630; transform: translateY(-4px); }
.li .p { flex: 0 0 auto; color: var(--dim); font-size: 15px; }
.li .arrow { flex: 0 0 auto; color: #1e6b45; }
.li .r { flex: 0 0 auto; min-width: 52px; color: var(--green-2); font-size: 22px; font-weight: bold; text-align: right; }
.li .r.pend { min-width: 0; color: var(--amber); font-size: 13px; font-weight: normal; }
.li .r.pend .cur { background: var(--amber); height: 12px; width: 7px; }
.li .go { flex: 0 0 auto; color: #2a6f8f; font-size: 12px; }
.li.is-wait { background: rgba(251, 191, 36, .04); }

/* --------------------------------------------------------------- block */

.block { margin-top: 8px; padding: 14px 16px; background: #071013; border: 1px solid #1e3a2c; border-radius: 6px; }
.conf-h { color: var(--cyan); font-size: 15px; font-weight: bold; }
.conf-l { color: var(--green-2); font-size: 14px; word-break: break-word; }
.conf-c { margin-top: 8px; color: var(--dim); font-size: 13px; }
.conf-btns { margin-top: 12px; }

.btn { display: inline-block; margin-right: 8px; padding: 8px 18px; background: var(--wa); border-radius: 4px; color: #04140a; font-size: 13px; font-weight: bold; }
.btn:hover { text-decoration: none; opacity: .9; }
.btn.tg { background: var(--cyan); color: #04141a; }

/* ---------------------------------------------------------- week table */

.rec-wrap { margin-top: 8px; overflow-x: auto; border: 1px solid #1e3a2c; border-radius: 6px; }
.rec { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rec th, .rec td { padding: 8px 10px; border-bottom: 1px solid #12271b; text-align: center; white-space: nowrap; }
.rec thead th { background: #0c1a13; color: var(--cyan); font-size: 12px; font-weight: bold; letter-spacing: 1px; }
.rec tbody td { color: var(--green-2); }
.rt-date { color: var(--dim); }
.rt-dash { color: #1e4630; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 8px; }
.step { padding: 14px; background: #071013; border: 1px solid #1e3a2c; border-left: 3px solid var(--cyan); border-radius: 6px; }
.step .sn { color: var(--cyan); font-size: 12px; }
.step b { display: block; color: var(--green-2); font-size: 15px; }
.step span { color: var(--dim); font-size: 13px; }

/* ------------------------------------------------------------------- faq */

.faq-item { margin-top: 6px; border-left: 2px solid #1e3a2c; }
.faq-q { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 8px 12px; background: none; border: 0; color: var(--green-2); font-family: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.faq-q:hover { background: rgba(74, 222, 128, .05); }
.faq-ico { color: var(--cyan); font-style: normal; }
.faq-item.open .faq-ico { color: var(--amber); }
.faq-a { display: none; padding: 0 12px 10px 32px; color: var(--dim); font-size: 13.5px; }
.faq-item.open .faq-a { display: block; }

/* --------------------------------------------------------------- article */

.article { margin-top: 10px; padding: 14px 16px; background: #071013; border: 1px solid #12271b; border-radius: 6px; }
.article h4 { margin-bottom: 8px; color: var(--cyan); font-size: 15px; }
.article p { margin-bottom: 9px; color: #9fd4b6; font-size: 13.5px; line-height: 1.75; }
.article p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- footer */

.foot { margin-top: 24px; padding-top: 14px; border-top: 1px dashed #1e3a2c; }
.foot p { color: var(--dim); font-size: 12.5px; word-break: break-word; }

.fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; background: var(--wa); border-radius: 8px; box-shadow: 0 0 24px rgba(22, 163, 74, .5); color: #04140a; }

/* ------------------------------------------------------------ chart page */

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 13px; background: #071013; border: 1px solid #1e3a2c; border-radius: 6px; }
.filters select, .filters input { padding: 8px 10px; background: #0c1a13; border: 1px solid #1e3a2c; border-radius: 4px; color: var(--green-2); font-family: inherit; font-size: 13px; }
.btn-sm { display: inline-block; padding: 8px 16px; background: var(--green); border: 0; border-radius: 4px; color: #05080a; font-family: inherit; font-size: 13px; font-weight: bold; cursor: pointer; }
.btn-sm.ghost { background: none; border: 1px solid #1e3a2c; color: var(--dim); }
.btn-sm:hover { text-decoration: none; }

@media (max-width: 640px) {
    .li { flex-wrap: wrap; gap: 6px 8px; }
    .li .n { flex: 1 1 100%; font-size: 17px; }
    .li .lead { display: none; }
    .li .r { margin-left: auto; }
    .hero-r .big { font-size: 48px; }
    .banner { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; }
    .li { opacity: 1; }
}
