/* ================================================================
   UNIVERSIDAD CENTRAL — PÁGINA DE MANTENIMIENTO
   style.css — Diseño Futurista Premium v1.0
   Paleta: #183c5a | #6abdbc | #d7de4f | #da4357
   ================================================================ */

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
    /* UC Official Palette */
    --uc-navy:   #183c5a;
    --uc-teal:   #6abdbc;
    --uc-lime:   #d7de4f;
    --uc-red:    #da4357;

    /* Extended dark palette */
    --bg-darkest: #020810;
    --bg-dark:    #040c16;
    --bg-deep:    #0a1e2e;
    --bg-mid:     #0f2d42;

    /* Glass */
    --glass-bg:     rgba(15, 45, 66, 0.40);
    --glass-border: rgba(106, 189, 188, 0.18);
    --glass-hover:  rgba(106, 189, 188, 0.32);

    /* Text */
    --text-primary:   #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.68);
    --text-muted:     rgba(255, 255, 255, 0.36);

    /* Glow */
    --glow-teal: rgba(106, 189, 188, 0.55);
    --glow-lime: rgba(215, 222, 79, 0.55);
    --glow-red:  rgba(218, 67, 87, 0.55);

    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    /* Spacing scale */
    --sp-xs:  0.25rem;
    --sp-sm:  0.5rem;
    --sp-md:  1rem;
    --sp-lg:  1.5rem;
    --sp-xl:  2rem;
    --sp-2xl: 3rem;
    --sp-3xl: 4.5rem;

    /* Border radius */
    --r-sm:   4px;
    --r-md:   8px;
    --r-lg:   16px;
    --r-xl:   24px;
    --r-full: 9999px;

    /* Transitions */
    --t-fast: 150ms ease;
    --t-mid:  300ms ease;
    --t-slow: 600ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    background: var(--bg-darkest);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}
img  { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--sp-xl);
}

/* ── Particle Canvas ─────────────────────────────────────────── */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── Animated Grid Overlay ───────────────────────────────────── */
.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(106, 189, 188, 0.038) 1px, transparent 1px),
        linear-gradient(90deg, rgba(106, 189, 188, 0.038) 1px, transparent 1px);
    background-size: 64px 64px;
    animation: gridDrift 30s linear infinite;
}
.grid-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 70% at 50% 40%, transparent 30%, var(--bg-darkest) 100%);
}
@keyframes gridDrift {
    0%   { background-position: 0 0; }
    100% { background-position: 64px 64px; }
}

/* ═════════════════════════════════════════════════════════════
   HEADER
   ═════════════════════════════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: var(--sp-md) 0;
    background: linear-gradient(to bottom, rgba(4,12,22,0.96) 60%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--glass-border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-md);
}
.uc-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    /* Logo is white on transparent – glow effect on hover */
    transition: filter var(--t-mid), transform var(--t-mid);
    filter: drop-shadow(0 0 0px transparent);
}
.uc-logo:hover {
    filter: drop-shadow(0 0 10px var(--uc-teal));
    transform: scale(1.04);
}

/* Status badge */
.status-badge {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-xs) var(--sp-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-full);
    backdrop-filter: blur(8px);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    position: relative;
}
.pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--uc-red);
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--uc-red);
}
.pulse-ring {
    position: absolute;
    left: var(--sp-md);
    width: 8px; height: 8px;
    border-radius: 50%;
    border: 2px solid var(--uc-red);
    animation: pulseRing 2.2s ease-out infinite;
}
@keyframes pulseRing {
    0%   { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(3.5); opacity: 0; }
}

/* ═════════════════════════════════════════════════════════════
   MAIN / HERO
   ═════════════════════════════════════════════════════════════ */
.site-main {
    position: relative;
    z-index: 10;
    padding-top: 88px;
}
.hero-section {
    min-height: calc(100vh - 88px);
    display: flex;
    align-items: center;
    padding: var(--sp-2xl) 0;
}
.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--sp-xl);
}
/* Staggered fade-in for hero children */
.hero-inner > * {
    opacity: 0;
    animation: fadeInUp 0.7s ease forwards;
}
.hero-inner > *:nth-child(1) { animation-delay: 0.1s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.25s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.40s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.55s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.70s; }
.hero-inner > *:nth-child(6) { animation-delay: 0.85s; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Gear Animation ──────────────────────────────────────────── */
.gear-animation {
    position: relative;
    width: 130px; height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gear { position: absolute; }
.gear-lg {
    width: 82px; height: 82px;
    top: 8px; left: 8px;
    color: var(--uc-teal);
}
.gear-sm {
    width: 50px; height: 50px;
    bottom: 2px; right: 2px;
    color: var(--uc-lime);
}
.gear-svg { animation: gearSpin 5s linear infinite; filter: drop-shadow(0 0 8px currentColor); }
.gear-sm .gear-svg { animation: gearSpinRev 3.5s linear infinite; }
@keyframes gearSpin    { to { transform: rotate( 360deg); } }
@keyframes gearSpinRev { to { transform: rotate(-360deg); } }

.circuit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(106, 189, 188, 0.22);
    border-top-color: var(--uc-teal);
    animation: spinRing 3s linear infinite;
}
.circuit-ring-2 {
    inset: 10px;
    border-color: rgba(215, 222, 79, 0.15);
    border-bottom-color: var(--uc-lime);
    animation: spinRing 5s linear infinite reverse;
}
@keyframes spinRing { to { transform: rotate(360deg); } }

/* ── Glitch Title ────────────────────────────────────────────── */
.glitch-title {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 5vw, 3.6rem);
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    line-height: 1.1;
    color: var(--text-primary);
    position: relative;
    text-shadow: 0 0 40px rgba(106, 189, 188, 0.25);
    user-select: none;
}
.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; right: 0;
    overflow: hidden;
}
.glitch-title::before {
    color: var(--uc-teal);
    clip-path: polygon(0 0, 100% 0, 100% 32%, 0 32%);
    animation: glitch1 5s infinite;
}
.glitch-title::after {
    color: var(--uc-red);
    clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
    animation: glitch2 5s infinite;
}
@keyframes glitch1 {
    0%,80%,100% { transform: none; opacity: 0; }
    82% { transform: translateX(-5px) skewX(-4deg); opacity: 0.85; }
    84% { transform: translateX(5px)  skewX(4deg);  opacity: 0.85; }
    86% { transform: translateX(-3px); opacity: 0.85; }
    88% { transform: none; opacity: 0; }
}
@keyframes glitch2 {
    0%,80%,100% { transform: none; opacity: 0; }
    81% { transform: translateX(5px)  skewX(4deg);  opacity: 0.75; }
    83% { transform: translateX(-5px) skewX(-4deg); opacity: 0.75; }
    85% { transform: translateX(2px); opacity: 0.75; }
    87% { transform: none; opacity: 0; }
}

