/* ============================================================
   THE GEEK STREET — IBM 5151 / Strong Bad's Compy Theme
   Beige plastic housing, recessed dark screen, green phosphor
   
   Tailwind handles layout/spacing/responsive.
   This file makes it FEEL like 1983.
   ============================================================ */

/* -----------------------------------------------------------
   Fonts
   ----------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&display=swap');

/* -----------------------------------------------------------
   CSS Custom Properties
   ----------------------------------------------------------- */
:root {
    /* IBM beige housing */
    --bezel-light: #c8b88a;
    --bezel-mid: #b5a478;
    --bezel-dark: #9e8e68;
    --bezel-shadow: #7a6d50;
    --bezel-highlight: #d8cca0;

    /* Screen glass */
    --screen-bg: #0c1a0c;
    --screen-dark: #081208;

    /* Phosphor green — the star of the show */
    --phosphor: #33ff33;
    --phosphor-mid: #22cc22;
    --phosphor-dim: #178a17;
    --phosphor-glow: rgba(51, 255, 51, 0.4);
    --phosphor-subtle: rgba(51, 255, 51, 0.08);

    /* Accent colors (Dark Modern inspired) */
    --amber: #dcdcaa;
    --amber-bright: #e2c56d;
    --amber-dim: #8a8a6a;
    --red: #f14c4c;
    --blue: #6cb4f0;
    --blue-dim: #3a7ab8;
    --teal: #4ec9b0;
    --purple: #c586c0;

    /* Neutrals for screen text */
    --text-bright: #44ff44;
    --text-normal: #33dd33;
    --text-dim: #22aa22;
    --text-faint: #117711;

    /* Softer green for headings — less eye burn */
    --heading-green: #28cc50;
    --text-ghost: #0d550d;

    --font-terminal: 'VT323', 'Courier New', monospace;
    --font-pixel: 'Press Start 2P', 'Courier New', monospace;
}

/* -----------------------------------------------------------
   Base
   ----------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-terminal);
    font-size: 20px;
    line-height: 1.6;
    background: #6b5e45;
    background-image: 
        radial-gradient(ellipse at 50% 30%, #7a6d50 0%, #4a3f2e 100%);
    color: var(--phosphor);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: none;
}

/* -----------------------------------------------------------
   IBM 5151 MONITOR — The whole enclosure
   ----------------------------------------------------------- */

/* Outer shell = beige plastic */
.crt-monitor {
    max-width: 85%;
    width: 85%;
    margin: 30px auto;
    background: linear-gradient(
        180deg,
        var(--bezel-highlight) 0%,
        var(--bezel-light) 3%,
        var(--bezel-mid) 50%,
        var(--bezel-dark) 97%,
        var(--bezel-shadow) 100%
    );
    border-radius: 18px 18px 12px 12px;
    padding: 22px 22px 16px;
    position: relative;

    /* 3D bezel edges */
    border: 2px solid var(--bezel-shadow);
    border-top-color: var(--bezel-highlight);
    border-left-color: var(--bezel-light);

    /* Desk shadow + phosphor ambient glow */
    box-shadow:
        0 6px 0 var(--bezel-shadow),
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 120px rgba(51, 255, 51, 0.03);
}

/* Recessed screen area — the black glass */
.crt-glass {
    background: #000;
    border-radius: 14px;
    padding: 3px;
    position: relative;

    /* Inset shadow = glass recessed into plastic */
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.8),
        inset 0 0 3px rgba(0, 0, 0, 0.6),
        0 1px 0 var(--bezel-highlight);
}

/* The actual phosphor screen surface */
.crt-screen {
    background: var(--screen-bg);
    border-radius: 12px;
    padding: 24px 32px;
    min-height: 80vh;
    position: relative;
    overflow: hidden;

    /* Subtle vignette — CRT barrel effect */
    box-shadow:
        inset 0 0 80px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Scanlines */
.crt-screen::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.12) 3px,
        rgba(0, 0, 0, 0.12) 4px
    );
    pointer-events: none;
    z-index: 5;
    border-radius: 12px;
}

/* Screen reflection — glass glare */
.crt-screen::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 60%;
    background: radial-gradient(
        ellipse at 30% 20%,
        rgba(255, 255, 255, 0.03) 0%,
        transparent 60%
    );
    pointer-events: none;
    z-index: 6;
}

/* -----------------------------------------------------------
   Bottom bezel — IBM badge + power LED
   ----------------------------------------------------------- */
.monitor-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 2px;
    font-family: var(--font-terminal);
}

.ibm-badge {
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 3px;
    color: var(--bezel-shadow);
    text-shadow: 0 1px 0 var(--bezel-highlight);
}

