/* gamelicensor.pro // cyberpunk data-viz HUD */

:root {
    --void-black: #08080f;
    --deep-slate: #0d1117;
    --terminal-white: #e0e0e8;
    --grid-line: #1a2a3a;
    --compliance-cyan: #00d4ff;
    --warning-amber: #ffa726;
    --verified-green: #00e676;

    --display: 'Chakra Petch', 'Inter', sans-serif;
    --body: 'IBM Plex Sans', 'Inter', sans-serif;
    --mono: 'IBM Plex Mono', 'Space Mono', monospace;
}

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

html, body {
    background: var(--void-black);
    color: var(--terminal-white);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.65;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    position: relative;
    background-image:
        linear-gradient(rgba(26, 42, 58, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 42, 58, 0.18) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px;
    background-position: 0 0, 0 0;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 30%, rgba(0, 212, 255, 0.05), transparent 60%);
    z-index: 0;
}

/* Scanline overlay across full screen */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 2px,
        rgba(0, 212, 255, 0.015) 2px,
        rgba(0, 212, 255, 0.015) 3px
    );
    z-index: 1;
}

/* HUD viewport corner brackets */
.hud-corner {
    position: fixed;
    width: 28px;
    height: 28px;
    z-index: 50;
    pointer-events: none;
    transform-origin: center;
    opacity: 0;
    animation: hudBracketIn 0.4s ease-out 0.2s forwards;
}

.hud-corner--tl { top: 16px; left: 16px; border-top: 1px solid var(--compliance-cyan); border-left: 1px solid var(--compliance-cyan); }
.hud-corner--tr { top: 16px; right: 16px; border-top: 1px solid var(--compliance-cyan); border-right: 1px solid var(--compliance-cyan); }
.hud-corner--bl { bottom: 16px; left: 16px; border-bottom: 1px solid var(--compliance-cyan); border-left: 1px solid var(--compliance-cyan); }
.hud-corner--br { bottom: 16px; right: 16px; border-bottom: 1px solid var(--compliance-cyan); border-right: 1px solid var(--compliance-cyan); }

@keyframes hudBracketIn {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 0.85; transform: scale(1); }
}

/* Coordinate readouts */
.hud-coords {
    position: fixed;
    z-index: 50;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: rgba(0, 212, 255, 0.65);
    display: grid;
    grid-template-columns: auto auto;
    gap: 2px 8px;
    pointer-events: none;
    opacity: 0;
    animation: hudFadeIn 0.6s ease-out 0.6s forwards;
}

.hud-coords--tl { top: 28px; left: 56px; }
.hud-coords--tr { top: 28px; right: 56px; text-align: right; }

.hud-coords .coord-label { color: rgba(0, 212, 255, 0.4); }
.hud-coords .coord-value { color: rgba(0, 212, 255, 0.85); }

@keyframes hudFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Layout */
.terminal {
    position: relative;
    z-index: 5;
    padding: 80px 56px 16px;
    max-width: 1440px;
    margin: 0 auto;
}

.section {
    margin-bottom: 24px;
}

/* Generic panel */
.panel {
    position: relative;
    background: rgba(13, 17, 23, 0.85);
    border: 1px solid var(--grid-line);
    padding: 36px 40px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.panel-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    pointer-events: none;
}
.panel-corner--tl { top: -1px; left: -1px; border-top: 1px solid var(--compliance-cyan); border-left: 1px solid var(--compliance-cyan); }
.panel-corner--tr { top: -1px; right: -1px; border-top: 1px solid var(--compliance-cyan); border-right: 1px solid var(--compliance-cyan); }
.panel-corner--bl { bottom: -1px; left: -1px; border-bottom: 1px solid var(--compliance-cyan); border-left: 1px solid var(--compliance-cyan); }
.panel-corner--br { bottom: -1px; right: -1px; border-bottom: 1px solid var(--compliance-cyan); border-right: 1px solid var(--compliance-cyan); }

[data-panel] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

[data-panel].is-booted {
    opacity: 1;
    transform: translateY(0);
}

[data-panel]:hover {
    border-color: var(--compliance-cyan);
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.1);
}

