/* --- Wired Global Reset --- */
* {
    box-sizing: border-box;
    cursor: crosshair; /* Very Lain/Navi feel */
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    background-image: url('lain.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #000;
    color: #00ffff;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden; /* No page scrolling */
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* --- Pulse Animations --- */
@keyframes wired-glow {
    0% { box-shadow: 0 0 10px rgba(0, 255, 255, 0.4), inset 0 0 5px rgba(0, 255, 255, 0.2); }
    50% { box-shadow: 0 0 25px rgba(0, 255, 255, 0.8), inset 0 0 10px rgba(0, 255, 255, 0.4); }
    100% { box-shadow: 0 0 10px rgba(0, 255, 255, 0.4), inset 0 0 5px rgba(0, 255, 255, 0.2); }
}

@keyframes text-flicker {
    0%, 100% { opacity: 1; text-shadow: 0 0 8px #00ffff; }
    50% { opacity: 0.8; text-shadow: 0 0 15px #00ffff; }
}

/* --- Main Container (500x500 Square) --- */
.container {
    background-color: rgba(0, 0, 0, 0.8);
    width: 500px;
    height: 500px;
    margin-top: 5vh;
    border: 2px solid #00ffff;
    padding: 30px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: wired-glow 4s infinite ease-in-out;
    position: relative;
    z-index: 5;
}

h1 {
    font-size: 1.8rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    animation: text-flicker 3s infinite;
    margin-bottom: 5px;
}

.status {
    color: #ff00ff;
    font-size: 0.7rem;
    margin-bottom: 30px;
}

h2 {
    font-size: 1rem;
    letter-spacing: 4px;
    margin-top: 20px;
}

/* --- Buttons --- */
.download-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #00ffff;
    color: #00ffff;
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.3s;
    background: transparent;
}

.download-btn:hover {
    background: #00ffff;
    color: #000;
    box-shadow: 0 0 20px #00ffff;
}

/* --- Gallery Grid --- */
.gallery {
    width: 100%;
    margin-top: 20px;
    overflow-y: auto;
    padding-right: 5px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.gallery-img {
    width: 100%;
    border: 1px solid #00ffff;
    transition: 0.3s;
    filter: brightness(0.6) cyan; /* Starts dark */
}

.gallery-img:hover {
    filter: brightness(1);
    transform: scale(1.05);
    box-shadow: 0 0 10px #00ffff;
}

/* --- THE MODAL (Fixed Lightbox) --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 99999; /* Higher than everything */
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(15px);
}

.modal-content {
    width: 80vw; /* Force breakout from 500px container */
    max-height: 80vh;
    border: 2px solid #00ffff;
    box-shadow: 0 0 40px #00ffff;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: zoom-in;
}

.modal-content.zoomed {
    transform: scale(1.3);
    cursor: zoom-out;
}