/* ── Typewriter ──────────────────────────────────────────────── */
.hero-subtitle {
    font-family: var(--font-mono);
    font-size: clamp(0.78rem, 2vw, 1rem);
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    min-height: 1.6em;
}
.cursor {
    color: var(--uc-teal);
    animation: blink 1s step-end infinite;
    font-weight: 700;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Progress System ─────────────────────────────────────────── */
.progress-system {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: var(--sp-lg);
}
.progress-modules {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-sm);
}
.prog-module {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-md);
    padding: var(--sp-sm) var(--sp-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(8px);
    transition: border-color var(--t-mid), transform var(--t-mid);
}
.prog-module:hover {
    transform: translateY(-3px);
    border-color: rgba(106, 189, 188, 0.45);
}
.prog-icon { font-size: 1.1rem; }
.prog-name {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.prog-tag {
    font-size: 0.6rem;
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 2px 9px;
    border-radius: var(--r-full);
}
.prog-tag.done {
    background: rgba(106,189,188,.12);
    color: var(--uc-teal);
    border: 1px solid rgba(106,189,188,.3);
}
.prog-tag.active {
    background: rgba(215,222,79,.12);
    color: var(--uc-lime);
    border: 1px solid rgba(215,222,79,.3);
    animation: tagPulse 1.5s ease-in-out infinite;
}
.prog-tag.pending {
    background: rgba(255,255,255,.04);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,.08);
}
@keyframes tagPulse { 0%,100% { opacity:1; } 50% { opacity:.45; } }

/* Progress bar */
.progress-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}
.progress-track {
    width: 100%;
    height: 7px;
    background: rgba(255,255,255,.07);
    border-radius: var(--r-full);
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--uc-teal), var(--uc-lime));
    border-radius: var(--r-full);
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--glow-teal);
    position: relative;
}
.progress-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
    animation: shimmer 2.8s ease-in-out infinite;
}
@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(500%); }
}
.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.progress-label {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.progress-pct {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--uc-lime);
}

/* ── HUD Timer ───────────────────────────────────────────────── */
.hud-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-lg) var(--sp-2xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-xl);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}
.hud-timer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--uc-teal), transparent);
}
.hud-timer::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(106,189,188,.3), transparent);
}
.hud-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--uc-teal);
}
.hud-display {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
}
.hud-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.hud-value {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 7vw, 4rem);
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
    text-shadow: 0 0 25px rgba(106,189,188,.55);
    min-width: 2.2ch;
    text-align: center;
}
.hud-unit-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    text-transform: uppercase;
}
.hud-sep {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 7vw, 4rem);
    font-weight: 700;
    color: var(--uc-teal);
    line-height: 1;
    align-self: flex-start;
    margin-top: 2px;
    animation: blink 1s step-end infinite;
}

/* ── CTA Button ──────────────────────────────────────────────── */
.cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
}
.cta-game-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform var(--t-mid), box-shadow var(--t-mid);
}
.cta-game-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 24px 48px rgba(106,189,188,.22),
        0 0 0 1px var(--uc-teal),
        0 0 30px rgba(106,189,188,.1) inset;
}
.cta-game-btn:active {
    transform: translateY(-1px) scale(0.99);
}
.cta-btn-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-mid), var(--uc-navy));
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    transition: border-color var(--t-mid);
}
.cta-game-btn:hover .cta-btn-bg {
    border-color: var(--uc-teal);
}
.cta-btn-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-2xl);
}
.cta-icon { font-size: 1.5rem; }
.cta-text {
    font-family: var(--font-display);
    font-size: clamp(0.85rem, 2.5vw, 1.05rem);
    font-weight: 700;
    letter-spacing: 0.06em;
}
.cta-tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 3px 10px;
    border-radius: var(--r-full);
    background: rgba(106,189,188,.14);
    color: var(--uc-teal);
    border: 1px solid rgba(106,189,188,.3);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
