/* ==========================================================================
   CSS PRINCIPAL - EL BÚNKER HACKER (EBH)
   Estética: Cyberpunk / Blade Runner / Prepper / CRT Terminal
   ========================================================================== */

:root {
    --bg-color: #030407;
    --bg-card: rgba(8, 10, 16, 0.85);
    --bg-card-solid: #080a10;
    
    --neon-cyan: #00f0ff;
    --neon-amber: #ffad00;
    --neon-red: #ff0055;
    --neon-pink: #ff00ea;
    --neon-green: #39ff14;
    
    --text-color: #c7f2ff;
    --text-muted: #53758a;
    
    --font-header: 'Orbitron', sans-serif;
    --font-mono: 'Share Tech Mono', 'Courier New', monospace;
    
    --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.35);
    --glow-amber: 0 0 10px rgba(255, 173, 0, 0.35);
    --glow-red: 0 0 10px rgba(255, 0, 85, 0.35);
    --glow-green: 0 0 10px rgba(57, 255, 20, 0.35);
}

/* Base resets & scrollbars */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.5px;
    height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 240, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-pink);
}

/* ==========================================================================
   BACKGROUND GRID
   ========================================================================== */

.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   CYBER CORNERS / BORDERS
   ========================================================================== */

.border-cyber {
    border: 1px solid var(--neon-cyan);
    background-color: var(--bg-card);
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.08), var(--glow-cyan);
    position: relative;
    clip-path: polygon(
        0px 0px, 
        calc(100% - 15px) 0px, 
        100% 15px, 
        100% 100%, 
        15px 100%, 
        0px calc(100% - 15px)
    );
}

.border-cyber::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(0, 240, 255, 0.2);
    pointer-events: none;
    clip-path: polygon(
        0px 0px, 
        calc(100% - 15px) 0px, 
        100% 15px, 
        100% 100%, 
        15px 100%, 
        0px calc(100% - 15px)
    );
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */

.hud-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    gap: 20px;
}

/* ==========================================================================
   HUD HEADER
   ========================================================================== */

.hud-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 15px 25px;
    background-color: rgba(6, 8, 14, 0.95);
    border-color: var(--neon-cyan);
    z-index: 100;
}

.header-left {
    display: flex;
    flex-direction: column;
}

.glitch-title {
    font-family: var(--font-header);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    position: relative;
    letter-spacing: 2px;
}

.bunker-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 2px;
}

/* Telemetry HUD Panel */
.telemetry-panel {
    display: flex;
    gap: 20px;
    padding: 8px 15px;
    border-left: 2px solid var(--neon-pink);
    border-right: 2px solid var(--neon-cyan);
    background: rgba(0, 0, 0, 0.4);
}

.telemetry-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.telemetry-item .label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.telemetry-item .value {
    font-size: 0.9rem;
    font-weight: bold;
    font-family: var(--font-mono);
}

/* Controls */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.clock-display {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--neon-amber);
    text-shadow: var(--glow-amber);
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border: 1px solid rgba(255, 173, 0, 0.3);
}

/* ==========================================================================
   MAIN HUD LAYOUT
   ========================================================================== */

.hud-main {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ==========================================================================
   BLOG CONTAINER & FEED
   ========================================================================== */

.blog-container {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 150px);
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(0, 240, 255, 0.15);
    padding-bottom: 12px;
    flex-wrap: wrap;
    gap: 15px;
}

.blog-header h2 {
    font-family: var(--font-header);
    font-size: 1.2rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.filter-btn.active {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    background: rgba(255, 0, 234, 0.05);
    box-shadow: 0 0 8px rgba(255, 0, 234, 0.2);
}

.blog-feed {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: max-content;   /* que la altura fija del contenedor no aplaste las tarjetas */
    align-content: start;
    gap: 14px;
}

@media (max-width: 900px) {
    .blog-feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .blog-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.blog-card {
    border: 1px solid rgba(0, 240, 255, 0.15);
    background: rgba(5, 7, 12, 0.6);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.blog-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.12), inset 0 0 10px rgba(0, 240, 255, 0.05);
    transform: translateY(-2px);
}

.card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.9) brightness(0.85);
    transition: filter 0.25s ease, transform 0.4s ease;
}

.blog-card:hover .card-thumb img {
    filter: saturate(1.1) brightness(1);
    transform: scale(1.04);
}