.power-led {
    width: 10px;
    height: 10px;
    background: #44ff44;
    border-radius: 50%;
    box-shadow:
        0 0 4px #33ff33,
        0 0 12px rgba(51, 255, 51, 0.5);
    border: 1px solid #228822;
}

/* -----------------------------------------------------------
   Glow Effects
   ----------------------------------------------------------- */
.glow-green {
    text-shadow: 0 0 8px var(--phosphor-glow);
}

.glow-amber {
    text-shadow: 0 0 6px rgba(226, 197, 109, 0.35);
}

/* -----------------------------------------------------------
   Typography
   ----------------------------------------------------------- */
h1, h2, h3 {
    font-family: var(--font-pixel);
    line-height: 1.8;
    letter-spacing: 1px;
}

h1 {
    font-size: 14px;
    color: var(--text-bright);
    text-shadow: 0 0 10px var(--phosphor-glow);
}

h2 {
    font-size: 11px;
    color: var(--phosphor);
    text-shadow: 0 0 8px var(--phosphor-glow);
}

h3 {
    font-size: 9px;
    color: var(--phosphor-mid);
}

p, li, td, th, label, span, div {
    font-family: var(--font-terminal);
}

/* -----------------------------------------------------------
   Blinking Cursor
   ----------------------------------------------------------- */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--phosphor);
}

.cursor-blink-amber {
    animation: blink 1s step-end infinite;
    color: var(--amber-bright);
}

.dos-prompt::before {
    content: 'C:\\GEEKSTREET>';
    color: var(--text-dim);
    margin-right: 4px;
}

/* -----------------------------------------------------------
   Links
   ----------------------------------------------------------- */
a {
    color: var(--phosphor);
    text-decoration: none;
    transition: all 0.15s ease;
}

a:hover {
    color: var(--text-bright);
    text-shadow: 0 0 8px var(--phosphor-glow);
}

a:active {
    color: var(--red);
}

/* -----------------------------------------------------------
   Navigation (DOS Menu Bar)
   ----------------------------------------------------------- */
.dos-nav {
    background: var(--screen-dark);
    border-bottom: 1px solid var(--text-faint);
    padding: 8px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    align-items: center;
    font-size: 20px;
    border-radius: 12px 12px 0 0;
}

.dos-nav a {
    color: var(--phosphor-mid);
    padding: 2px 6px;
}

.dos-nav a:hover {
    color: var(--text-bright);
    background: rgba(51, 255, 51, 0.1);
    text-shadow: 0 0 6px var(--phosphor-glow);
}

.dos-nav a.active {
    background: var(--phosphor-dim);
    color: var(--screen-bg);
    text-shadow: none;
}

.dos-nav .nav-key {
    color: var(--amber-bright);
    font-weight: bold;
}

/* -----------------------------------------------------------
   Buttons
   ----------------------------------------------------------- */
