@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Courier New', monospace;
    background: #1a1a2e;
    color: #eee;
    line-height: 1.7;
    position: relative;
    overflow-x: hidden;
}

/* VHS Scanlines */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.97; }
    50% { opacity: 1; }
    100% { opacity: 0.97; }
}

/* VHS Noise */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 999;
    opacity: 0.3;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* VHS Header */
.vhs-header {
    background: linear-gradient(135deg, #ff0080 0%, #ff8c00 50%, #40e0d0 100%);
    padding: 60px 30px;
    margin-bottom: 30px;
    border: 4px solid #fff;
    box-shadow: 
        0 0 20px rgba(255, 0, 128, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    position: relative;
    transform: perspective(500px) rotateX(0deg);
}

.vhs-header::before {
    content: '▶ REC';
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ff0000;
    font-size: 0.9em;
    font-weight: 900;
    animation: blink 1s infinite;
    text-shadow: 0 0 10px #ff0000;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.vhs-header::after {
    content: 'PLAY █';
    position: absolute;
    bottom: 15px;
    left: 20px;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.7);
}

h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2em;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 
        3px 3px 0 #ff0080,
        6px 6px 0 #40e0d0,
        9px 9px 0 #ff8c00;
    line-height: 1.4;
    animation: glitchText 5s infinite;
}

@keyframes glitchText {
    0%, 90%, 100% { transform: translate(0, 0); }
    92% { transform: translate(-2px, 1px); }
    94% { transform: translate(2px, -1px); }
    96% { transform: translate(-1px, 2px); }
}

.subtitle {
    font-size: 1em;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Retro Box */
.retro-box {
    background: linear-gradient(135deg, #2a2a4e 0%, #1a1a2e 100%);
    padding: 40px 30px;
    margin-bottom: 25px;
    border: 3px solid #ff0080;
    box-shadow: 
        0 0 30px rgba(255, 0, 128, 0.3),
        inset 0 0 30px rgba(64, 224, 208, 0.1);
    position: relative;
}

.retro-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid #40e0d0;
    margin: 5px;
    pointer-events: none;
}

h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5em;
    color: #ff0080;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff0080;
    text-transform: uppercase;
}

h3 {
    font-size: 1.3em;
    color: #40e0d0;
    margin: 25px 0 12px 0;
    text-shadow: 0 0 8px #40e0d0;
    text-transform: uppercase;
}

h3::before {
    content: '► ';
    color: #ff8c00;
}

p {
    margin-bottom: 16px;
    font-size: 1.05em;
    color: #ddd;
    line-height: 1.8;
    text-align: justify;
}

a {
    color: #ff8c00;
    text-decoration: none;
    font-weight: 700;
    text-shadow: 0 0 8px #ff8c00;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: #40e0d0;
    text-shadow: 0 0 12px #40e0d0;
}

/* Tape Counter */
.tape-counter {
    background: #000;
    color: #0f0;
    padding: 20px;
    margin: 30px 0;
    border: 3px solid #0f0;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    font-family: 'Courier New', monospace;
    text-align: center;
}

.counter-title {
    font-size: 1.1em;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.counter-text {
    color: #0f0;
    line-height: 1.7;
}

/* Grid Display */
.grid-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.grid-item {
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.2) 0%, rgba(64, 224, 208, 0.2) 100%);
    padding: 25px;
    border: 2px solid #ff8c00;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.3);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.grid-item:hover {
    border-color: #40e0d0;
    box-shadow: 0 0 25px rgba(64, 224, 208, 0.5);
    transform: translateY(-5px);
}

.grid-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px #ff0080);
}

.grid-title {
    font-size: 1.1em;
    color: #ff8c00;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 0 8px #ff8c00;
}

.grid-desc {
    font-size: 0.95em;
    color: #bbb;
}

/* Retro Lists */
ul {
    margin: 20px 0;
    list-style: none;
}

li {
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
    font-size: 1.05em;
    color: #ddd;
}

li::before {
    content: '■';
    position: absolute;
    left: 0;
    color: #ff0080;
    font-size: 1.2em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* TV Screen Effect */
.tv-screen {
    background: #000;
    border: 10px solid #333;
    border-radius: 20px;
    padding: 40px;
    margin: 35px 0;
    text-align: center;
    box-shadow: 
        0 0 40px rgba(255, 0, 128, 0.4),
        inset 0 0 40px rgba(64, 224, 208, 0.2);
    position: relative;
}

.tv-screen::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    animation: scanline 6s linear infinite;
}

@keyframes scanline {
    0% { top: 0%; }
    100% { top: 100%; }
}

.tv-icon {
    font-size: 4em;
    margin-bottom: 15px;
    animation: rainbow 3s linear infinite;
}

@keyframes rainbow {
    0% { filter: drop-shadow(0 0 20px #ff0080); }
    33% { filter: drop-shadow(0 0 20px #40e0d0); }
    66% { filter: drop-shadow(0 0 20px #ff8c00); }
    100% { filter: drop-shadow(0 0 20px #ff0080); }
}

.tv-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2em;
    color: #fff;
    text-shadow: 0 0 15px #ff0080;
    text-transform: uppercase;
}

footer {
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 0.9em;
    margin-top: 50px;
    border-top: 3px solid #ff0080;
    box-shadow: 0 -5px 20px rgba(255, 0, 128, 0.3);
}

@media (max-width: 768px) {
    h1 { font-size: 1.5em; }
    h2 { font-size: 1.2em; }
    .retro-box { padding: 25px 20px; }
    .grid-display { grid-template-columns: 1fr; }
}
