:root {
    --bg-black: #0d0d0d;
    --phosphor-green: #33ff33;
    --dark-metal: #222;
    --alert-red: #ff0033;
}

body {
    background-color: #000;
    color: var(--phosphor-green);
    font-family: 'Courier New', monospace; /* Or a "Computer" font */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    /* FONT INCREASE */
    font-size: 1.25rem;
    line-height: 1.6;
}

/* The "Boxy" 60s Monitor Look */
.monitor-frame {
    width: 95vw;
    max-width: 1200px; /* ENFORCED MAX WIDTH */
    height: 85vh;
    border: 20px solid var(--dark-metal);
    border-radius: 40px;
    background: var(--bg-black);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px #000, 0 0 30px rgba(51, 255, 51, 0.2);
    margin: 0 auto;
}

/* CRT Scanline Effect */
.crt-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

.glitch-title {
    font-size: clamp(3rem, 12vw, 8rem);
    text-align: center;
    margin-top: 10vh;
    letter-spacing: 15px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--phosphor-green);
}

.console-header {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 2px solid var(--phosphor-green);
    /* FONT INCREASE */
    font-size: 1rem;
}

.knob-panel {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 120px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-top: 4px solid var(--dark-metal);
}

/* The 1960s "Dial" Look */
.dial {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #444, #111);
    border: 3px solid #000;
    border-radius: 50%;
    position: relative;
    transform: rotate(var(--rotation, 0deg)); /* Add only this */
}

.dial::after {
    content: '';
    position: absolute;
    top: 10%; left: 50%;
    width: 4px; height: 20px;
    background: var(--phosphor-green);
    transform: translateX(-50%);
}

/* --- Link Styling Fix --- */
.nav-cluster a {
    text-decoration: none;      /* Removes the blue underline */
    color: var(--phosphor-green); /* Uses your green variable */
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 15px;
    padding-left: 25px; /* <--- ADD THIS LINE HERE */
    /* FONT INCREASE */
    font-size: 1.1rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

/* Hover effect: make it look like a physical button lighting up */
.nav-cluster a:hover {
    color: #fff;
    background: rgba(51, 255, 51, 0.2);
    border: 1px solid var(--phosphor-green);
    box-shadow: 0 0 15px var(--phosphor-green);
    text-shadow: 0 0 5px #fff;
}

/* Optional: Add a "bracket" look to the links for extra tech vibe */
.nav-cluster a::before {
    content: '[';
    margin-right: 5px;
    opacity: 0.3;
}

.nav-cluster a::after {
    content: ']';
    margin-left: 5px;
    opacity: 0.3;
}

/* Unique look for the Nav Dial */
.dial-knob {
    width: 32px;
    height: 32px;
    background: #111;
    border: 2px solid var(--phosphor-green);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    /* The "Pointy" part of the chicken-head knob */
}

.dial-knob::before {
    content: '';
    position: absolute;
    top: -8px; /* Points outward */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid var(--phosphor-green);
}

/* The "Indicator Line" on the knob */
.dial-knob::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    width: 2px;
    height: 10px;
    border-bottom: 12px solid var(--phosphor-green);
    transform: translateX(-50%);
}

/* Mobile Specific Sexy Logic */
@media (max-width: 600px) {
    .nav-cluster {
        display: flex !important; /* Force flex so clip-path can animate */
        flex-direction: column;
        position: fixed; /* Keep it locked to the viewport */
        top: 100px;
        left: 50%;
        transform: translateX(-50%);
        width: 85%;
        background: rgba(13, 13, 13, 0.98);
        border: 2px solid var(--phosphor-green);
        box-shadow: 0 0 40px #000, 0 0 15px var(--phosphor-green);
        padding: 40px 10px;
        z-index: 9999; /* Ensure it stays above the CRT scanlines */

        /* The Reveal Animation */
        clip-path: inset(0 0 100% 0);
        transition: clip-path 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        pointer-events: none; /* Prevents clicking links when hidden */
    }

    .nav-cluster.show {
        clip-path: inset(0 0 0 0); /* Reveals the menu */
        pointer-events: auto; /* Re-enables clicking */
    }
}

@media (max-width: 600px) {
    .menu-dial-container .status-light {
        background: var(--p-green);
        box-shadow: 0 0 10px var(--p-green);
        animation: fast-pulse 1.5s infinite;
    }
}