/* Portada para reels que solo están en Instagram */
.card-thumb.sin-imagen {
    --cat: var(--neon-cyan);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 4px),
        radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--cat) 22%, transparent), transparent 70%),
        #05070c;
}
.card-thumb[data-cat="radio"] { --cat: var(--neon-green); }
.card-thumb[data-cat="ciberseguridad"] { --cat: var(--neon-red); }
.card-thumb[data-cat="linux"] { --cat: var(--neon-amber); }
.card-thumb[data-cat="ia"] { --cat: var(--neon-pink); }
.card-thumb[data-cat="cultura"] { --cat: #9d7bff; }

.thumb-ig {
    font-family: var(--font-header);
    font-weight: 900;
    font-size: 1.9rem;
    letter-spacing: 4px;
    color: var(--cat);
    text-shadow: 0 0 12px var(--cat);
    line-height: 1;
}
.thumb-ig-sub {
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-top: 4px;
}

.thumb-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    display: grid;
    place-items: center;
    padding-left: 3px;
    border-radius: 50%;
    background: rgba(3, 4, 7, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 14px;
    opacity: 0.85;
    transition: opacity 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.card-thumb.sin-imagen .thumb-play { display: none; }
.blog-card:hover .thumb-play {
    opacity: 1;
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.thumb-cat {
    position: absolute;
    left: 6px;
    top: 6px;
    font-size: 0.6rem;
    letter-spacing: 1px;
    padding: 1px 6px;
    background: rgba(3, 4, 7, 0.8);
    border: 1px solid rgba(255, 173, 0, 0.5);
    color: var(--neon-amber);
}

.card-body {
    padding: 10px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-body .date {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.card-title {
    font-family: var(--font-header);
    font-size: 0.85rem;
    font-weight: bold;
    line-height: 1.3;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.blog-card:hover .card-title {
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
}

.card-summary {
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--text-color);
    opacity: 0.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag {
    font-size: 0.65rem;
    padding: 2px 6px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.15);
    color: var(--neon-cyan);
}

@media (max-width: 480px) {
    .blog-feed { gap: 10px; padding-right: 0; }
    .card-body { padding: 8px 8px 12px; }
    .card-title { font-size: 0.75rem; }
    .card-summary { display: none; }
}

/* ==========================================================================
   SDR PANEL
   ========================================================================== */

.sdr-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 25px;
    flex-wrap: wrap;
    border-color: rgba(57, 255, 20, 0.5);
    box-shadow: inset 0 0 15px rgba(57, 255, 20, 0.05), var(--glow-green);
}

.sdr-info {
    display: flex;
    align-items: center;
    gap: 18px;
}

.sdr-icon {
    font-size: 2rem;
    line-height: 1;
}

.sdr-text h2 {
    font-family: var(--font-header);
    font-size: 1.1rem;
    color: var(--neon-green);
    text-shadow: var(--glow-green);
    letter-spacing: 1px;
}

.sdr-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 2px;
}

.sdr-btn {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 10px 20px;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    text-shadow: var(--glow-green);
    text-decoration: none;
    background: rgba(57, 255, 20, 0.05);
    transition: all 0.25s ease;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
    white-space: nowrap;
}

.sdr-btn:hover {
    background: rgba(57, 255, 20, 0.15);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.35);
    transform: translateY(-1px);
}

.sdr-btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.yt-btn {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 10px 20px;
    border: 1px solid #FF0000;
    color: #FF0000;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.45);
    text-decoration: none;
    background: rgba(255, 0, 0, 0.05);
    transition: all 0.25s ease;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
    white-space: nowrap;
}

.yt-btn:hover {
    background: rgba(255, 0, 0, 0.15);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.35);
    transform: translateY(-1px);
}

/* ==========================================================================
   HUD FOOTER
   ========================================================================== */

.hud-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    font-size: 0.75rem;
    background-color: rgba(6, 8, 14, 0.95);
    border-color: rgba(0, 240, 255, 0.4);
}

.hud-footer span {
    letter-spacing: 0.5px;
}

.mp-btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    color: #00B1EA;
    text-shadow: 0 0 10px rgba(0, 177, 234, 0.45);
    background: rgba(0, 177, 234, 0.06);
    border: 1px solid #00B1EA;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}

.mp-btn:hover {
    background: rgba(0, 177, 234, 0.18);
    box-shadow: 0 0 15px rgba(0, 177, 234, 0.4);
    transform: translateY(-1px);
}

.mp-btn.copied {
    color: var(--neon-green);
    border-color: var(--neon-green);
    text-shadow: var(--glow-green);
    background: rgba(57, 255, 20, 0.08);
}