/* Shine sweep on hover */
.cta-btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
    transform: skewX(-20deg);
    transition: left 0.55s ease;
}
.cta-game-btn:hover .cta-btn-shine { left: 160%; }
.cta-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
}

/* ═════════════════════════════════════════════════════════════
   INFO SECTION
   ═════════════════════════════════════════════════════════════ */
.info-section {
    padding: var(--sp-3xl) 0;
    position: relative;
    z-index: 10;
}
.info-section::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin-bottom: var(--sp-3xl);
}
.info-title {
    font-family: var(--font-display);
    font-size: clamp(0.85rem, 2.5vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--sp-xl);
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg);
}

/* Glass card */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-xl);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.info-card {
    padding: var(--sp-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-md);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform var(--t-mid), border-color var(--t-mid), box-shadow var(--t-mid);
}
.info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--uc-teal), transparent);
    opacity: 0;
    transition: opacity var(--t-mid);
}
.info-card:hover {
    transform: translateY(-8px);
    border-color: rgba(106,189,188,.38);
    box-shadow: 0 24px 48px rgba(0,0,0,.35), 0 0 24px rgba(106,189,188,.08);
}
.info-card:hover::before { opacity: 1; }
.info-card-icon { font-size: 2.2rem; }
.info-card-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.info-card-body {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}
.info-card-link {
    font-size: 0.78rem;
    color: var(--uc-teal);
    font-family: var(--font-mono);
    font-weight: 600;
    transition: color var(--t-fast), letter-spacing var(--t-fast);
}
.info-card-link:hover {
    color: var(--uc-lime);
    letter-spacing: 0.05em;
}

/* Social buttons */
.social-links {
    display: flex;
    gap: var(--sp-sm);
    justify-content: center;
    flex-wrap: wrap;
}
.social-btn {
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    background: rgba(106,189,188,.09);
    border: 1px solid rgba(106,189,188,.2);
    color: var(--uc-teal);
    transition: background var(--t-fast), transform var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.social-btn svg { width: 17px; height: 17px; }
.social-btn:hover {
    background: var(--uc-teal);
    color: var(--bg-dark);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 16px rgba(106,189,188,.35);
}

/* ═════════════════════════════════════════════════════════════
   FOOTER
   ═════════════════════════════════════════════════════════════ */
.site-footer {
    position: relative;
    z-index: 10;
    padding: var(--sp-xl) 0;
    border-top: 1px solid var(--glass-border);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-md);
    flex-wrap: wrap;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}
.footer-logo {
    height: 28px;
    width: auto;
    opacity: 0.45;
    filter: brightness(0) invert(1);
    transition: opacity var(--t-mid);
}
.footer-logo:hover { opacity: 0.75; }
.footer-copy {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.footer-status {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.online-indicator {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--uc-teal);
    box-shadow: 0 0 6px var(--uc-teal);
    animation: onlinePulse 2.5s ease-in-out infinite;
}
@keyframes onlinePulse {
    0%,100% { opacity:1; box-shadow: 0 0 6px var(--uc-teal); }
    50%      { opacity:.45; box-shadow: 0 0 2px var(--uc-teal); }
}

/* ═════════════════════════════════════════════════════════════
   MODAL BACKDROP
   ═════════════════════════════════════════════════════════════ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(2, 8, 16, 0.82);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-mid);
}
.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* ═════════════════════════════════════════════════════════════
   GAME MODAL
   ═════════════════════════════════════════════════════════════ */
.game-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-md);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.94) translateY(14px);
    transition: opacity var(--t-mid), transform var(--t-mid);
}
.game-modal.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}
.game-modal-content {
    width: 100%;
    max-width: 730px;
    background: linear-gradient(145deg, rgba(10,30,46,.98), rgba(4,12,22,.99));
    border: 1px solid var(--glass-border);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow:
        0 40px 80px rgba(0,0,0,.6),
        0 0 40px rgba(106,189,188,.08);
    position: relative;
}
.modal-accent-line {
    height: 2px;
    background: linear-gradient(90deg, var(--uc-teal), var(--uc-lime), var(--uc-red));
}

/* Modal header */
.game-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-md) var(--sp-xl);
    border-bottom: 1px solid var(--glass-border);
}
.game-title-wrap {
    display: flex;
    align-items: baseline;
    gap: var(--sp-sm);
    flex-wrap: wrap;
}
.game-modal-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-shadow: 0 0 20px rgba(106,189,188,.4);
}
.uc-tag-inline {
    font-size: 0.75rem;
    padding: 3px 11px;
    border-radius: var(--r-full);
    background: rgba(106,189,188,.13);
    border: 1px solid rgba(106,189,188,.3);
    color: var(--uc-teal);
    vertical-align: middle;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 0.1em;
}
.game-subtitle {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    display: block;
    margin-top: 2px;
}
.game-close-btn {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    color: var(--text-muted);
    background: rgba(255,255,255,.04);
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
    flex-shrink: 0;
}
.game-close-btn svg { width: 18px; height: 18px; }
.game-close-btn:hover {
    background: rgba(218,67,87,.2);
    color: var(--uc-red);
    transform: scale(1.1) rotate(5deg);
}

