/* GLITCH EFFECTS - NOW ONLY ON SPECIFIC ELEMENTS */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes textflicker {
    0% { opacity: 1; text-shadow: 0 0 5px #00ff00; }
    25% { opacity: 0.9; text-shadow: 2px 0 3px #ff0000, -2px 0 3px #0000ff; }
    50% { opacity: 1; text-shadow: 0 0 8px #00ff00; }
    75% { opacity: 0.95; text-shadow: -1px 0 2px #ff0000, 1px 0 2px #0000ff; }
    100% { opacity: 1; text-shadow: 0 0 5px #00ff00; }
}

body {
    background: #0c0b0f;
    background-image: 
        radial-gradient(rgba(20, 40, 20, 0.3) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 20, 0, 0.2) 1px, transparent 1px);
    background-size: 30px 30px, 100% 4px;
    color: #ffb347;
    font-family: 'Courier New', Courier, 'VT323', monospace;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    position: relative;
}

/* CRT CURVATURE - STATIC EFFECT (NO FLICKER) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 1000;
}

/* VHS NOISE OVERLAY - STATIC */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,0.1) 0px, rgba(255,255,255,0.05) 1px, transparent 2px);
    pointer-events: none;
    opacity: 0.2;
    z-index: 999;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    border: 3px solid #2a5c2a;
    padding: 25px;
    background: rgba(10, 15, 10, 0.9);
    box-shadow: 0 0 20px #00aa00, inset 0 0 20px #003300;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(1px);
}

/* WARNING BANNER - KEEPS THE FLICKER */
.warning {
    background: #000;
    border: 2px solid #ff3333;
    color: #ff3333;
    text-align: center;
    padding: 10px;
    margin-bottom: 25px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: textflicker 3s infinite;
    box-shadow: 0 0 15px #ff0000;
}

.warning span {
    display: inline-block;
    animation: glitch 0.3s infinite;
}

/* ASCII HEADER - NO FLICKER, JUST GLOW */
.ascii-header {
    color: #4aff4a;
    font-size: 12px;
    line-height: 1.2;
    white-space: pre;
    text-align: center;
    margin: 20px 0;
    text-shadow: 0 0 8px #00ff00;
    background: rgba(0, 20, 0, 0.7);
    padding: 15px;
    border: 1px solid #2a5c2a;
    font-weight: normal;
    animation: textflicker 3s infinite;
}

/* BLINKING CURSOR EFFECT - SUBTLE */
.cursor {
    background: #ffb347;
    display: inline-block;
    width: 10px;
    height: 18px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* NAVIGATION - TAPE DRIVE STYLE */
.nav {
    border: 2px solid #2a5c2a;
    background: #0a140a;
    padding: 15px;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.nav-item {
    border: 1px solid #3f9f3f;
    padding: 8px 15px;
    color: #ffb347;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    background: #0f1a0f;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

/* HOVER EFFECT - GLITCH ONLY ON HOVER */
.nav-item:hover {
    background: #1f3a1f;
    color: #ffffff;
    text-shadow: 0 0 10px #00ff00;
    border-color: #00ff00;
    box-shadow: 0 0 15px #00ff00;
    animation: glitch 0.2s infinite;
}

.nav-item:hover::before {
    content: ">";
    position: absolute;
    left: 2px;
    color: #00ff00;
}

.nav-item:hover::after {
    content: "<";
    position: absolute;
    right: 2px;
    color: #00ff00;
}

/* TERMINAL INPUT LINE */
.terminal-line {
    border-left: 3px solid #00aa00;
    padding-left: 15px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
}

.terminal-line::before {
    content: "$ ";
    color: #ffff00;
    font-weight: bold;
}

/* CONTENT SECTIONS - CLASSIFIED FOLDERS */
.section {
    border: 1px dashed #3f9f3f;
    padding: 15px;
    margin: 25px 0;
    background: rgba(0, 10, 0, 0.6);
    position: relative;
}

.section-title {
    position: absolute;
    top: -12px;
    left: 15px;
    background: #0c0b0f;
    padding: 0 10px;
    color: #9f9f00;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 14px;
    border: 1px solid #3f9f3f;
    animation: textflicker 3s infinite;
}

/* ENTRY LOG STYLE */
.log-entry {
    border-bottom: 1px solid #1f3a1f;
    padding: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.log-date {
    color: #9f9f00;
    min-width: 100px;
    font-weight: bold;
}

.log-title {
    color: #00ffff;
    text-decoration: none;
    flex: 1;
}

.log-title:hover {
    text-decoration: underline;
    color: #ffffff;
    text-shadow: 0 0 8px cyan;
}

.log-tag {
    background: #1a2a1a;
    color: #7fff7f;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 12px;
    border: 1px solid #2a5c2a;
}

/* RETRO COMPUTER CARD */
.computer-card {
    display: inline-block;
    background: #0f1a0f;
    border: 2px solid #2a5c2a;
    padding: 10px;
    margin: 10px 5px;
    text-align: center;
    box-shadow: 5px 5px 0 #001100;
}

.computer-card:hover {
    box-shadow: 0 0 20px #00ff00;
}

/* ENCRYPTED TEXT EFFECT - GLITCH ON HOVER ONLY */
.encrypted {
    color: #6f6f6f;
    font-family: monospace;
    letter-spacing: 2px;
    word-break: break-all;
}

.encrypted:hover {
    color: #ffffff;
    animation: glitch 0.2s infinite;
}

/* FOOTER - SIGNAL METER */
.footer {
    margin-top: 40px;
    border-top: 2px solid #2a5c2a;
    padding: 15px;
    text-align: center;
    font-size: 12px;
    color: #5f9f5f;
    position: relative;
}

.signal-bars {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 10px 0;
}

.bar {
    width: 20px;
    height: 15px;
    background: #2a5c2a;
    animation: signal 2s infinite;
}

.bar:nth-child(1) { height: 10px; animation-delay: 0s; }
.bar:nth-child(2) { height: 15px; animation-delay: 0.2s; }
.bar:nth-child(3) { height: 20px; animation-delay: 0.4s; }
.bar:nth-child(4) { height: 15px; animation-delay: 0.6s; }
.bar:nth-child(5) { height: 10px; animation-delay: 0.8s; }

@keyframes signal {
    0%, 100% { background: #2a5c2a; }
    50% { background: #00ff00; box-shadow: 0 0 15px #00ff00; }
}

/* TYPEWRITER EFFECT - OCCASIONAL USE */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end);
    border-right: 3px solid #00ff00;
    width: fit-content;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* RESPONSIVE DESIGN */
@media (max-width: 600px) {
    .container { padding: 10px; }
    .ascii-header { font-size: 8px; }
    .log-entry { flex-direction: column; }
}