[data-panel]:hover .panel-led {
    box-shadow: 0 0 12px var(--verified-green), 0 0 24px rgba(0, 230, 118, 0.6);
}

/* Section header */
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 4px 16px;
    color: rgba(224, 224, 232, 0.85);
}

.section-tag {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--compliance-cyan);
    border: 1px solid var(--grid-line);
    padding: 3px 8px;
    background: var(--deep-slate);
}

.section-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terminal-white);
}

.section-rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--grid-line), transparent);
}

.section-status {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--verified-green);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* === Hero / Command Center === */
.command-center {
    min-height: calc(100vh - 96px);
    display: flex;
    align-items: stretch;
}

.panel--hero {
    flex: 1;
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
        "meta crosshair"
        "title crosshair"
        "tagline tickers"
        "readout tickers";
    gap: 28px 56px;
    padding: 56px 64px;
    align-content: start;
}

.hero-meta {
    grid-area: meta;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    color: rgba(0, 212, 255, 0.85);
    text-transform: uppercase;
}

.meta-divider { color: rgba(0, 212, 255, 0.4); }
.meta-label { color: var(--terminal-white); }

.hero-title-wrap {
    grid-area: title;
    position: relative;
    overflow: hidden;
    padding: 8px 0;
}

.hero-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.5rem, 6.4vw, 5.6rem);
    letter-spacing: 0.08em;
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--terminal-white);
    position: relative;
    text-shadow:
        0 0 1px rgba(255, 255, 255, 0.2),
        0 0 22px rgba(0, 212, 255, 0.15);
    white-space: nowrap;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    animation: charIn 0.4s ease-out forwards;
    animation-delay: var(--d, 0ms);
}

.hero-title .char--dot {
    color: var(--compliance-cyan);
}

@keyframes charIn {
    to { opacity: 1; transform: translateY(0); }
}

.scan-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(to bottom, transparent, rgba(0, 212, 255, 0.45), transparent);
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.5);
    pointer-events: none;
    animation: scanSweep 3s linear 1.5s infinite;
}