@keyframes fast-pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Ensure the dial has a transition so it looks smooth */
.dial {
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

/* The rotation state */
.dial.active-dial {
    transform: rotate(90deg);
}

.dossier-container {
    padding: 40px;
    max-width: 900px; /* Internal max width for content */
    margin: 0 auto;
    font-family: 'Courier New', Courier, monospace;
    color: #33ff33;
}

.dossier-header {
    border-bottom: 2px solid #33ff33;
    margin-bottom: 30px;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* FONT INCREASE ON HEADER */
.dossier-header h1 {
    font-size: 2.5rem;
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dossier-card {
    border: 1px solid rgba(51, 255, 51, 0.3);
    padding: 25px; /* SLIGHT PADDING INCREASE FOR BIGGER TEXT */
    background: rgba(0, 0, 0, 0.5);
}

/* FONT INCREASE ON CARDS */
.dossier-card h3 {
    margin-top: 0;
    color: #fff;
    font-size: 1.6rem;
}

.dossier-card p, .dossier-card li {
    font-size: 1.15rem;
}

.dossier-card ul {
    list-style: none;
    padding: 0;
}

.dossier-card li span {
    color: #fff;
    margin-right: 10px;
}

.dossier-card {
    transition: all 0.3s ease;
    cursor: crosshair; /* Matches the tech vibe */
}

.dossier-card:hover {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(51, 255, 51, 0.2);
    transform: translateX(5px);
}

/* Container for the 'monitor' screen */
.system-page {
    display: block;
    /* This calculation ensures the scrollable area ends EXACTLY where the knob panel begins */
    height: calc(85vh - 220px);
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 20px;
    margin: 0;
    box-sizing: border-box; /* Critical for padding/height math */

    /* Technical Scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--phosphor-green) #000;
}

/* For Chrome/Safari scrollbar styling */
.system-page::-webkit-scrollbar {
    width: 6px;
}
.system-page::-webkit-scrollbar-track {
    background: #000;
}
.system-page::-webkit-scrollbar-thumb {
    background-color: #33ff33;
    border-radius: 10px;
}

.system-page {
    display: block; /* Ensures it behaves as a block container */
    height: calc(85vh - 200px); /* Matches your monitor-frame height minus header/footer */
    overflow-y: auto !important; /* Force the scrollbar */
    overflow-x: hidden;
    padding: 20px;
    margin: 0;

    /* Technical Scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--phosphor-green) #000;
}

/* Chrome/Safari specific scrollbar fix */
.system-page::-webkit-scrollbar {
    width: 6px;
    display: block;
}
.system-page::-webkit-scrollbar-thumb {
    background: var(--phosphor-green);
    border-radius: 10px;
}

.dossier-container {
    padding: 40px 40px 100px 40px; /* Top, Right, Bottom, Left */
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Courier New', Courier, monospace;
    color: #33ff33;
}

@media (max-width: 600px) {
    /* 1. Reset the container padding so it doesn't squish the content */
    .dossier-container {
        padding: 20px 15px 120px 15px; /* Less side padding, keep bottom for knobs */
        width: 100%;
        box-sizing: border-box;
    }

    /* 2. Force the grid into a single centered column */
    .system-grid {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centers the cards */
        gap: 20px;
    }

    /* 3. Make cards take up full width (minus padding) */
    .dossier-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }

    /* 4. Fix the header layout for small screens */
    .dossier-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .dossier-header h1 {
        font-size: 1.8rem; /* Shrink title slightly so it doesn't wrap weirdly */
        margin-bottom: 5px;
    }
}

/* This tells the card to span from the first grid line to the last */
.full-width {
    grid-column: 1 / -1;
}

/* Optional: Make the bio text look cleaner within the full width */
.full-width .bio-content {
    display: block;
    column-count: 1; /* Keeps it as one readable block */
    max-width: 100%;
}

/* Hide the menu knob on desktop */
@media (min-width: 601px) {
    .menu-trigger {
        display: none;
    }
}

/* Ensure the links are always visible on desktop */
@media (min-width: 601px) {
    .nav-cluster {
        display: flex !important;
        clip-path: none !important; /* Overrides the mobile 'hidden' state */
        pointer-events: auto !important;
        position: static; /* Removes the absolute positioning from mobile */
    }
}

.scanning-interface {
    padding: 40px;
    text-align: center;
    border: 1px dashed var(--phosphor-green);
    position: relative;
    overflow: hidden;
    background: rgba(51, 255, 51, 0.05);
}

.radar-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    background: var(--phosphor-green);
    box-shadow: 0 0 15px var(--phosphor-green);
    animation: radar-sweep 4s linear infinite;
}

@keyframes radar-sweep {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.glitch-text {
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 10px;
    /* FONT INCREASE */
    font-size: 1.2rem;
}

/* Add this to your style.css */
.glitch-text {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { opacity: 1; text-shadow: 0 0 5px var(--phosphor-green); }
    50% { opacity: 0.4; text-shadow: 0 0 20px var(--phosphor-green); }
    100% { opacity: 1; text-shadow: 0 0 5px var(--phosphor-green); }
}

.grid-label {
    width: 100%;
    margin-top: 30px;
    padding-left: 10px;
}

.grid-label h2 {
    font-family: 'League Spartan', sans-serif;
    color: var(--phosphor-green);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1.2rem; /* INCREASED */
    border-left: 3px solid var(--phosphor-green);
    padding-left: 15px;
}

.terminal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 1rem; /* INCREASED */
    color: var(--phosphor-green);
    letter-spacing: 1px;
}

.terminal-form input,
.terminal-form textarea {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(51, 255, 51, 0.3);
    padding: 15px; /* INCREASED */
    color: var(--phosphor-green);
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border 0.3s ease;
    font-size: 1.1rem; /* INCREASED */
}

.terminal-form input:focus,
.terminal-form textarea:focus {
    border: 1px solid var(--phosphor-green);
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.2);
}

.phosphor-link {
    color: var(--phosphor-green);
    text-decoration: none;
    font-weight: bold;
}

.system-alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid;
    font-weight: bold;
    text-align: center;
    letter-spacing: 2px;
    font-size: 1.1rem; /* INCREASED */
}
.system-alert.success {
    color: var(--phosphor-green);
    border-color: var(--phosphor-green);
    background: rgba(51, 255, 51, 0.1);
}
.system-alert.error {
    color: #ff3333;
    border-color: #ff3333;
    background: rgba(255, 51, 51, 0.1);
}

/* Global Link Reset */
a {
    color: var(--phosphor-green);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:visited {
    color: var(--phosphor-green); /* Prevents the purple "visited" look */
}

a:hover {
    text-shadow: 0 0 8px var(--phosphor-green);
    opacity: 0.8;
}

/* --- THE FIX: Subdued lines and high-contrast text --- */
.engage-button {
    display: inline-block;
    padding: 15px 40px; /* INCREASED */
    border: 2px solid var(--phosphor-green);
    color: var(--phosphor-green);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 3px;
    text-decoration: none;
    font-size: 1.3rem; /* INCREASED */
    cursor: pointer;
    text-shadow: 0 0 10px var(--phosphor-green);
    transition: all 0.3s ease;

    /* The "Darker Scanline" Background */
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.9),    /* Deep black line */
        rgba(0, 0, 0, 0.9) 1px,
        rgba(20, 20, 20, 0.6) 1px,  /* Dark charcoal gap */
        rgba(20, 20, 20, 0.6) 2px
    );
}

