:root {
    /* Colors */
    --bg-color: #0a0a0a;
    --primary: #33ff00;
    --secondary: #ffb000;
    --muted: #1f521f;
    --accent: #33ff00;
    --error: #ff3333;
    --border: #1f521f;



    /* Fonts */
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Radius & Spacing */
    --radius: 0px;

    /* Effects */
    --text-shadow: 0 0 5px rgba(51, 255, 0, 0.5);
    --crt-line: rgba(51, 255, 0, 0.03);
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');
}

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

body {
    background-color: var(--bg-color);
    color: var(--primary);
    font-family: var(--font-mono);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    font-size: 14px;
    /* Reduced base font size */
    position: relative;
}

/* CRT Overlay */
body::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    /*background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    */
    z-index: 2000;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    text-shadow: var(--text-shadow);
}

p {
    margin-bottom: 1rem;
}

.gradient-text {
    /* No gradients in terminal mode, fallback to specific color or underline */
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-color);
    border-bottom: 1px dashed var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 2200;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.logo-icon {
    color: var(--primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Hero Section */
.hero {
    padding: 1rem 0;
    /* Reduced from 4rem */
    text-align: left;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    /* Reduced from 2rem */
}

.hero-title {
    font-size: 1.8rem;
    /* Reduced from 2.5rem */
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: var(--primary);
    font-size: 1rem;
    opacity: 0.8;
    max-width: 800px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    /* Tighter gap */
    margin-bottom: 1rem;
    /* Reduced margin to gallery */
    flex-wrap: wrap;
    font-family: var(--font-mono);
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 3px 10px;
    /* Reduced padding */
    cursor: pointer;
    font-family: var(--font-mono);
    text-transform: uppercase;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 700;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary);
    color: #000;
}

/* Gallery / Cards */
.gallery {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    /* Grid styles removed for JS Masonry */
}

/* Breakpoints handled in JS now, but keeping simple fallbacks is okay or just empty */


.card {
    background: #000;
    border: 1px solid var(--border);
    position: absolute;
    /* JS Masonry */
    left: 0;
    top: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: var(--primary);
    transform: translate(0, -5px);
    /* Lift up slightly */
    box-shadow: 0 5px 15px rgba(51, 255, 0, 0.2);
    /* Green glow */
    z-index: 2100;
}

.card-image-wrapper {
    border-bottom: 1px dashed var(--border);
    overflow: hidden;
}

.card-image {
    width: 100%;
    display: block;
    /*filter: grayscale(100%) contrast(1.2) brightness(0.8);
    /* Retro image feel */
    transition: filter 0.3s, transform 0.5s ease-out;
    /* Smooth zoom */
}

.card:hover .card-image {
    filter: none;
    transform: scale(1.05);
    /* Zoom effect */
}

.card-content {
    padding: 15px;
}

.card-category {
    font-size: 0.8rem;
    color: var(--secondary);
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

.card-title {
    font-size: 0.9rem;
    /* Smaller title */
    margin: 0;
    color: var(--primary);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2500;
    display: none;
    /* JS toggles this */
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: #000;
    border: 1px solid var(--primary);
    width: 90vw;
    max-width: 1000px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 20px rgba(51, 255, 0, 0.2);
    z-index: 2501;
}

.modal-close {
    position: absolute;
    top: -15px;
    right: -10px;
    background: #000;
    border: 1px solid var(--primary);
    color: var(--primary);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: var(--font-mono);
}

.modal-close:hover {
    background: var(--primary);
    color: #000;
}

.modal-body {
    display: flex;
    height: 100%;
}

@media(max-width: 768px) {
    .modal-body {
        flex-direction: column;
        overflow-y: auto;
    }
}

.modal-image-container {
    flex: 1;
    border-right: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(45deg,
            #0a0a0a,
            #0a0a0a 10px,
            #0f0f0f 10px,
            #0f0f0f 20px);
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    border: 1px solid var(--muted);
}

.modal-info {
    flex: 0 0 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

@media(max-width: 768px) {
    .modal-info {
        flex: none;
        border-top: 1px dashed var(--border);
    }
}

.modal-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.badge {
    color: var(--secondary);
    border: 1px solid var(--secondary);
    padding: 2px 8px;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-right: 10px;
}

.modal-prompt-box {
    background: #000;
    border: 1px solid var(--muted);
    padding: 10px;
    flex-grow: 1;
    overflow-y: auto;
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 0.9rem;
    margin-top: 10px;
}

.copy-btn {
    margin-top: 20px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 10px;
    text-transform: uppercase;
    font-family: var(--font-mono);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.copy-btn:hover {
    background: var(--primary);
    color: #000;
}

/* Loading/Spinner */
.spin {
    animation: spin 1s steps(8) infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Input Elements (if any) - applying general terminal style */
input,
textarea,
select {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--muted);
    color: var(--primary);
    font-family: var(--font-mono);
    padding: 5px;
    outline: none;
}

input:focus,
textarea:focus {
    border-bottom-color: var(--primary);
}

/* Footer */
.footer {
    border-top: 1px dashed var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.separator {
    margin: 0 10px;
    color: var(--muted);
}

.copyright {
    opacity: 0.7;
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 20px;
}

.legal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.legal-content h3 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.legal-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #ccc;
}

.legal-content ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.legal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}