/*
 * UNSTABLE DEMOS — 8-Bit Hacker / Arcade Theme
 * Pure geek, pixel art, retro terminal vibes
 */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

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

:root {
    --bg:          #050505;
    --bg-card:     #0f0f0f;
    --bg-elevated: #151515;
    --border:      #333333;
    --text:        #e0e0e0;
    --text-dim:    #777777;
    --text-muted:  #444444;
    --accent:      #00ff00; /* CRT Green */
    --accent-dim:  #00cc00;
    --accent-glow: rgba(0, 255, 0, 0.25);
    --warn:        #ff003c;
    --cyan:        #00ffff;
    --magenta:     #ff00ff;
}

body {
    font-family: 'VT323', monospace;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    -webkit-font-smoothing: none;
    image-rendering: pixelated;
}

/* ============================================
   CRT SCANLINES & FLICKER
   ============================================ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0,0,0,0.15),
        rgba(0,0,0,0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

@keyframes flicker {
    0% { opacity: 0.95; }
    5% { opacity: 0.85; }
    10% { opacity: 0.95; }
    100% { opacity: 1; }
}

#presentation {
    width: 100%;
    height: 100%;
    position: relative;
    animation: flicker 0.15s infinite;
}

.slide {
    position: absolute;
    inset: 0;
    display: none;
    opacity: 0;
    transition: none; 
}

.slide.active {
    display: flex;
    opacity: 1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, .pixel-title {
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
}

/* ============================================
   ASCII ART STYLES
   ============================================ */
.ascii-art {
    font-family: 'VT323', monospace;
    line-height: 1.1;
    white-space: pre;
    text-align: center;
    text-shadow: 0 0 5px currentColor;
}
.relative-container { position: relative; }

#matrix-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.4;
}

#ascii-walker {
    position: absolute;
    bottom: 2rem;
    left: -200px;
    font-size: 1.5rem;
    z-index: 50;
    pointer-events: none;
    animation: walk 25s linear infinite;
}

@keyframes walk {
    0% { transform: translateX(-200px); }
    100% { transform: translateX(120vw); }
}

/* ============================================
   LAYOUT: HERO (title slides)
   ============================================ */
.slide--hero {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 8%;
    background: var(--bg);
}

.slide--hero .tag {
    font-family: 'VT323', monospace;
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 2rem;
}

.slide--hero .tag::before { content: '[ '; color: var(--text-dim); }
.slide--hero .tag::after { content: ' ]'; color: var(--text-dim); }

.slide--hero h1 {
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    color: var(--text);
    line-height: 1.5;
    text-shadow: 4px 4px 0px rgba(0, 255, 0, 0.2);
}

.slide--hero h1 .glow {
    color: var(--accent);
}

.slide--hero .sub {
    font-family: 'VT323', monospace;
    font-size: clamp(1.5rem, 2.2vw, 2.2rem);
    color: var(--text-dim);
    margin-top: 3rem;
}

.slide--hero .sub::before {
    content: '> ';
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ============================================
   LAYOUT: CONTENT
   ============================================ */
.slide--content {
    flex-direction: column;
    padding: 3rem 8%;
}

.slide-header {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.slide-header .num {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    color: var(--bg);
    background: var(--accent);
    padding: 0.3rem 0.5rem;
    border: 2px solid var(--accent);
}

.slide--content .slide-title {
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    color: var(--accent);
    line-height: 1.4;
}

.slide--content .slide-subtitle {
    font-family: 'VT323', monospace;
    font-size: 1.8rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px dashed var(--border);
    padding-bottom: 1.5rem;
}

.slide--content .slide-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: clamp(1.6rem, 2.2vw, 2.2rem);
    line-height: 1.6;
}

.slide--content .slide-body ul {
    list-style: none;
    margin: 0;
}

.slide--content .slide-body ul li {
    margin-bottom: 1.2rem;
    padding-left: 2.5rem;
    position: relative;
}

.slide--content .slide-body ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ============================================
   LAYOUT: TWO COLUMNS
   ============================================ */
.slide--two-col .slide-body {
    flex-direction: row;
    gap: 4rem;
}

.slide--two-col .col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* ============================================
   LAYOUT: SECTION BREAK
   ============================================ */
.slide--break {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 8%;
    background: var(--bg);
    border: 8px solid var(--accent);
    margin: 2rem;
    height: calc(100% - 4rem);
    width: calc(100% - 4rem);
}

.slide--break h2 {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.5;
    color: var(--bg);
    background: var(--accent);
    padding: 1rem 2rem;
}

/* ============================================
   LAYOUT: CENTERED BIG TEXT
   ============================================ */
.slide--center {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 10%;
}

.slide--center .big {
    font-size: clamp(2.5rem, 3.5vw, 3.5rem);
    line-height: 1.4;
}

/* ============================================
   TERMINAL
   ============================================ */
.terminal-box {
    background: var(--bg);
    border: 2px solid var(--accent);
    overflow: hidden;
    margin-top: 1.5rem;
    box-shadow: 8px 8px 0px rgba(0,255,0,0.2);
}

.terminal-header {
    background: var(--accent);
    color: var(--bg);
    padding: 5px 16px;
    display: flex;
    align-items: center;
}

.terminal-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
}

.terminal-body {
    padding: 1.2rem 1.5rem;
    color: var(--accent);
    font-family: 'VT323', monospace;
    font-size: 1.8rem;
    min-height: 120px;
    line-height: 1.5;
}

.terminal-actions {
    padding: 12px 16px;
    border-top: 2px dashed var(--accent);
}

/* ============================================
   COMPONENTS
   ============================================ */
.btn {
    background: var(--bg);
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 10px 20px;
    font-size: 1rem;
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 4px 4px 0px var(--accent);
}

.btn:active {
    box-shadow: 0px 0px 0px var(--accent);
    transform: translate(4px, 4px);
}

.accent { color: var(--accent); }
.warn { color: var(--warn); }
.cyan { color: var(--cyan); }
.magenta { color: var(--magenta); }

.pill {
    display: inline-block;
    background: var(--text);
    color: var(--bg);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    padding: 0.5em 0.8em;
    vertical-align: middle;
    margin: 0 0.2em;
}

.card {
    border: 2px dashed var(--accent);
    padding: 1.5rem;
    background: rgba(0,255,0,0.05);
}

.image-placeholder {
    background: var(--bg-card);
    border: 2px solid var(--text-dim);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-dim);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    min-height: 250px;
    line-height: 2;
}

/* ============================================
   SLIDE COUNTER + PROGRESS
   ============================================ */
.controls {
    position: absolute;
    bottom: 1.5rem;
    right: 2rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--accent);
    z-index: 20;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 8px;
    background: var(--accent);
    transition: width 0.1s step-end;
    z-index: 20;
}