@keyframes scanSweep {
    0% { transform: translateY(-20px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(110%); opacity: 0; }
}

.hero-line {
    grid-column: 1 / -1;
    height: 1px;
    background: var(--compliance-cyan);
    width: 0;
    align-self: start;
    margin-top: -12px;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
    animation: lineExtend 0.5s ease-out 1.4s forwards;
}

@keyframes lineExtend {
    from { width: 0; }
    to { width: 60%; }
}

.hero-tagline {
    grid-area: tagline;
    font-family: var(--body);
    font-size: clamp(0.95rem, 1.05vw, 1.1rem);
    color: rgba(224, 224, 232, 0.78);
    max-width: 52ch;
    line-height: 1.65;
    border-left: 2px solid var(--grid-line);
    padding-left: 18px;
}

.hero-readout {
    grid-area: readout;
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    display: grid;
    gap: 6px;
    color: var(--terminal-white);
}

.readout-row {
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.readout-key {
    color: rgba(0, 212, 255, 0.7);
    min-width: 140px;
}

.readout-sep {
    color: rgba(224, 224, 232, 0.3);
}

.readout-val {
    color: var(--terminal-white);
}

.readout-val--counter {
    color: var(--verified-green);
    font-variant-numeric: tabular-nums;
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    text-shadow: 0 0 12px rgba(0, 230, 118, 0.4);
}

#systemStatus.status-pending { color: var(--warning-amber); }
#systemStatus.status-active { color: var(--verified-green); }

.hero-crosshair {
    grid-area: crosshair;
    align-self: start;
    justify-self: end;
    opacity: 0.8;
    animation: spin 60s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hero-tickers {
    grid-area: tickers;
    display: grid;
    gap: 10px;
    align-content: end;
    padding-top: 8px;
}

.ticker-row {
    display: grid;
    grid-template-columns: 50px 1fr 50px;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: rgba(224, 224, 232, 0.7);
}

.ticker-key {
    color: rgba(0, 212, 255, 0.7);
}

.ticker-bar {
    position: relative;
    height: 6px;
    background: var(--deep-slate);
    border: 1px solid var(--grid-line);
    overflow: hidden;
}

.ticker-fill {
    display: block;
    height: 100%;
    width: var(--w, 0%);
    background: linear-gradient(to right, rgba(0, 212, 255, 0.3), var(--compliance-cyan));
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    transform-origin: left;
    animation: barIn 1s ease-out 1.6s backwards;
}

.ticker-fill--amber {
    background: linear-gradient(to right, rgba(255, 167, 38, 0.3), var(--warning-amber));
    box-shadow: 0 0 10px rgba(255, 167, 38, 0.4);
}

@keyframes barIn {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.ticker-val {
    text-align: right;
    color: var(--terminal-white);
    font-variant-numeric: tabular-nums;
}

/* === Trace connectors === */
.trace-wrap {
    height: 90px;
    margin: -8px 0;
    pointer-events: none;
    overflow: hidden;
}

.trace-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.trace-path {
    fill: none;
    stroke: var(--compliance-cyan);
    stroke-opacity: 0.4;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    transition: stroke-dashoffset 1.4s ease-out;
}

.trace-svg.is-drawn .trace-path {
    stroke-dashoffset: 0;
}

.trace-node {
    fill: var(--deep-slate);
    stroke: var(--compliance-cyan);
    stroke-width: 1.5;
    opacity: 0;
    transition: opacity 0.5s ease 1s;
}

.trace-svg.is-drawn .trace-node {
    opacity: 1;
}

/* === LED indicators === */
.led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.led--green {
    background: radial-gradient(circle at 30% 30%, #6dffac, var(--verified-green) 60%, #008f3d);
    box-shadow: 0 0 6px var(--verified-green), 0 0 14px rgba(0, 230, 118, 0.4);
    animation: ledPulse 2s ease-in-out infinite;
}

.led--amber {
    background: radial-gradient(circle at 30% 30%, #ffd28a, var(--warning-amber) 60%, #b87000);
    box-shadow: 0 0 6px var(--warning-amber), 0 0 14px rgba(255, 167, 38, 0.4);
    animation: ledPulse 2s ease-in-out infinite;
}

@keyframes ledPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.panel-led {
    position: absolute;
    top: 14px;
    right: 14px;
    transition: box-shadow 0.25s ease;
}

.inline-led {
    margin-right: 8px;
    vertical-align: 1px;
}

/* === Data Grid === */
.data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.panel--card {
    padding: 28px 28px 24px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
}

.card-id {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: rgba(0, 212, 255, 0.7);
    margin-bottom: 8px;
}

.card-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--terminal-white);
    margin-bottom: 10px;
}

.card-desc {
    font-family: var(--body);
    font-size: 0.88rem;
    color: rgba(224, 224, 232, 0.7);
    line-height: 1.55;
    flex: 1;
    margin-bottom: 16px;
}

.card-data {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    border-top: 1px solid var(--grid-line);
    padding-top: 14px;
    font-family: var(--mono);
    font-size: 0.74rem;
}

.card-data dt {
    color: rgba(0, 212, 255, 0.6);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    font-size: 0.65rem;
}

.card-data dd {
    color: var(--terminal-white);
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

.card-num {
    color: var(--compliance-cyan) !important;
    text-shadow: 0 0 6px rgba(0, 212, 255, 0.3);
}

.state-active {
    color: var(--verified-green) !important;
}

.state-pending {
    color: var(--warning-amber) !important;
}

/* === Pipeline === */
.panel--pipeline {
    padding: 40px 40px 32px;
}

.pipeline {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    position: relative;
    margin-bottom: 28px;
}

.pipeline::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        var(--grid-line) 0,
        var(--grid-line) 6px,
        transparent 6px,
        transparent 10px
    );
    z-index: 0;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-dot {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--grid-line);
    background: var(--deep-slate);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 0.95rem;
    color: rgba(224, 224, 232, 0.6);
    transition: all 0.3s ease;
    position: relative;
}

.step-num {
    letter-spacing: 0.05em;
}

.pipeline-step--done .step-dot {
    border-color: var(--verified-green);
    color: var(--verified-green);
    box-shadow: inset 0 0 12px rgba(0, 230, 118, 0.18);
}

.pipeline-step--done .step-dot::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1px solid rgba(0, 230, 118, 0.18);
}

.pipeline-step--active .step-dot {
    border-color: var(--compliance-cyan);
    color: var(--compliance-cyan);
    box-shadow:
        inset 0 0 12px rgba(0, 212, 255, 0.18),
        0 0 18px rgba(0, 212, 255, 0.4);
    animation: stepPulse 2s ease-in-out infinite;
}

@keyframes stepPulse {
    0%, 100% { box-shadow: inset 0 0 12px rgba(0, 212, 255, 0.18), 0 0 14px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: inset 0 0 16px rgba(0, 212, 255, 0.3), 0 0 28px rgba(0, 212, 255, 0.55); }
}

.step-label {
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--terminal-white);
}

.pipeline-step--active .step-label {
    color: var(--compliance-cyan);
}

.step-meta {
    font-family: var(--mono);
    font-size: 0.66rem;
    color: rgba(224, 224, 232, 0.5);
    letter-spacing: 0.04em;
    max-width: 16ch;
    line-height: 1.4;
}

.pipeline-readout {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    border-top: 1px solid var(--grid-line);
    padding-top: 18px;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.pipeline-readout .readout-key { min-width: auto; }

/* === Matrix table === */
.panel--matrix {
    padding: 32px 32px 24px;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--mono);
    font-size: 0.85rem;
}

.matrix-table th {
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-align: left;
    color: var(--compliance-cyan);
    padding: 10px 16px;
    border-bottom: 1px solid var(--grid-line);
    background: rgba(0, 212, 255, 0.04);
}

.matrix-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--grid-line);
    color: rgba(224, 224, 232, 0.85);
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
}