.btn-dos {
    font-family: var(--font-terminal);
    font-size: 20px;
    background: var(--screen-dark);
    color: var(--phosphor);
    border: 1px solid var(--text-faint);
    padding: 6px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-dos:hover {
    background: var(--phosphor);
    color: var(--screen-bg);
    text-shadow: none;
    box-shadow: 0 0 12px var(--phosphor-glow);
}

.btn-dos-amber { color: var(--amber-bright); border-color: var(--amber-dim); }
.btn-dos-amber:hover { background: var(--amber-bright); color: var(--screen-bg); }

.btn-dos-red { color: var(--red); border-color: #7a2e2e; }
.btn-dos-red:hover { background: var(--red); color: var(--screen-bg); }

.btn-dos-blue { color: var(--blue); border-color: var(--blue-dim); }
.btn-dos-blue:hover { background: var(--blue); color: #fff; }

/* -----------------------------------------------------------
   Form Inputs
   ----------------------------------------------------------- */
.input-dos {
    font-family: var(--font-terminal);
    font-size: 22px;
    background: var(--screen-dark);
    color: var(--phosphor);
    border: 1px solid var(--text-faint);
    padding: 8px 12px;
    width: 100%;
    outline: none;
}

.input-dos:focus {
    border-color: var(--phosphor-mid);
    box-shadow: 0 0 8px rgba(51, 255, 51, 0.15);
}

.input-dos::placeholder { color: var(--text-faint); }
textarea.input-dos { resize: vertical; min-height: 100px; }

/* -----------------------------------------------------------
   ASCII Box Cards
   ----------------------------------------------------------- */
.ascii-box {
    border: 1px solid var(--text-faint);
    padding: 14px 18px;
    margin-bottom: 12px;
    position: relative;
    background: rgba(8, 18, 8, 0.5);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ascii-box:hover {
    border-color: var(--amber-bright);
    box-shadow: 0 0 14px rgba(226, 197, 109, 0.25);
}

.ascii-box .box-header {
    color: var(--text-bright);
    border-bottom: 1px dashed var(--text-faint);
    padding-bottom: 6px;
    margin-bottom: 8px;
    text-shadow: 0 0 6px var(--phosphor-glow);
}

/* -----------------------------------------------------------
   Tables
   ----------------------------------------------------------- */
.dos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 20px;
}

.dos-table th {
    color: var(--text-bright);
    text-align: left;
    padding: 6px 12px;
    border-bottom: 2px solid var(--text-faint);
}

.dos-table td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--text-ghost);
}

.dos-table tr:hover td {
    background: var(--phosphor-subtle);
}

/* -----------------------------------------------------------
   Category badges
   ----------------------------------------------------------- */
.badge {
    font-family: var(--font-terminal);
    font-size: 16px;
    padding: 2px 10px;
    border: 1px solid;
    display: inline-block;
    transition: all 0.15s ease;
}

.badge:hover { filter: brightness(1.3); }

.badge-coding    { color: var(--phosphor); border-color: var(--phosphor-dim); }
.badge-howto     { color: var(--amber-bright); border-color: var(--amber-dim); }
.badge-education { color: var(--blue); border-color: var(--blue-dim); }
.badge-finance   { color: var(--amber); border-color: var(--amber-dim); }
.badge-webtools  { color: var(--purple); border-color: #6e3a6e; }
.badge-gaming    { color: var(--red); border-color: #7a2e2e; }
.badge-news      { color: #ccc; border-color: #555; }
.badge-anime     { color: #d670d6; border-color: #6e3a6e; }
.badge-ai        { color: var(--teal); border-color: #2e7a6a; }
.badge-other     { color: #888; border-color: #444; }

/* -----------------------------------------------------------
   Status indicators
   ----------------------------------------------------------- */
.status-alive { color: var(--phosphor); }
.status-alive::before { content: '● '; }
.status-dead { color: var(--red); }
.status-dead::before { content: '✗ '; }
.status-pending { color: var(--amber-bright); }
.status-pending::before { content: '◌ '; }

/* -----------------------------------------------------------
   Rank numbers
   ----------------------------------------------------------- */
.rank-number {
    font-family: var(--font-terminal);
    font-size: 24px;
    font-weight: bold;
    color: #f0c040;
    min-width: 52px;
    display: inline-block;
    text-align: right;
    margin-right: 14px;
    text-shadow: 0 0 6px rgba(240, 192, 64, 0.4);
}

/* -----------------------------------------------------------
   Flash messages
   ----------------------------------------------------------- */
.flash {
    padding: 10px 16px;
    margin-bottom: 16px;
    border: 1px solid;
    font-size: 20px;
}

.flash-success { color: var(--phosphor); border-color: var(--phosphor-dim); background: var(--phosphor-subtle); }
.flash-error { color: var(--red); border-color: #7a2e2e; background: rgba(241, 76, 76, 0.06); }
.flash-info { color: var(--blue); border-color: var(--blue-dim); background: rgba(59, 142, 234, 0.06); }

/* -----------------------------------------------------------
   ASCII Art Header
   ----------------------------------------------------------- */
.ascii-art {
    font-family: var(--font-terminal);
    font-size: 14px;
    line-height: 1.1;
    color: var(--phosphor);
    text-shadow: 0 0 12px var(--phosphor-glow);
    white-space: pre;
    overflow-x: auto;
    text-align: center;
    padding: 20px 0;
}

.ascii-art-sub {
    font-family: var(--font-terminal);
    font-size: 11px;
    line-height: 1.15;
    color: var(--phosphor);
    text-shadow: 0 0 8px var(--phosphor-glow);
    white-space: pre;
    overflow-x: auto;
    text-align: center;
    padding: 12px 0;
}

/* -----------------------------------------------------------
   Blog Content Links (make affiliate/article links visible)
   ----------------------------------------------------------- */
.blog-content a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(59, 142, 234, 0.4);
}

.blog-content a:hover {
    color: var(--amber-bright);
    text-decoration-color: var(--amber-bright);
    text-shadow: 0 0 6px rgba(255, 200, 50, 0.3);
}

.blog-content h2 {
    font-size: 12px;
    margin-top: 1.5em;
}

.blog-content h3 {
    font-size: 10px;
    margin-top: 1.2em;
}

/* -----------------------------------------------------------
   Geek Radar feed
   ----------------------------------------------------------- */
.radar-item {
    padding: 5px 0;
    font-size: 20px;
    border-left: 2px solid var(--text-faint);
    padding-left: 12px;
    margin-bottom: 4px;
}

.radar-item .radar-time {
    color: var(--text-dim);
    font-size: 18px;
}

.radar-item .radar-action {
    color: var(--phosphor-mid);
}

/* -----------------------------------------------------------
   Scrollbar
   ----------------------------------------------------------- */
::-webkit-scrollbar { width: 14px; }
::-webkit-scrollbar-track { background: var(--screen-dark); }
::-webkit-scrollbar-thumb { background: var(--text-faint); border: 3px solid var(--screen-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--phosphor-dim); }

/* -----------------------------------------------------------
   Footer
   ----------------------------------------------------------- */
.footer-bar {
    border-top: 1px solid var(--text-faint);
    padding: 16px 0;
    font-size: 18px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 40px;
}

/* -----------------------------------------------------------
   User avatar
   ----------------------------------------------------------- */
.avatar {
    width: 24px;
    height: 24px;
    border-radius: 2px;
    border: 1px solid var(--text-faint);
    image-rendering: pixelated;
    vertical-align: middle;
}

/* -----------------------------------------------------------
   Responsive — Mobile first
   ----------------------------------------------------------- */
@media (max-width: 768px) {
    body {
        background: #333;
        font-size: 20px;
    }

    .crt-monitor {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        padding: 8px 8px 6px;
        border: none;
        box-shadow: none;
    }

    .crt-glass {
        border-radius: 4px;
    }

    .crt-screen {
        padding: 14px 12px;
        border-radius: 4px;
        min-height: auto;
    }

    .ascii-art {
        font-size: 7px;
    }

    .ascii-art-sub {
        font-size: 6px;
    }

    h1 { font-size: 12px; }
    h2 { font-size: 9px; }

    .dos-nav {
        gap: 2px 6px;
        font-size: 17px;
        padding: 6px 10px;
        border-radius: 4px 4px 0 0;
    }

    .monitor-bottom {
        padding: 6px 10px 2px;
    }

    .rank-number {
        font-size: 18px;
        min-width: 36px;
        margin-right: 8px;
    }

    /* Homepage tagline — prevent wrapping on mobile */
    .homepage-tagline {
        font-size: 16px;
    }

    /* Stats bar — keep on one line */
    .stats-bar {
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: center;
    }

    .stats-bar .font-pixel {
        font-size: 10px;
    }

    .stats-bar .text-sm {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .ascii-art {
        font-size: 5.5px;
    }

    .ascii-art-sub {
        font-size: 4.5px;
    }

    .crt-screen {
        padding: 10px 8px;
    }

    h1 { font-size: 10px; }

    .dos-nav {
        font-size: 15px;
    }

    /* Further shrink tagline on small phones */
    .homepage-tagline {
        font-size: 14px;
    }

    /* Stats even tighter */
    .stats-bar {
        gap: 4px;
    }

    .stats-bar .font-pixel {
        font-size: 8px;
    }

    .stats-bar .text-sm {
        font-size: 11px;
    }

    .stats-bar .text-gray-700 {
        margin: 0;
    }
}

/* -----------------------------------------------------------
   Boot-up animation
   ----------------------------------------------------------- */
@keyframes bootUp {
    0%   { opacity: 0; filter: brightness(3); }
    15%  { opacity: 0.4; }
    30%  { opacity: 0.8; filter: brightness(1.2); }
    100% { opacity: 1; filter: brightness(1); }
}

.boot-up {
    animation: bootUp 0.8s ease-out;
}

/* -----------------------------------------------------------
   Vote Buttons
   ----------------------------------------------------------- */
.vote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: none;
    border: 1px solid var(--text-faint);
    border-radius: 4px;
    padding: 4px 8px 2px;
    cursor: pointer;
    min-width: 42px;
    transition: all 0.15s ease;
    flex-shrink: 0;
    font-family: var(--font-terminal);
}

.vote-btn:hover {
    border-color: var(--phosphor);
    background: rgba(51, 255, 51, 0.08);
}

.vote-btn .vote-arrow {
    font-size: 18px;
    line-height: 1;
    color: var(--text-faint);
    transition: color 0.15s ease;
}

.vote-btn:hover .vote-arrow {
    color: var(--phosphor);
}

.vote-btn .vote-count {
    font-size: 14px;
    line-height: 1.2;
    color: var(--text-dim);
}

.vote-btn.voted {
    border-color: var(--phosphor-mid);
    background: rgba(51, 255, 51, 0.12);
}

.vote-btn.voted .vote-arrow {
    color: var(--phosphor);
    text-shadow: 0 0 6px var(--phosphor-glow);
}

.vote-btn.voted .vote-count {
    color: var(--phosphor);
}

.vote-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* -----------------------------------------------------------
   Selection
   ----------------------------------------------------------- */
::selection {
    background: var(--phosphor);
    color: var(--screen-bg);
}