/* Scoreboard */
.game-scores {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-sm) var(--sp-2xl);
    background: rgba(0,0,0,.25);
    border-bottom: 1px solid var(--glass-border);
}
.score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.score-player-label,
.score-cpu-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.player-score .score-player-label { color: var(--uc-teal); }
.cpu-score   .score-cpu-label     { color: var(--uc-red); }
.score-value {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1;
}
.player-score .score-value { color: var(--uc-teal); text-shadow: 0 0 20px var(--glow-teal); }
.cpu-score    .score-value { color: var(--uc-red);  text-shadow: 0 0 20px var(--glow-red); }
.score-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.score-divider-text {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* Canvas */
.game-canvas-wrap {
    position: relative;
    width: 100%;
    line-height: 0;
}
#pongCanvas {
    width: 100%;
    height: auto;
    display: block;
    cursor: none;
}

/* Game overlay (start / end) */
.game-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 12, 22, 0.88);
    backdrop-filter: blur(6px);
    transition: opacity var(--t-mid), visibility var(--t-mid);
    z-index: 10;
}
.game-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.game-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-md);
    text-align: center;
    padding: var(--sp-xl);
}
.game-overlay-emoji {
    font-size: 3.5rem;
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
.game-overlay-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 900;
    letter-spacing: 0.15em;
    text-shadow: 0 0 30px rgba(106,189,188,.55);
}
.game-overlay-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    max-width: 340px;
    line-height: 1.7;
}
.game-start-btn {
    padding: var(--sp-md) var(--sp-2xl);
    background: linear-gradient(135deg, var(--uc-teal), rgba(106,189,188,.65));
    color: var(--bg-dark);
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    border-radius: var(--r-full);
    border: none;
    cursor: pointer;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
    box-shadow: 0 0 24px rgba(106,189,188,.45);
    margin-top: var(--sp-sm);
}
.game-start-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 0 36px rgba(106,189,188,.65);
}

/* Controls hint */
.game-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-sm) var(--sp-xl);
    border-top: 1px solid var(--glass-border);
    gap: var(--sp-sm);
}
.control-hint {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
}
#ctrl-mobile { display: none; }
.mute-btn {
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    font-size: 1rem;
    background: rgba(255,255,255,.05);
    transition: background var(--t-fast), transform var(--t-fast);
    flex-shrink: 0;
}
.mute-btn:hover {
    background: rgba(255,255,255,.12);
    transform: scale(1.1);
}

/* ═════════════════════════════════════════════════════════════
   RESPONSIVE
   ═════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .container { padding: 0 var(--sp-lg); }
}

@media (max-width: 768px) {
    .container { padding: 0 var(--sp-md); }

    /* Header */
    .uc-logo { height: 36px; }
    .status-text { display: none; }

    /* Hero */
    .hero-section {
        min-height: auto;
        padding: var(--sp-xl) 0;
    }
    .hero-inner { gap: var(--sp-lg); }

    /* Gear */
    .gear-animation { width: 90px; height: 90px; }
    .gear-lg { width: 58px; height: 58px; top: 5px; left: 5px; }
    .gear-sm { width: 36px; height: 36px; bottom: 0; right: 0; }

    /* Progress modules */
    .progress-modules { grid-template-columns: repeat(2, 1fr); }

    /* HUD */
    .hud-timer { padding: var(--sp-md) var(--sp-xl); }
    .hud-value { font-size: 2rem; }
    .hud-sep   { font-size: 2rem; }

    /* CTA */
    .cta-btn-inner { padding: var(--sp-md) var(--sp-xl); }

    /* Info */
    .info-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .footer-brand { flex-direction: column; }

    /* Game modal controls */
    #ctrl-desktop { display: none; }
    #ctrl-mobile  { display: block; }

    /* Scoreboard */
    .game-scores { padding: var(--sp-sm) var(--sp-md); }
    .score-value { font-size: 2rem; }
}

@media (max-width: 480px) {
    .cta-text { font-size: 0.72rem; }
    .cta-tag  { display: none; }

    .game-modal-header { padding: var(--sp-xs) var(--sp-md); }
    .game-modal-title  { font-size: 1rem; }
    .game-controls     { padding: var(--sp-xs) var(--sp-md); }
}

@media (max-height: 720px) {
    .game-modal {
        align-items: flex-start;
        padding-top: var(--sp-sm);
        padding-bottom: var(--sp-sm);
    }

    .game-modal-content {
        max-height: calc(100vh - (var(--sp-sm) * 2));
        overflow-y: auto;
    }

    .game-overlay-inner {
        padding: var(--sp-md);
        gap: var(--sp-sm);
    }

    .game-overlay-emoji {
        font-size: 2.2rem;
    }

    .game-overlay-sub {
        font-size: 0.7rem;
        line-height: 1.45;
    }
}

@media (max-width: 768px) {
    .game-modal-content {
        width: min(96vw, 960px);
        max-height: 93vh;
        border-radius: 14px;
    }

    .game-frame {
        padding: var(--sp-sm);
    }

    .game-overlay-inner {
        width: min(96%, 520px);
    }
}

@media (max-width: 420px) {
    .game-overlay-title {
        font-size: 1.1rem;
        letter-spacing: 0.08em;
    }

    .game-overlay-subtitle {
        font-size: 0.82rem;
    }

    .game-overlay-actions {
        gap: 0.55rem;
    }
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ═════════════════════════════════════════════════════════════
   3D LOGO REBUILD HERO
   ═════════════════════════════════════════════════════════════ */

/* ── Outer wrapper ───────────────────────────────────────────── */
.logo-rebuild-hero {
    position: relative;
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-lg);
    padding: var(--sp-lg) 0;
}