.engage-button:hover {
    background: var(--phosphor-green);
    color: #000;
    box-shadow: 0 0 20px var(--phosphor-green);
    text-shadow: none;
}

/* Modifier for smaller sub-buttons */
.engage-button.small {
    padding: 8px 20px;      /* SLIGHTLY INCREASED */
    font-size: 0.9rem;     /* SLIGHTLY INCREASED */
    letter-spacing: 1px;    /* Tighter tracking */
    border-width: 1px;      /* Thinner border for a delicate look */
}

/* --- RECORD ANIMATION RENDER --- */
.record-container {
    position: relative;
    width: 350px; /* SLIGHTLY LARGER */
    height: 350px;
    margin: 40px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-art {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(51, 255, 51, 0.3);

    /* The Glow and Rotation */
    box-shadow: 0 0 20px rgba(51, 255, 51, 0.2);
    animation: vinyl-spin 4s linear infinite, phosphor-glow 2s ease-in-out infinite;

    /* Ensures it spins on its exact center */
    transform-origin: center center;
}

/* Phosphor "Breathing" Glow */
@keyframes phosphor-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(51, 255, 51, 0.2); filter: brightness(1); }
    50% { box-shadow: 0 0 35px rgba(51, 255, 51, 0.5); filter: brightness(1.2); }
}

/* Constant Rotation */
@keyframes vinyl-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Optional: Vertical Scan Line moving across the record */
.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(51, 255, 51, 0.2);
    box-shadow: 0 0 10px var(--phosphor-green);
    pointer-events: none;
    animation: scan-pass 3s linear infinite;
    z-index: 5;
}

@keyframes scan-pass {
    0% { top: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Styling the OS ID to look like a BIOS header */
.system-id {
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: #fff; /* White-hot phosphor look */
    text-shadow: 0 0 8px var(--phosphor-green);
    position: relative;
    padding-right: 15px;
}

/* Optional: Adding a small "Power" dot before the text */
.system-id::before {
    content: '●';
    font-size: 0.6rem;
    margin-right: 8px;
    vertical-align: middle;
    color: var(--phosphor-green);
    animation: fast-pulse 1s infinite;
}

/* Subtle Phosphor Warm-up Flicker */
.system-id {
    animation: tube-flicker 4s infinite secondary;
}

@keyframes tube-flicker {
    0%   { opacity: 1; filter: brightness(1.2) blur(0.5px); }
    2%   { opacity: 0.8; filter: brightness(0.8) blur(0px); }
    4%   { opacity: 1; filter: brightness(1.1) blur(0.5px); }
    19%  { opacity: 1; }
    20%  { opacity: 0.9; }
    21%  { opacity: 1; }
    80%  { opacity: 1; }
    82%  { opacity: 0.7; }
    83%  { opacity: 1; }
    100% { opacity: 1; }
}

.close-alert {
    position: absolute;
    top: 6px;
    right: 10px;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
}

.close-alert:hover {
    opacity: 1;
}

.player-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-family: 'Courier New', monospace;
    color: var(--phosphor-green);
    text-shadow: 0 0 5px rgba(51,255,51,0.6);
}

.player-title {
    min-width: 180px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

.player-btn {
    cursor: pointer;
    padding: 4px 8px;
    border: 1px solid rgba(51,255,51,0.3);
    transition: all 0.15s ease;
}

.player-btn:hover {
    background: rgba(51,255,51,0.1);
    box-shadow: 0 0 6px rgba(51,255,51,0.6);
}
