/* === WIDM THEME: Global Reset & Fonts === */
@import url("https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Montserrat:wght@300;600;900&display=swap");

:root {
    /* WIDM Palette */
    --widm-green: #50c878; /* "The Mole" Green */
    --widm-dark-green: #2b5c3a; /* Deep vegetation green */
    --widm-black: #0a0a0a; /* Cinematic black */
    --widm-charcoal: #1c1c1c; /* Panel background */
    --widm-red: #e74c3c; /* Execution screen red */
    --widm-scanline: rgba(80, 200, 120, 0.05);
}

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

body {
    font-family: "Montserrat", sans-serif;
    background-color: var(--widm-black);
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;

    /* Cinematic Vignette Background */
    background: radial-gradient(circle at center, #2a2a2a 0%, #000000 100%);
}

/* Overlay Scanline Effect (TV Style) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
    opacity: 0.3;
}

/* === The Container (Dossier/Terminal) === */
.card {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #333;
    box-shadow: 0 0 30px rgba(80, 200, 120, 0.1);
    position: relative;
    width: 100%;
    backdrop-filter: blur(10px);
}

/* Top "Secret" Border */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--widm-green);
    box-shadow: 0 0 10px var(--widm-green);
}

/* Card Variant: Login */
.card-login {
    max-width: 450px;
    padding: 50px 40px;
    text-align: center;
}

/* Card Variant: Content (Dossier) */
.card-content {
    max-width: 800px;
    padding: 60px;
}

/* Card Variant: Error (Red Screen) */
.card-error {
    max-width: 500px;
    padding: 60px;
    text-align: center;
    border-color: var(--widm-red);
}
.card-error::before {
    background: var(--widm-red);
    box-shadow: 0 0 15px var(--widm-red);
}
.theme-error {
    background: radial-gradient(circle at center, #2a0a0a 0%, #000000 100%);
}

/* === Typography === */
h1 {
    font-family: "Montserrat", sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 30px;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.card-content h1 {
    font-size: 32px;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    display: inline-block;
}

.card-error h1 {
    font-size: 80px;
    color: var(--widm-red);
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
    letter-spacing: 5px;
}

p {
    font-family: "Courier Prime", monospace; /* Typewriter style */
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #bbb;
}

p:hover {
    color: white;
    transition: color 0.2s ease;
}

/* === The Requested CODE Element === */
/* Styled like a secret message or fingerprint scan data */
code {
    display: block;
    background: #000;
    color: var(--widm-green);
    font-family: "Courier Prime", monospace;
    padding: 20px;
    margin: 20px 0;
    border-left: 3px solid var(--widm-green);
    font-size: 14px;
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

/* === Blinking Cursor Animation === */
@keyframes blink-animation {
    0%,
    50% {
        opacity: 1;
    }
    51%,
    100% {
        opacity: 0;
    }
}

/* === Code Block Cursor === */
code::after {
    content: "█"; /* The cursor character (solid block) */
    display: inline-block;
    margin-left: 5px; /* Space between text and cursor */

    color: var(--widm-green);
    font-family: "Courier Prime", monospace;
    font-size: 14px;

    /* The Animation */
    animation: blink-animation 1s step-end infinite;

    /* Optional: Remove the old "ENCRYPTED_DATA..." text if you had it */
    /* If you want both, let me know, but usually cursor replaces the status text */
}

/* === Inputs (The Terminal) === */
input[type="password"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    color: var(--widm-green);
    font-family: "Courier Prime", monospace;
    padding: 20px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
    margin-bottom: 30px;
    transition: all 0.3s;
}

input[type="password"]:focus {
    outline: none;
    border-color: var(--widm-green);
    background: black;
    box-shadow: 0 0 15px rgba(80, 200, 120, 0.2);
}

input::placeholder {
    color: #444;
    letter-spacing: 1px;
}

/* === Buttons (The Joker/Laser) === */
.btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: transparent;
    border: 1px solid var(--widm-green);
    color: var(--widm-green);
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--widm-green);
    color: black;
    box-shadow: 0 0 20px rgba(80, 200, 120, 0.4);
}

/* Error Button (Red) */
.theme-error .btn {
    border-color: var(--widm-red);
    color: var(--widm-red);
}
.theme-error .btn:hover {
    background: var(--widm-red);
    color: white;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.4);
}