.matrix-table tbody tr {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.45s ease, transform 0.45s ease, background 0.25s ease;
}

.matrix-table tbody tr.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.matrix-table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.012);
}

.matrix-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.06);
}

.matrix-table tbody tr:hover td {
    color: var(--terminal-white);
}

.matrix-table tbody tr:last-child td {
    border-bottom: none;
}

/* === Footer === */
.system-footer {
    position: relative;
    z-index: 5;
    margin: 24px 56px 56px;
    padding: 14px 24px;
    border-top: 1px solid var(--grid-line);
    border-bottom: 1px solid var(--grid-line);
    background: var(--deep-slate);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    color: rgba(224, 224, 232, 0.6);
    text-transform: uppercase;
}

.footer-left { color: rgba(0, 212, 255, 0.6); }

.footer-center {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--verified-green);
    letter-spacing: 0.12em;
}

.footer-status-text {
    text-shadow: 0 0 8px rgba(0, 230, 118, 0.4);
}

.footer-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-right a {
    color: rgba(224, 224, 232, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing: 0.14em;
}

.footer-right a:hover {
    color: var(--compliance-cyan);
}

.dot-sep {
    color: rgba(224, 224, 232, 0.25);
}

/* === Responsive === */
@media (max-width: 1024px) {
    .terminal { padding: 80px 36px 16px; }
    .panel--hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "meta"
            "title"
            "tagline"
            "readout"
            "tickers"
            "crosshair";
        padding: 40px 36px;
    }
    .hero-crosshair { justify-self: start; }
    .data-grid { grid-template-columns: repeat(2, 1fr); }
    .pipeline { grid-template-columns: repeat(5, 1fr); gap: 0 8px; }
    .step-meta { font-size: 0.62rem; max-width: 12ch; }
}

@media (max-width: 720px) {
    .terminal { padding: 90px 20px 16px; }
    .hud-coords { font-size: 0.62rem; }
    .hud-coords--tl { left: 44px; }
    .hud-coords--tr { right: 44px; }
    .panel { padding: 24px 22px; }
    .panel--hero { padding: 32px 24px; gap: 18px; }
    .data-grid { grid-template-columns: 1fr; }
    .pipeline {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .pipeline::before { display: none; }
    .pipeline-step {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        gap: 14px;
        padding-left: 8px;
        border-left: 1px dashed var(--grid-line);
    }
    .step-meta { max-width: none; }
    .system-footer {
        margin: 16px 20px 28px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .matrix-table { font-size: 0.74rem; }
    .matrix-table th, .matrix-table td { padding: 8px 10px; }
    .trace-wrap { display: none; }
}