/* ── Blueprint background grid ───────────────────────────────── */
.logo-blueprint-bg {
    position: absolute;
    inset: 0;
    border-radius: var(--r-xl);
    background-image:
        linear-gradient(rgba(106,189,188,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(106,189,188,0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 40%, transparent 100%);
    pointer-events: none;
}

/* ── Orbit rings ─────────────────────────────────────────────── */
.logo-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(106,189,188,0.12);
    pointer-events: none;
}
.logo-orbit-1 {
    width: 420px; height: 200px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: orbitSpin1 18s linear infinite;
    border-color: rgba(106,189,188,0.14);
    border-top-color: rgba(106,189,188,0.5);
}
.logo-orbit-2 {
    width: 500px; height: 240px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: orbitSpin1 26s linear infinite reverse;
    border-color: rgba(215,222,79,0.08);
    border-bottom-color: rgba(215,222,79,0.35);
}
.logo-orbit-3 {
    width: 360px; height: 170px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: orbitSpin1 14s linear infinite;
    border-color: rgba(218,67,87,0.07);
    border-left-color: rgba(218,67,87,0.3);
}
.logo-orbit-1::after,
.logo-orbit-2::after,
.logo-orbit-3::after {
    content: '';
    position: absolute;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    top: -4px; left: 50%;
    transform: translateX(-50%);
}
.logo-orbit-1 { color: var(--uc-teal); }
.logo-orbit-2 { color: var(--uc-lime); }
.logo-orbit-3 { color: var(--uc-red);  }

@keyframes orbitSpin1 { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ── 3D Perspective Stage ──────────────────────────────────────────────── */
.logo-3d-stage {
    perspective: 550px;
    perspective-origin: 50% 42%;
    width: 100%;
    max-width: 560px;
    height: 260px;
    position: relative;
    z-index: 2;
}

/* Glow halo reflection beneath the stage */
.logo-3d-stage::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 15%;
    right: 15%;
    height: 28px;
    background: rgba(106,189,188,0.22);
    filter: blur(14px);
    border-radius: 50%;
    pointer-events: none;
    animation: logoHaloPulse 4s ease-in-out infinite;
}
@keyframes logoHaloPulse {
    0%,100% { opacity: 0.55; transform: scaleX(1); }
    50%      { opacity: 0.95; transform: scaleX(1.1); }
}

/* ── 3D Scene (rotates) ──────────────────────────────────────── */
.logo-3d-scene {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    position: relative;
    animation: logo3DFloat 8s ease-in-out infinite;
}

@keyframes logo3DFloat {
    0%   { transform: rotateX(0deg)   rotateY(0deg)   scale3d(1,1,1); }
    15%  { transform: rotateX(5deg)   rotateY(-9deg)  scale3d(1.01,1.01,1); }
    30%  { transform: rotateX(-3deg)  rotateY(7deg)   scale3d(1,1,1); }
    50%  { transform: rotateX(6deg)   rotateY(12deg)  scale3d(1.02,1.02,1); }
    65%  { transform: rotateX(-4deg)  rotateY(-8deg)  scale3d(1,1,1); }
    80%  { transform: rotateX(3deg)   rotateY(5deg)   scale3d(1.01,1.01,1); }
    100% { transform: rotateX(0deg)   rotateY(0deg)   scale3d(1,1,1); }
}

/* Occasional glitch jolt */
.logo-3d-scene.glitch-3d {
    animation: logo3DGlitch 0.25s ease-in-out, logo3DFloat 8s ease-in-out infinite 0.25s;
}
@keyframes logo3DGlitch {
    0%   { transform: rotateX(0deg)  rotateY(0deg)  translateX(0); }
    20%  { transform: rotateX(12deg) rotateY(-18deg) translateX(-6px); }
    40%  { transform: rotateX(-8deg) rotateY(15deg) translateX(5px); }
    70%  { transform: rotateX(5deg)  rotateY(-8deg)  translateX(-2px); }
    100% { transform: rotateX(0deg)  rotateY(0deg)  translateX(0); }
}

/* ── Engineering Corner Markers ──────────────────────────────── */
.eng-corner {
    position: absolute;
    width: 26px; height: 26px;
    z-index: 5;
    animation: cornerBlink 2.5s ease-in-out infinite;
}
.eng-corner .ec-h,
.eng-corner .ec-v {
    position: absolute;
    background: var(--uc-teal);
    box-shadow: 0 0 6px var(--uc-teal);
}
.eng-corner .ec-h { width: 100%; height: 2px; top: 0; left: 0; }
.eng-corner .ec-v { width: 2px; height: 100%; top: 0; left: 0; }

.eng-tl { top: -4px;  left: -4px;  }
.eng-tr { top: -4px;  right: -4px; transform: scaleX(-1); }
.eng-bl { bottom: -4px; left: -4px;  transform: scaleY(-1); }
.eng-br { bottom: -4px; right: -4px; transform: scale(-1,-1); }

@keyframes cornerBlink {
    0%,100% { opacity: 1; }
    45%      { opacity: 0.2; }
    50%      { opacity: 1; }
    55%      { opacity: 0.2; }
    60%      { opacity: 1; }
}
.eng-tr { animation-delay: 0.4s; }
.eng-bl { animation-delay: 0.8s; }
.eng-br { animation-delay: 1.2s; }

/* ── Scanning Beam ───────────────────────────────────────────── */
.logo-scan-beam {
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    z-index: 6;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(106,189,188,0.15) 15%,
        rgba(106,189,188,0.85) 50%,
        rgba(106,189,188,0.15) 85%,
        transparent 100%);
    box-shadow:
        0 0 8px rgba(106,189,188,0.7),
        0 0 20px rgba(106,189,188,0.3);
    animation: scanBeam 3s ease-in-out infinite;
    pointer-events: none;
}
.logo-scan-beam::after {
    content: '';
    position: absolute;
    inset: 0;
    top: 3px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(106,189,188,0.12), transparent);
    pointer-events: none;
}
@keyframes scanBeam {
    0%   { top: 0%;   opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* ── Hex overlay ─────────────────────────────────────────────── */
.logo-hex-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='32'%3E%3Cpath d='M14 2 L26 9 L26 23 L14 30 L2 23 L2 9 Z' fill='none' stroke='rgba(106,189,188,0.07)' stroke-width='0.8'/%3E%3C/svg%3E");
    background-size: 28px 32px;
    animation: hexShimmer 6s ease-in-out infinite;
    opacity: 0.6;
}
@keyframes hexShimmer {
    0%,100% { opacity: 0.4; }
    50%     { opacity: 0.9; }
}

/* ── The Main Logo Image ─────────────────────────────────────── */
.logo-3d-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 4;
    /* Deep multi-layer drop-shadow creates rich 3D extrusion */
    filter:
        drop-shadow(0  2px 0 rgba(24, 60, 90, 1.0))
        drop-shadow(0  4px 0 rgba(24, 60, 90, 0.92))
        drop-shadow(0  6px 0 rgba(15, 45, 66, 0.84))
        drop-shadow(0  9px 0 rgba(10, 30, 46, 0.75))
        drop-shadow(0 12px 0 rgba(5,  14, 26, 0.62))
        drop-shadow(0 15px 0 rgba(2,   8, 16, 0.48))
        drop-shadow(0 18px 5px rgba(0,  0,  0, 0.35))
        drop-shadow(0  0  22px rgba(106,189,188,0.75))
        drop-shadow(0  0  55px rgba(106,189,188,0.35))
        saturate(1.08) contrast(1.04);
    animation: logoGlow3D 4s ease-in-out infinite;
    transition: filter 0.4s ease;
}


