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

body {
    font-family: 'VT323', monospace;
    background: #0a0a0a;
    color: #00ff00;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    font-size: 20px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, calc(0.5 * var(--crt-vignette, 1))) 100%);
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, calc(0.5 * var(--crt-scanlines, 1))) 0px, rgba(0, 0, 0, calc(0.5 * var(--crt-scanlines, 1))) 1px, transparent 1px, transparent 3px);
    pointer-events: none;
    z-index: 9998;
    animation: scanline-move 10s linear infinite;
    transition: opacity 0.5s ease;
}

body.lightbox-open::before,
body.lightbox-open::after {
    opacity: 0;
}

@keyframes scanline-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

.background-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    animation: flicker-screen 0.15s infinite;
    transition: opacity 0.5s ease;
}

body.lightbox-open .background-effect {
    opacity: 0;
}

@keyframes flicker-screen {
    0% { opacity: 0.98; }
    50% { opacity: 1; }
    100% { opacity: 0.97; }
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
    background: repeating-linear-gradient(0deg, rgba(0, 255, 0, calc(0.08 * var(--crt-overlay, 1))), rgba(0, 255, 0, calc(0.08 * var(--crt-overlay, 1))) 2px, transparent 2px, transparent 4px);
    animation: crt-flicker 0.2s infinite;
    transition: opacity 0.5s ease;
}

body.lightbox-open .crt-overlay {
    opacity: 0;
}

@keyframes crt-flicker {
    0% { opacity: calc(0.95 * var(--crt-overlay, 1)); }
    25% { opacity: calc(1.0 * var(--crt-overlay, 1)); }
    50% { opacity: calc(0.98 * var(--crt-overlay, 1)); }
    75% { opacity: calc(1.0 * var(--crt-overlay, 1)); }
    100% { opacity: calc(0.96 * var(--crt-overlay, 1)); }
}

.screen-flicker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9996;
    background: rgba(0, 255, 0, calc(0.05 * var(--crt-flicker, 1)));
    animation: screen-flash 3s infinite;
    transition: opacity 0.5s ease;
}

body.lightbox-open .screen-flicker {
    opacity: 0;
}

@keyframes screen-flash {
    0%, 100% { opacity: 0; }
    10% { opacity: calc(0.5 * var(--crt-flicker, 1)); }
    20% { opacity: 0; }
    30% { opacity: calc(0.3 * var(--crt-flicker, 1)); }
    40%, 90% { opacity: 0; }
    95% { opacity: calc(0.4 * var(--crt-flicker, 1)); }
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(0, 255, 0, 0.3);
    border-radius: 0;
    animation: float linear infinite;
}

@keyframes float {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) translateX(100px); opacity: 0; }
}

header, main, footer {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    filter: blur(0.5px) contrast(1.2);
}

header {
    padding: 2rem 0;
    border-bottom: 2px solid #00ff00;
    background: rgba(0, 0, 0, 0.8);
}

.logo {
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    animation: flicker 3s infinite alternate;
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
    background: #000;
    border: 2px solid #00ff00;
    padding: 0;
}

nav li {
    position: relative;
}

