/* Base Styles */
:root {
    --matrix-green: #00ff41;
    --matrix-dark-green: #003b00;
    --matrix-black: #0d0208;
    --matrix-light-grey: #e0e0e0;
    --red-pill: #ff0033;
    --blue-pill: #0066ff;
}

@font-face {
    font-family: 'Matrix Code';
    src: url('https://fonts.cdnfonts.com/css/matrix-code-nfi') format('woff2');
}

.font-geist-mono {
    font-family: 'Orbitron', monospace;
}

body {
    font-family: 'Orbitron', sans-serif;
    background-color: var(--matrix-black);
    color: var(--matrix-green);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

::selection {
    background-color: var(--matrix-green);
    color: var(--matrix-black);
}

/* Loading Screen */
.loading-bar {
    box-shadow: 0 0 10px var(--matrix-green);
}

#loading-progress {
    box-shadow: 0 0 15px var(--matrix-green);
}

/* Navbar Styles */
.nav-link {
    position: relative;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--matrix-green);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Matrix Background */
#matrix-background {
    background-color: var(--matrix-black);
}

#glitch-overlay {
    background: linear-gradient(45deg, rgba(0,255,65,0.1), rgba(0,0,0,0.1));
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* Section Styles */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--matrix-green);
}

/* Character Cards */
.character-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 300px;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.2);
}

.character-image {
    transition: opacity 0.3s ease;
}

.character-card:hover .character-image {
    opacity: 0.3;
}

/* Reality Cards */
.reality-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reality-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.2);
}

/* Pill Styles */
.pill {
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.red-pill {
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.5);
}

.blue-pill:hover {
    box-shadow: 0 0 25px rgba(0, 102, 255, 0.8);
}

.red-pill:hover {
    box-shadow: 0 0 25px rgba(255, 0, 51, 0.8);
}

/* Buttons */
.glitch-button {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.glitch-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.glitch-button:hover::before {
    left: 100%;
}

/* Text animation styles */
.text-reveal {
    opacity: 0;
    transform: translateY(20px);
}

/* Agents section */
#agent-container {
    perspective: 1000px;
}

#agent {
    transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pill {
        width: 80px;
        height: 40px;
    }
}

/* Create a CRT screen effect */
@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.9; }
    10% { opacity: 0.97; }
    15% { opacity: 1; }
    20% { opacity: 0.97; }
    25% { opacity: 0.9; }
    30% { opacity: 0.97; }
    35% { opacity: 0.95; }
    40% { opacity: 0.98; }
    45% { opacity: 0.97; }
    50% { opacity: 1; }
    55% { opacity: 0.97; }
    60% { opacity: 0.95; }
    65% { opacity: 0.98; }
    70% { opacity: 0.97; }
    75% { opacity: 1; }
    80% { opacity: 0.97; }
    85% { opacity: 0.95; }
    90% { opacity: 0.98; }
    95% { opacity: 0.97; }
    100% { opacity: 1; }
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 25, 5, 0.1) 50%, rgba(0, 20, 0, 0.1) 50%), linear-gradient(90deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03) 3px, transparent 3px, transparent 6px);
    background-size: 100% 2px, 6px 100%;
    pointer-events: none;
    z-index: 2000;
    animation: flicker 5s infinite;
    opacity: 0.2;
}

/* Matrix Falling Code animation */
@keyframes falling {
    0% {
        transform: translateY(-100%);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.matrix-char {
    position: absolute;
    top: 0;
    color: var(--matrix-green);
    font-family: monospace;
    font-size: 14px;
    text-shadow: 0 0 8px var(--matrix-green);
    animation: falling linear infinite;
}