@keyframes logoGlow3D {
    0%,100% {
        filter:
            drop-shadow(0  2px 0 rgba(24,60,90,1.0))
            drop-shadow(0  4px 0 rgba(24,60,90,0.92))
            drop-shadow(0  6px 0 rgba(15,45,66,0.84))
            drop-shadow(0  9px 0 rgba(10,30,46,0.75))
            drop-shadow(0 12px 0 rgba(5,14,26,0.62))
            drop-shadow(0 15px 0 rgba(2,8,16,0.48))
            drop-shadow(0 18px 5px rgba(0,0,0,0.35))
            drop-shadow(0  0  22px rgba(106,189,188,0.70))
            drop-shadow(0  0  50px rgba(106,189,188,0.30))
            saturate(1.08) contrast(1.04);
    }
    50% {
        filter:
            drop-shadow(0  2px 0 rgba(24,60,90,1.0))
            drop-shadow(0  4px 0 rgba(24,60,90,0.92))
            drop-shadow(0  6px 0 rgba(15,45,66,0.84))
            drop-shadow(0  9px 0 rgba(10,30,46,0.75))
            drop-shadow(0 12px 0 rgba(5,14,26,0.62))
            drop-shadow(0 15px 0 rgba(2,8,16,0.48))
            drop-shadow(0 18px 5px rgba(0,0,0,0.35))
            drop-shadow(0  0  38px rgba(106,189,188,1.00))
            drop-shadow(0  0  80px rgba(106,189,188,0.55))
            saturate(1.15) contrast(1.06);
    }
}

/* Glitch color flash state (added by JS) */
.logo-3d-img.glitch-flash {
    filter:
        drop-shadow(0  2px 0 rgba(24,60,90,1.0))
        drop-shadow(0  5px 0 rgba(24,60,90,0.85))
        drop-shadow(0  8px 0 rgba(15,45,66,0.7))
        drop-shadow(0 11px 4px rgba(0,0,0,0.4))
        drop-shadow(0  0  30px rgba(218,67,87,0.8))
        drop-shadow(0  0  60px rgba(215,222,79,0.5))
        hue-rotate(15deg) brightness(1.3);
}

/* ── Holographic Shimmer ─────────────────────────────────────── */
.logo-hologram {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(106,189,188,0.08) 45%,
        rgba(255,255,255,0.12) 50%,
        rgba(215,222,79,0.06) 55%,
        transparent 70%
    );
    background-size: 300% 300%;
    animation: holoSweep 5s ease-in-out infinite;
    border-radius: var(--r-md);
    mix-blend-mode: screen;
}
@keyframes holoSweep {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* ── Spark Canvas ────────────────────────────────────────────── */
#sparkCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    pointer-events: none;
}