/* === Divider (Scanner Line) === */
hr {
    border: 0;
    height: 1px;
    /* Fades out at the edges like a laser scan or signal interruption */
    background: linear-gradient(
        90deg,
        transparent,
        var(--widm-green),
        transparent
    );
    margin: 40px 0;
    opacity: 0.6;
    /* Subtle radioactive glow */
    box-shadow: 0 0 8px rgba(80, 200, 120, 0.4);
}

/* === Lists (Data Points) === */
ul,
ol {
    margin: 25px 0;
    padding-left: 40px; /* Space for the custom markers */
}

li {
    margin-bottom: 15px;
    font-family: "Courier Prime", monospace;
    color: #bbb;
    position: relative;
    line-height: 1.6;
}

/* Unordered Lists (Bullet Points) - Digital Cursor Style */
ul {
    list-style: none; /* Remove default bullets */
}

ul li::before {
    content: "■"; /* Solid digital block */
    color: var(--widm-green);
    font-size: 12px;
    position: absolute;
    left: -25px;
    top: 1px;
    /* The signature glow */
    text-shadow: 0 0 5px var(--widm-green);
}

/* Ordered Lists (Numbered) - Protocol Style */
ol {
    list-style: none; /* Remove default numbers */
    counter-reset: widm-counter; /* Initialize custom counter */
}

ol li::before {
    counter-increment: widm-counter;
    content: "0" counter(widm-counter) " //"; /* Adds a zero and slashes (e.g., "01 //") */

    color: var(--widm-green);
    font-weight: bold;
    font-family: "Montserrat", sans-serif; /* Contrast font for numbers */
    font-size: 12px;

    position: absolute;
    left: -50px;
    width: 40px;
    text-align: right;
}

/* Hover effect for list items (Interactivity) */
li:hover {
    color: white;
    transition: color 0.2s ease;
}

/* === Links === */
.text-link {
    display: inline-block;
    margin-top: 30px;
    color: #666;
    text-decoration: none;
    font-family: "Courier Prime", monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.text-link:hover {
    color: var(--widm-green);
}

/* === Mobile Responsiveness === */
@media (max-width: 600px) {
    /* Reduce body padding to let cards go closer to the edge */
    body {
        padding: 10px;
    }

    /* Reduce internal card padding significantly */
    .card-content,
    .card-login,
    .card-error {
        padding: 30px 20px; /* 30px top/bottom, 20px left/right */
    }

    /* Adjust typography for smaller screens */
    h1 {
        font-size: 24px;
    }

    .card-error h1 {
        font-size: 50px; /* Prevent huge 404 from breaking layout */
    }

    p {
        font-size: 14px; /* Slightly smaller typewriter text */
    }

    /* Ensure code blocks don't overflow */
    code {
        font-size: 12px;
        padding: 15px;
    }
}

/* === Old School TV Container === */
.tv-wrapper {
    position: relative;
    margin: 30px 0;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    /* A subtle green glow around the "screen" */
    box-shadow: 0 0 15px rgba(80, 200, 120, 0.1);
    border: 1px solid #1a1a1a;
}

/* === The Image (The Signal) === */
.tv-wrapper img {
    width: 100%;
    height: auto;
    display: block;

    /* 1. The Color Grade: Heavy green, high contrast, blurry */
    filter: grayscale(100%) sepia(100%) hue-rotate(70deg) contrast(1.3)
        brightness(0.5) blur(0.6px);

    /* Slight Distortion */
    transform: scale(1.3) skewX(-6deg);
}

/* === Layer 1: Scanlines === */
.tv-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;

    /* Horizontal dark lines every 4 pixels */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 50%,
        rgba(0, 0, 0, 0.4) 50%
    );
    background-size: 100% 4px;
}

/* === Layer 2: Vignette & Noise === */
.tv-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;

    /* 1. Vignette: Deep black inner shadow to darken corners */
    box-shadow: inset -100px -50px 250px rgba(0, 0, 0, 1);
}
