/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DejaVu Sans Mono', monospace;
    background: #000; 
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Pixel Grid Background Overlay */
.pixel-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 4;
}

/* Rain Animation Container */
.rain-container {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden; 
}

.rain-drop {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(to top, transparent, currentColor);
    animation: rainFall linear infinite;
    opacity: 0.8;
}

@keyframes rainFall {
    0% {
        transform: translateY(100vh);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px);
        opacity: 0;
    }
}

/* Parallax Container */
.parallax-container {
    position: relative;
    z-index: 3;
}

.parallax-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Section-specific backgrounds with parallax */
.section-1 {
    background-image: url('../images/frog_background.png');
    background-blend-mode: multiply;
    background-color: rgba(0, 0, 0, 0.7);
}

.section-2 {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 50%, #0a1a0a 100%);
    position: relative;
}

.section-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/background.png');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    opacity: 0.2;
    transform: translateZ(0) scale(1.1);
}

.section-3 {
    background: radial-gradient(circle at center, #001122 0%, #000000 70%);
    position: relative;
}

.section-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/background.png');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    opacity: 0.1;
    transform: translateZ(0) scale(1.2);
}

/* Content Wrapper */
.content-wrapper {
    max-width: 800px;
    text-align: center;
    position: relative;
    z-index: 4;
    background: rgba(0, 0, 0, 0.8);
    padding: 3rem;
    border: 2px solid #00ffff;
    border-radius: 0;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
}

/* Typography Styles */
.glitch-text {
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #fff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff;
    animation: glitch 2s infinite;
    margin-bottom: 2rem;
}

@keyframes glitch {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-2px) skew(-1deg); }
    20% { transform: translateX(2px) skew(1deg); }
    30% { transform: translateX(-1px) skew(-0.5deg); }
    40% { transform: translateX(1px) skew(0.5deg); }
    50% { transform: translateX(0); }
}

.neon-text {
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #ff00ff;
    text-shadow: 
        0 0 10px #ff00ff,
        0 0 20px #ff00ff,
        0 0 30px #ff00ff;
    margin-bottom: 2rem;
    animation: neonPulse 3s ease-in-out infinite;
}

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

.rainbow-text {
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowShift 3s ease-in-out infinite;
    margin-bottom: 2rem;
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.cyber-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #cccccc;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
}

/* Accent Elements */
.accent-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    margin: 2rem 0;
    animation: lineGlow 2s ease-in-out infinite;
}

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

/* Data Grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.data-cell {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #00ff00;
    text-align: center;
    animation: dataFlicker 4s ease-in-out infinite;
}

.data-cell:nth-child(2) { animation-delay: 1s; }
.data-cell:nth-child(3) { animation-delay: 2s; }
.data-cell:nth-child(4) { animation-delay: 3s; }

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

/* Terminal Window */
.terminal-window {
    background: #000;
    border: 2px solid #00ff00;
    border-radius: 0;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.terminal-header {
    background: #333;
    padding: 0.5rem 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca3f; }

.terminal-content {
    padding: 1rem;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    font-size: 0.9rem;
}

.terminal-content p {
    margin: 0.5rem 0;
    animation: typewriter 0.5s ease-in-out;
}

.terminal-content p:nth-child(2) { animation-delay: 1s; }
.terminal-content p:nth-child(3) { animation-delay: 2s; }

@keyframes typewriter {
    from { width: 0; opacity: 0; }
    to { width: 100%; opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .glitch-text {
        font-size: 2.5rem;
    }
    
    .neon-text,
    .rainbow-text {
        font-size: 2rem;
    }
    
    .cyber-text {
        font-size: 1rem;
    }
    
    .content-wrapper {
        padding: 2rem;
        margin: 1rem;
    }
    
    .parallax-section {
        padding: 1rem;
    }
    
    .pixel-grid {
        background-size: 15px 15px;
    }
    
    .data-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .glitch-text {
        font-size: 2rem;
        letter-spacing: 0.1em;
    }
    
    .neon-text,
    .rainbow-text {
        font-size: 1.5rem;
        letter-spacing: 0.1em;
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }
    
    .pixel-grid {
        background-size: 10px 10px;
    }
}

/* Performance Optimizations */
.parallax-section {
    will-change: transform;
    transform: translateZ(0);
}

.rain-drop {
    will-change: transform;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .glitch-text,
    .neon-text,
    .rainbow-text,
    .accent-line,
    .data-cell,
    .rain-drop {
        animation: none;
    }
    
    .parallax-section {
        background-attachment: scroll;
    }
}