/* ── Weld Arc Flash Points ───────────────────────────────────── */
.weld-arc {
    position: absolute;
    width: 14px; height: 14px;
    border-radius: 50%;
    z-index: 9;
    pointer-events: none;
    background: radial-gradient(circle, #ffffff 0%, var(--uc-lime) 40%, transparent 70%);
    box-shadow: 0 0 10px var(--uc-lime), 0 0 20px rgba(215,222,79,0.6);
    opacity: 0;
}
.weld-a1 { top: 15%;  left: 18%;  animation: weldFlash 3.5s ease-in-out infinite 0.0s; }
.weld-a2 { top: 20%;  right: 20%; animation: weldFlash 4.0s ease-in-out infinite 1.2s; }
.weld-a3 { bottom: 25%; left: 28%; animation: weldFlash 3.0s ease-in-out infinite 2.1s; }
.weld-a4 { bottom: 20%; right: 15%; animation: weldFlash 3.8s ease-in-out infinite 0.7s; }

@keyframes weldFlash {
    0%,85%,100% { opacity: 0; transform: scale(0.5); }
    87% { opacity: 1; transform: scale(1.5); }
    90% { opacity: 0.7; transform: scale(1.0); }
    93% { opacity: 1; transform: scale(1.8); }
    96% { opacity: 0.3; transform: scale(0.8); }
    98% { opacity: 0; }
}

/* ── 3D Depth Layers (fake extrusion planes behind logo) ─────── */
.logo-depth-layer {
    position: absolute;
    inset: 5px;
    z-index: 1;
    pointer-events: none;
    border-radius: var(--r-md);
    opacity: 0;  /* rendered via filter on logo instead */
}

/* ── Rebuild Status Strip ────────────────────────────────────── */
.rebuild-status {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-full);
    padding: var(--sp-xs) var(--sp-lg);
    backdrop-filter: blur(8px);
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 10;
}
.rebuild-indicator {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    flex-shrink: 0;
}
.rebuild-led {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--uc-lime);
    box-shadow: 0 0 6px var(--uc-lime);
    flex-shrink: 0;
    animation: ledBlink 0.8s ease-in-out infinite;
}
@keyframes ledBlink { 0%,100% { opacity:1; } 50% { opacity:0.15; } }

.rebuild-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--uc-lime);
    white-space: nowrap;
    min-width: 180px;
}
.rebuild-bar-track {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.07);
    border-radius: var(--r-full);
    overflow: hidden;
    position: relative;
}
.rebuild-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--uc-lime), var(--uc-teal));
    border-radius: var(--r-full);
    transition: width 0.6s ease;
    box-shadow: 0 0 8px var(--uc-lime);
}
.rebuild-bar-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(215,222,79,0.4), transparent);
    animation: shimmer 2s ease-in-out infinite;
}
.rebuild-pct {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--uc-lime);
    flex-shrink: 0;
    min-width: 2.5ch;
    text-align: right;
}

/* ── Responsive: 3D Logo ─────────────────────────────────────── */
@media (max-width: 768px) {
    .logo-rebuild-hero { max-width: 100%; padding: var(--sp-md) 0; }
    .logo-3d-stage { height: 160px; }
    .logo-orbit-1 { width: 320px; height: 150px; }
    .logo-orbit-2 { width: 380px; height: 180px; }
    .logo-orbit-3 { width: 270px; height: 130px; }
    .rebuild-status { gap: var(--sp-sm); padding: var(--sp-xs) var(--sp-md); }
    .rebuild-label { font-size: 0.55rem; min-width: 130px; }
}

@media (max-width: 480px) {
    .logo-3d-stage { height: 130px; }
    .logo-orbit-1, .logo-orbit-2, .logo-orbit-3 { display: none; }
    .rebuild-status { flex-wrap: wrap; border-radius: var(--r-lg); }
    .rebuild-label { min-width: unset; }
}

/* ═════════════════════════════════════════════════════════════
   MAINTENANCE ALERT BANNER
   ═════════════════════════════════════════════════════════════ */

.maint-alert-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 1.4rem;
    padding: 0.6rem 1rem;
    border-radius: var(--r-full);
    background: rgba(218, 67, 87, 0.08);
    border: 1px solid rgba(218, 67, 87, 0.28);
    box-shadow:
        0 0 20px rgba(218, 67, 87, 0.08),
        0 2px 14px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    animation: bannerEntrance 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
    position: relative;
    overflow: hidden;
}