/* ==========================================================================
   MODAL DIALOG (POST VIEWER)
   ========================================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 3, 5, 0.9);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 95%;
    max-width: 1200px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-card-solid);
    border-color: var(--neon-pink);
    box-shadow: inset 0 0 25px rgba(255, 0, 234, 0.05), var(--glow-red);
}

.modal-title-bar {
    background: rgba(255, 0, 85, 0.1);
    border-bottom: 1px solid rgba(255, 0, 85, 0.3);
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title-text {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--neon-red);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--neon-red);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #fff;
    text-shadow: var(--glow-red);
}

.modal-header-info {
    padding: 25px 30px 15px 30px;
    border-bottom: 1px dashed rgba(0, 240, 255, 0.15);
}

.modal-meta {
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.modal-header-info h1 {
    font-family: var(--font-header);
    font-size: 1.6rem;
    color: #fff;
    margin-top: 5px;
}

.modal-body {
    padding: 25px 30px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    flex: 1;
}

/* Styling content inside post details */
.modal-body p {
    margin-bottom: 18px;
    text-align: justify;
}

.modal-body h3 {
    color: var(--neon-cyan);
    font-family: var(--font-header);
    margin: 25px 0 10px 0;
    font-size: 1.1rem;
    border-left: 3px solid var(--neon-cyan);
    padding-left: 10px;
}

.modal-body ul {
    margin: 10px 0 18px 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

.modal-body code {
    background: rgba(0, 240, 255, 0.08);
    padding: 2px 6px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    font-family: var(--font-mono);
    color: var(--neon-cyan);
    font-size: 0.85rem;
}

.modal-body pre {
    background: #020305;
    padding: 15px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    overflow-x: auto;
    margin-bottom: 18px;
}

.modal-body pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--neon-green);
}

.modal-footer {
    padding: 12px 30px;
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.7rem;
}

/* ==========================================================================
   UTILITY HELPER CLASSES & ANIMATIONS
   ========================================================================== */

.txt-cyan { color: var(--neon-cyan); text-shadow: var(--glow-cyan); }
.txt-amber { color: var(--neon-amber); text-shadow: var(--glow-amber); }
.txt-warn { color: var(--neon-amber); }
.txt-red { color: var(--neon-red); text-shadow: var(--glow-red); }
.txt-pink { color: var(--neon-pink); }
.txt-green { color: var(--neon-green); }
.txt-muted { color: var(--text-muted); }
.font-bold { font-weight: bold; }
.font-mono { font-family: var(--font-mono); }

.text-glow-cyan { text-shadow: var(--glow-cyan); }
.text-glow-amber { text-shadow: var(--glow-amber); }

/* Pulsing effect */
.pulsing {
    animation: pulse 1.8s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; text-shadow: 0 0 12px var(--neon-cyan); }
    100% { opacity: 0.6; }
}

/* System alert flicker text */
.flicker-text {
    animation: text-flicker 3s infinite linear;
}

@keyframes text-flicker {
    0%, 100% { opacity: 1; text-shadow: var(--glow-red); }
    41% { opacity: 1; }
    42% { opacity: 0.2; text-shadow: none; }
    43% { opacity: 0.8; }
    45% { opacity: 0.2; }
    46% { opacity: 1; text-shadow: var(--glow-red); }
}

