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

body {
    width: 1080px;
    height: 1920px;
    background: #000;
    overflow: hidden;
    position: relative;
    font-family: 'Courier New', monospace;
    cursor: none;
}

.crt {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    animation: monitorOn 2s ease-in-out;
}

.grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0;
    animation: fadeIn 0.5s 1.5s forwards;
}

.scanlines {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    opacity: 0.3;
    animation: scanlines 0.3s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

.flicker {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 65, 0.02);
    animation: flicker 0.15s infinite;
    opacity: 0;
    animation-delay: 2s;
}

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

.bulge {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(0, 0, 0, 0.5) 100%
    );
    pointer-events: none;
}

.terminal {
    position: absolute;
    top: 200px;
    left: 100px;
    right: 100px;
    color: #00FF41;
    font-size: 42px;
    line-height: 1.8;
    text-shadow: 0 0 10px #00FF41, 0 0 20px rgba(0, 255, 65, 0.5);
    z-index: 10;
}

.line {
    height: 75px;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
}

.cursor {
    display: inline-block;
    width: 25px;
    height: 55px;
    background: #00FF41;
    vertical-align: text-bottom;
    animation: blink 1s infinite, pulse 2s infinite;
    box-shadow: 0 0 15px #00FF41;
}

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

@keyframes pulse {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.9); }
}

.glitch {
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 2px,
        transparent 2px,
        transparent 8px
    );
    opacity: 0;
    pointer-events: none;
    z-index: 50;
}

.glitch.active {
    animation: glitch 0.5s;
}

@keyframes glitch {
    0% { 
        opacity: 0; 
        transform: translateX(0);
    }
    20% { 
        opacity: 1; 
        transform: translateX(-20px);
        filter: hue-rotate(90deg);
    }
    40% { 
        transform: translateX(20px);
        filter: hue-rotate(180deg);
    }
    60% { 
        transform: translateX(-10px);
        filter: hue-rotate(270deg);
    }
    80% { 
        transform: translateX(10px);
        filter: hue-rotate(360deg);
    }
    100% { 
        opacity: 0; 
        transform: translateX(0);
    }
}

.ascii-corner {
    position: absolute;
    color: #00CC33;
    font-size: 24px;
    opacity: 0.3;
    font-family: monospace;
}

.ascii-top-left {
    top: 50px;
    left: 50px;
}

.ascii-bottom-right {
    bottom: 50px;
    right: 50px;
}

.breathing {
    animation: breathe 4s infinite;
}

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

.link {
    color: #00FFFF;
    text-shadow: 0 0 15px #00FFFF;
    opacity: 0;
}

.link.highlight {
    animation: linkHighlight 1s forwards;
}

@keyframes linkHighlight {
    0% { 
        opacity: 0; 
        text-shadow: 0 0 5px #00FFFF;
    }
    50% { 
        opacity: 1; 
        text-shadow: 0 0 30px #00FFFF, 0 0 50px rgba(0, 255, 255, 0.8);
    }
    100% { 
        opacity: 1; 
        text-shadow: 0 0 15px #00FFFF;
    }
}

@keyframes monitorOn {
    0% { 
        transform: scale(0.8); 
        filter: brightness(0) contrast(2);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        filter: brightness(0.5) contrast(1.5);
        opacity: 0.8;
    }
    100% { 
        transform: scale(1); 
        filter: brightness(1) contrast(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}