/* Shimmer sweep */
.maint-alert-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 70%
    );
    background-size: 200% 100%;
    animation: bannerShimmer 3.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bannerEntrance {
    from { opacity: 0; transform: translateY(-14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bannerShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Pulsing LED dot */
.maint-alert-pulse {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #da4357;
    box-shadow: 0 0 0 0 rgba(218, 67, 87, 0.7);
    animation: alertPulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes alertPulse {
    0%   { box-shadow: 0 0 0 0   rgba(218, 67, 87, 0.75); }
    60%  { box-shadow: 0 0 0 9px rgba(218, 67, 87, 0); }
    100% { box-shadow: 0 0 0 0   rgba(218, 67, 87, 0); }
}

/* Warning icon */
.maint-alert-icon {
    font-size: 1.05rem;
    color: #d7de4f;
    flex-shrink: 0;
    filter: drop-shadow(0 0 5px rgba(215, 222, 79, 0.7));
    animation: iconWobble 4s ease-in-out infinite;
}

@keyframes iconWobble {
    0%, 100% { transform: rotate(0deg); }
    15%       { transform: rotate(-8deg); }
    30%       { transform: rotate(8deg); }
    45%       { transform: rotate(0deg); }
}

/* Alert message text */
.maint-alert-text {
    flex: 1;
    font-family: var(--font-ui);
    font-size: clamp(0.72rem, 1.5vw, 0.82rem);
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.45;
    letter-spacing: 0.01em;
}

.maint-alert-text strong {
    font-family: var(--font-display);
    font-size: clamp(0.78rem, 1.6vw, 0.88rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #da4357;
    text-shadow: 0 0 12px rgba(218, 67, 87, 0.5);
}

/* "EN CURSO" badge */
.maint-alert-badge {
    flex-shrink: 0;
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(218, 67, 87, 0.18);
    border: 1px solid rgba(218, 67, 87, 0.45);
    color: #da4357;
    text-shadow: 0 0 8px rgba(218, 67, 87, 0.6);
    animation: badgePop 2s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes badgePop {
    0%, 100% { opacity: 1;    transform: scale(1); }
    50%       { opacity: 0.75; transform: scale(0.96); }
}

/* Responsive */
@media (max-width: 600px) {
    .maint-alert-banner {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.7rem 1rem;
    }
    .maint-alert-badge { order: -1; margin-left: auto; }
    .maint-alert-text  { font-size: 0.72rem; width: 100%; }
}

/* ═════════════════════════════════════════════════════════════
   SUPPLY DRONE SYSTEM  (JS-controlled via drones.js)
   ═════════════════════════════════════════════════════════════ */

/* ── Fleet container: 0×0 at logo center, overflow:visible ── */
.supply-fleet {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 14;
}

/* ── Drone wrapper: origin at (0,0) = logo center ── */
.drone {
    position: absolute;
    /* Offset so the ship SVG center aligns with the transform origin */
    margin-left: -22px;   /* half SVG width  (44px) */
    margin-top:  -12px;   /* half SVG height (24px) */
    opacity: 0;
    will-change: transform, opacity;
}

/* ── Ship SVG ── */
.drone-body {
    width: 44px;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 5px currentColor);
}

/* ── Engine trail (behind ship, right-to-left gradient) ── */
.drone-trail-wrap {
    position: absolute;
    /* Sits behind the SVG on its left/engine side */
    right: 40px;          /* flush with left edge of SVG */
    top:   50%;
    transform: translateY(-50%);
    width: 80px;
    height: 4px;
    pointer-events: none;
    overflow: hidden;
}

.drone-trail-el {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    transform-origin: right center;
    /* Color gradient set via inline style by JS */
    filter: blur(0.8px);
}

/* ── Cargo pod (counter-rotated by JS so it always hangs screen-down) ── */
.drone-cargo-pod {
    position: absolute;
    /* Origin at drone center; JS applies: rotate(-angle)deg translateY(16px) */
    top:  12px;   /* vertical center of drone (half of 24px) */
    left: 22px;   /* horizontal center of drone (half of 44px) */
    transform-origin: 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}

/* Tractor beam line connecting drone to cargo box */
.cargo-tractor-beam {
    width: 2px;
    height: 0;           /* extended by JS */
    background: linear-gradient(
        to bottom,
        rgba(215,222,79,0.85) 0%,
        rgba(106,189,188,0.55) 60%,
        transparent 100%
    );
    box-shadow: 0 0 6px rgba(215,222,79,0.4);
    border-radius: 2px;
    opacity: 0;          /* JS controls */
    transition: none;    /* JS overrides transitions when needed */
}

/* Cargo container (the supply box) */
.cargo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 6px;
    border-radius: 5px;
    background: rgba(215,222,79,0.12);
    border: 1px solid rgba(215,222,79,0.45);
    box-shadow:
        0 0 10px rgba(215,222,79,0.3),
        inset 0 1px 0 rgba(255,255,255,0.15);
    backdrop-filter: blur(2px);
    white-space: nowrap;
    /* Opacity & translateY controlled by JS */
}

.cargo-icon {
    font-size: 0.68rem;
    line-height: 1;
    filter: drop-shadow(0 0 3px rgba(215,222,79,0.8));
}

/* ── Delivery impact flash ring (inside .logo-3d-scene) ── */
.logo-delivery-flash {
    position: absolute;
    top:  50%;
    left: 50%;
    width:  80px;
    height: 80px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: radial-gradient(
        circle,
        rgba(215,222,79,0.95) 0%,
        rgba(106,189,188,0.6) 45%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 20;
    opacity: 0;
}

.logo-delivery-flash.flash-active {
    animation: deliveryFlashRing 0.55s ease-out forwards;
}

@keyframes deliveryFlashRing {
    0%   { transform: translate(-50%,-50%) scale(0);   opacity: 1; }
    35%  { transform: translate(-50%,-50%) scale(1.8); opacity: 0.9; }
    100% { transform: translate(-50%,-50%) scale(4.5); opacity: 0; }
}

/* ── Mobile: keep only 2 drones ── */
@media (max-width: 540px) {
    #drone-1, #drone-3 { display: none !important; }
}


/* ═════════════════════════════════════════════════════════════
   FOOTER UC MARK  (replaces broken logo image)
   ═════════════════════════════════════════════════════════════ */
.footer-uc-mark {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    color: rgba(255,255,255,0.35);
    border: 1.5px solid rgba(106,189,188,0.2);
    border-radius: var(--r-sm);
    padding: 3px 7px;
    transition: color var(--t-mid), border-color var(--t-mid);
    flex-shrink: 0;
}
.footer-uc-mark:hover {
    color: rgba(106,189,188,0.75);
    border-color: rgba(106,189,188,0.45);
}
