:root {
    --bg-color: #050505;
    --text-color: #a0a0a0;
    --accent-color: #8a0303; /* Blood Red */
    --highlight-color: #dcdcdc; /* Bone White */
    --glitch-color: #00ffea;
    --font-heading: 'UnifrakturMaguntia', cursive;
    --font-body: 'Courier New', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: crosshair; /* Adds to the unsettling feeling */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* CRT Scanline Effect Overlay */
.scanlines {
    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: 1000;
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    text-align: center;
    padding: 4rem 0;
    border-bottom: 2px solid var(--accent-color);
    margin-bottom: 2rem;
}

h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px #000;
    animation: pulse 3s infinite;
}

.subtitle {
    font-size: 1.2rem;
    letter-spacing: 4px;
    opacity: 0.7;
}

/* Navigation */
nav ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    margin-top: 1rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-color);
}

/* Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: #0a0a0a;
    border: 1px solid #333;
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.card h3 {
    font-family: var(--font-heading);
    color: var(--highlight-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card .tag {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-color);
    color: #fff;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: bold;
}

.card a {
    color: var(--accent-color);
    font-weight: bold;
    text-decoration: underline;
}

/* Glitch Effect Utility */
.glitch {
    position: relative;
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}
.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 15px, 0); }
    20% { clip: rect(70px, 9999px, 100px, 0); }
    40% { clip: rect(30px, 9999px, 80px, 0); }
    60% { clip: rect(5px, 9999px, 40px, 0); }
    80% { clip: rect(60px, 9999px, 20px, 0); }
    100% { clip: rect(10px, 9999px, 90px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(120px, 9999px, 15px, 0); }
    20% { clip: rect(20px, 9999px, 100px, 0); }
    40% { clip: rect(60px, 9999px, 80px, 0); }
    60% { clip: rect(10px, 9999px, 40px, 0); }
    80% { clip: rect(100px, 9999px, 20px, 0); }
    100% { clip: rect(50px, 9999px, 90px, 0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; text-shadow: 2px 2px 4px #000; }
    50% { opacity: 0.8; text-shadow: 0 0 10px var(--accent-color); }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    flex-direction: column;
}

.modal-content {
    text-align: center;
    max-width: 600px;
}

.enter-btn {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-top: 2rem;
    transition: all 0.3s;
}

.enter-btn:hover {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-color);
}

.hidden {
    display: none !important;
}

/* Secret Section */
.secret-terminal {
    background: #000;
    color: #0f0;
    padding: 2rem;
    border: 1px solid #0f0;
    margin-top: 4rem;
    font-family: 'Courier New', monospace;
    display: none;
}