/* Glitch animation details */
@keyframes glitch-anim {
    0% { clip: rect(15px, 9999px, 66px, 0); }
    10% { clip: rect(33px, 9999px, 5px, 0); }
    20% { clip: rect(112px, 9999px, 76px, 0); }
    30% { clip: rect(95px, 9999px, 13px, 0); }
    40% { clip: rect(48px, 9999px, 88px, 0); }
    50% { clip: rect(5px, 9999px, 120px, 0); }
    60% { clip: rect(78px, 9999px, 29px, 0); }
    70% { clip: rect(104px, 9999px, 60px, 0); }
    80% { clip: rect(12px, 9999px, 95px, 0); }
    90% { clip: rect(52px, 9999px, 110px, 0); }
    100% { clip: rect(90px, 9999px, 4px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(44px, 9999px, 5px, 0); }
    10% { clip: rect(12px, 9999px, 88px, 0); }
    20% { clip: rect(90px, 9999px, 22px, 0); }
    30% { clip: rect(71px, 9999px, 110px, 0); }
    40% { clip: rect(5px, 9999px, 60px, 0); }
    50% { clip: rect(130px, 9999px, 95px, 0); }
    60% { clip: rect(53px, 9999px, 12px, 0); }
    70% { clip: rect(85px, 9999px, 78px, 0); }
    80% { clip: rect(110px, 9999px, 40px, 0); }
    90% { clip: rect(25px, 9999px, 120px, 0); }
    100% { clip: rect(62px, 9999px, 30px, 0); }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1200px) {
    .blog-container {
        max-height: none;
    }
}

@media (max-width: 800px) {
    .hud-header {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .header-left, .header-right {
        align-items: center;
        text-align: center;
    }
    
    .telemetry-panel {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        border: 1px solid rgba(0, 240, 255, 0.2);
    }
    
    .hud-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 15px;
    }

    .sdr-panel {
        justify-content: center;
        text-align: center;
    }

    .sdr-info {
        flex-direction: column;
        gap: 8px;
    }
}

/* Videos de la bitácora: YouTube (Shorts verticales) o acceso a Instagram */
.yt-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 16px auto 20px;
    border: 1px solid var(--neon-cyan);
    box-shadow: var(--glow-cyan);
    background: #000;
}
.yt-embed.yt-short { aspect-ratio: 9 / 16; max-width: 360px; }
.yt-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.reel-acceso {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    min-height: 220px;
    margin: 16px auto 20px;
    border: 1px solid var(--neon-pink);
    box-shadow: 0 0 10px rgba(255, 0, 234, 0.3);
    background: repeating-linear-gradient(0deg, rgba(255, 0, 234, 0.04) 0 2px, transparent 2px 4px), #05060a;
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-mono);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.reel-acceso:hover, .reel-acceso:focus-visible { box-shadow: 0 0 22px rgba(255, 0, 234, 0.55); outline: none; }
.reel-acceso:active { transform: scale(0.98); }
.reel-play {
    display: grid; place-items: center;
    width: 64px; height: 64px; border-radius: 50%;
    border: 2px solid var(--neon-pink); color: var(--neon-pink);
    font-size: 24px; padding-left: 4px;
    text-shadow: 0 0 10px var(--neon-pink);
}
.reel-acceso-texto { color: var(--neon-pink); letter-spacing: 2px; font-size: 14px; }
.reel-acceso-sub { color: var(--text-muted); font-size: 12px; }

/* ==========================================================================
   INTRO: RACK DE SERVIDORES EN EL BÚNKER
   ========================================================================== */
html.intro-activa, html.intro-activa body { overflow: hidden; }

.intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #020305;
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
}
.intro.intro-salida {
    opacity: 0;
    transform: scale(1.06);
    filter: brightness(2) blur(2px);
    pointer-events: none;
}

.intro-escena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* La escena se enciende con la lámpara */
.intro .escena { opacity: 0; animation: intro-encender 1.1s steps(1, end) 0.35s forwards; }
@keyframes intro-encender {
    0% { opacity: 0.6; } 12% { opacity: 0.05; } 22% { opacity: 0.8; }
    30% { opacity: 0.1; } 45% { opacity: 1; } 52% { opacity: 0.35; } 60%, 100% { opacity: 1; }
}
.intro .luz { mix-blend-mode: screen; animation: intro-parpadeo 3.2s ease-in-out 1.6s infinite; }
@keyframes intro-parpadeo {
    0%, 100% { opacity: 1; } 47% { opacity: 1; } 48% { opacity: 0.55; } 50% { opacity: 1; } 71% { opacity: 0.85; }
}