nav a {
    color: #00ff00;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.1s;
    cursor: pointer;
    padding: 0.8rem 1.5rem;
    border-right: 2px solid #00ff00;
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

nav li:last-child a {
    border-right: none;
}

nav a:hover {
    background: #00ff00;
    color: #000;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #000;
    border: 2px solid #00ff00;
    border-top: none;
    min-width: 200px;
    z-index: 1000;
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover {
    display: block;
}

.dropdown-content a {
    border-right: none;
    border-bottom: 2px solid #00ff00;
    padding: 0.8rem 1.5rem;
    display: block;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

main {
    flex: 1;
    padding: 4rem 0;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

.hero {
    margin-bottom: 4rem;
    border: 2px solid #00ff00;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.8);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 3px;
    color: #00ff00;
    text-transform: uppercase;
}

.hero h1::before {
    content: '> ';
    animation: blink 1s infinite;
}

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

.hero p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #00ff00;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.gallery-item {
    aspect-ratio: 4/3;
    background: #000;
    border: 2px solid #00ff00;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s;
    overflow: hidden;
    position: relative;
}

.gallery-item:hover {
    background: #001a00;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    filter: contrast(1.3) brightness(0.9) saturate(0.8);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    padding: 0.5rem;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.1s;
    text-align: center;
    color: #00ff00;
    border-top: 2px solid #00ff00;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gallery-item:hover .gallery-title {
    opacity: 1;
}

.system-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.system-text {
    border: 2px solid #00ff00;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.5);
}

.system-text h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #00ff00;
    text-transform: uppercase;
}

.system-text h2::before {
    content: '> ';
}

.system-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.system-text ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.system-text li {
    padding: 0.3rem 0;
    font-size: 1.1rem;
}

.system-text li::before {
    content: '- ';
    color: #00ff00;
}

.system-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.system-image {
    border: 2px solid #00ff00;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.system-image:hover {
    background: #001a00;
}

.system-image img {
    width: 100%;
    height: auto;
    display: block;
}

.section {
    margin: 4rem 0;
}

.section h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    letter-spacing: 3px;
    color: #00ff00;
    text-transform: uppercase;
}

.section h2::before {
    content: '>> ';
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.contact-info a {
    color: #00ff00;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.1s;
}

.contact-info a:hover {
    background: #00ff00;
    color: #000;
    padding: 0.2rem 0.5rem;
}

.social-links {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.social-links a {
    color: #00ff00;
    text-decoration: none;
    transition: all 0.1s;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.social-links a:hover {
    background: #00ff00;
    color: #000;
    padding: 0.2rem 0.5rem;
}

footer {
    border-top: 2px solid #00ff00;
    padding: 2rem 0 1rem 0;
    text-align: center;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.8);
}

.crt-controls {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 2px solid #00ff00;
    background: #000;
    display: inline-block;
    max-width: 100%;
}

.crt-controls h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.crt-controls h3::before {
    content: '>> ';
}

.control-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    justify-content: space-between;
}

.control-row label {
    font-size: 0.9rem;
    min-width: 100px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-row input[type="range"] {
    width: 120px;
    height: 8px;
    background: #001a00;
    border: 2px solid #00ff00;
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
}

.control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #00ff00;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.8);
}

.control-row input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #00ff00;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.8);
}

.control-row .value-display {
    min-width: 35px;
    text-align: right;
    font-size: 0.85rem;
}

.reset-btn {
    margin-top: 0.8rem;
    padding: 0.5rem 1rem;
    background: #000;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'VT323', monospace;
    font-size: 0.95rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.1s;
    border-radius: 5px;
}

.reset-btn:hover {
    background: #00ff00;
    color: #000;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-controls {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    z-index: 1001;
}

.size-selector {
    background: #000;
    border: 2px solid #00ff00;
    padding: 0;
    display: flex;
    gap: 0;
}

.size-btn {
    background: #000;
    border: none;
    border-right: 2px solid #00ff00;
    color: #00ff00;
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    transition: all 0.1s;
    font-size: 1.1rem;
    font-family: 'VT323', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.size-btn:last-child {
    border-right: none;
}

.size-btn:hover {
    background: #00ff00;
    color: #000;
}

.size-btn.active {
    background: #00ff00;
    color: #000;
}

.lightbox-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 4rem;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.lightbox img.size-50 {
    max-width: 50%;
    max-height: 50%;
}

.lightbox img.size-75 {
    max-width: 75%;
    max-height: 75%;
}

.lightbox img.size-100 {
    max-width: 100%;
    max-height: 100%;
}

.lightbox img.size-fit {
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    color: #00ff00;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.1s;
    background: #000;
    border: 2px solid #00ff00;
    padding: 0.3rem 1rem;
    font-family: 'VT323', monospace;
}

.lightbox-close:hover {
    background: #00ff00;
    color: #000;
}

.empty-gallery {
    text-align: center;
    padding: 4rem 2rem;
    color: #00ff00;
    font-size: 1.3rem;
    border: 2px solid #00ff00;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav a {
        border-right: none;
        border-bottom: 2px solid #00ff00;
    }

    nav li:last-child a {
        border-bottom: none;
    }

    .dropdown-content {
        position: static;
        border: none;
        border-top: 2px solid #00ff00;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .system-content {
        grid-template-columns: 1fr;
    }

    .crt-controls {
        padding: 0.8rem;
    }

    .control-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .control-row label {
        min-width: 80px;
        font-size: 0.85rem;
    }

    .control-row input[type="range"] {
        width: 100px;
    }

    .lightbox-controls {
        top: 1rem;
        right: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .size-selector {
        flex-direction: column;
        gap: 0;
    }

    .size-btn {
        border-right: none;
        border-bottom: 2px solid #00ff00;
        padding: 0.5rem 1rem;
    }

    .size-btn:last-child {
        border-bottom: none;
    }
}