.intro .rib { fill: none; stroke: #121a25; }
.intro .rib-luz { fill: none; stroke: #ffad00; }
.intro .piso-linea { stroke: rgba(0, 240, 255, 0.07); stroke-width: 1; }
.intro .estencil {
    font-family: var(--font-header); font-weight: 900; font-size: 46px;
    fill: rgba(255, 173, 0, 0.12); text-anchor: middle; letter-spacing: 8px;
}
.intro .viñeta { fill: none; pointer-events: none; }

/* Lámpara */
.intro .lampara-cable { stroke: #1c232d; stroke-width: 3; }
.intro .lampara-base { fill: #1c232d; }
.intro .lampara-bombilla { fill: #ffd27a; filter: drop-shadow(0 0 14px #ffad00) drop-shadow(0 0 36px #ffad00); }
.intro .lampara-jaula { fill: none; stroke: #2a323d; stroke-width: 2.5; }

/* Rack */
.intro .rack-marco { fill: #0a0e15; }
.intro .rack-lado { fill: #06090e; }
.intro .rack-borde { fill: none; stroke: var(--neon-cyan); stroke-width: 1.5; opacity: 0.55; filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6)); }
.intro .rack-sombra { fill: rgba(0, 0, 0, 0.7); }
.intro .rack-etiqueta { font-family: var(--font-mono); font-size: 13px; fill: var(--neon-cyan); text-anchor: middle; letter-spacing: 3px; opacity: 0.8; }
.intro .u-caja { fill: #121822; stroke: #1f2935; stroke-width: 1; }
.intro .u-oreja { fill: #1a222d; }
.intro .u-rejilla { fill: #070a0f; }
.intro .u-bahia { fill: #0b1018; stroke: #222c38; stroke-width: 1; }
.intro .u-puerto { fill: #04060a; stroke: #2a3644; stroke-width: 1; }
.intro .u-pantalla { fill: #031a10; stroke: #0c4a2a; stroke-width: 1; }
.intro .u-texto { font-family: var(--font-mono); font-size: 11px; fill: var(--neon-green); text-anchor: middle; }

/* Cada unidad se enciende de arriba hacia abajo */
.intro .unidad { opacity: 0.25; animation: intro-unidad 0.25s ease-out var(--d) forwards; }
@keyframes intro-unidad { 0% { opacity: 0.25; } 40% { opacity: 1; filter: brightness(1.8); } 100% { opacity: 1; filter: none; } }
.intro .led { opacity: 0; animation: intro-led-on 0.01s linear calc(var(--b) * 0.3 + 1.2s) forwards, intro-led 0.9s steps(2, jump-none) calc(var(--b) + 1.3s) infinite; }
.intro .led-lento { animation-duration: 0.01s, 1.7s; }
@keyframes intro-led-on { to { opacity: 1; } }
@keyframes intro-led { 0% { opacity: 1; } 100% { opacity: 0.2; } }

/* Cables: se dibujan saliendo del rack y después corren datos */
.intro .cable { fill: none; stroke-width: 3; stroke-linecap: round; opacity: 0.85; animation: intro-cable 1.3s cubic-bezier(0.22, 1, 0.36, 1) var(--d) forwards; }
@keyframes intro-cable { to { stroke-dashoffset: 0; } }
.intro .pulso { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 8 90; opacity: 0; filter: brightness(1.8); animation: intro-pulso-on 0.2s linear var(--d) forwards, intro-pulso var(--v) linear var(--d) infinite; }
@keyframes intro-pulso-on { to { opacity: 1; } }
@keyframes intro-pulso { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -98; } }

/* Textos de arranque */
.intro-log {
    position: absolute; left: 24px; bottom: 24px;
    font-family: var(--font-mono); font-size: 13px; line-height: 1.7;
    color: var(--neon-green); text-shadow: var(--glow-green);
    pointer-events: none;
}
.intro-linea { opacity: 0; animation: intro-aparece 0.15s steps(1, end) var(--d) forwards; white-space: pre; }
@keyframes intro-aparece { to { opacity: 1; } }

.intro-estado {
    position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%);
    width: min(360px, calc(100% - 32px)); text-align: center; pointer-events: none;
}
.intro-barra { height: 4px; background: rgba(0, 240, 255, 0.12); border: 1px solid rgba(0, 240, 255, 0.35); }
.intro-barra span {
    display: block; height: 100%; width: 100%; background: var(--neon-cyan); box-shadow: var(--glow-cyan);
    transform-origin: left; transform: scaleX(0); animation: intro-barra 3.3s cubic-bezier(0.65, 0, 0.35, 1) 0.4s forwards;
}
@keyframes intro-barra { to { transform: scaleX(1); } }
.intro-acceso {
    margin-top: 12px; font-family: var(--font-header); font-weight: 700; font-size: 18px; letter-spacing: 6px;
    color: var(--neon-cyan); text-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
    opacity: 0; animation: intro-acceso 0.6s steps(6, end) 3.7s forwards;
}
@keyframes intro-acceso { 0% { opacity: 0; } 30% { opacity: 1; } 45% { opacity: 0.2; } 60%, 100% { opacity: 1; } }

.intro-saltar {
    position: absolute; top: 16px; right: 16px;
    background: rgba(3, 4, 7, 0.6); border: 1px solid var(--text-muted); color: var(--text-muted);
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; padding: 6px 12px; cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.intro-saltar:hover, .intro-saltar:focus-visible { color: var(--neon-cyan); border-color: var(--neon-cyan); outline: none; }

@media (max-width: 640px) {
    .intro-log { font-size: 10px; left: 16px; right: 16px; top: 60px; bottom: auto; line-height: 1.6; }
    .intro-estado { bottom: 32px; }
    .intro-acceso { font-size: 14px; letter-spacing: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .intro { display: none; }
}
.intro .ficha { opacity: 0; animation: intro-aparece 0.1s steps(1, end) var(--d) forwards; filter: drop-shadow(0 0 3px currentColor); }
