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

:root {
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-yellow: #ffff00;
    --cyber-purple: #9d00ff;
    --grid-pink: #ff0080;
    --terminal-green: #00ff41;
    --bg-dark: #0a0015;
    --bg-darker: #000000;
    --text-primary: #00ff41;
    --text-secondary: #ff00ff;
    --panel-bg: rgba(0, 0, 0, 0.72);
    --panel-bg-2: rgba(0, 0, 0, 0.85);
    --panel-border: rgba(0, 255, 65, 0.75);
    --panel-border-strong: rgba(0, 255, 65, 1);
    --panel-glow: rgba(0, 255, 65, 0.12);
}

@font-face {
    font-family: 'Terminal';
    src: local('Courier New'), local('monospace');
}

body {
    font-family: 'Courier New', 'Terminal', monospace;
    background:
        radial-gradient(1200px 600px at 50% 12%, rgba(157, 0, 255, 0.18), transparent 60%),
        radial-gradient(900px 500px at 12% 65%, rgba(255, 0, 255, 0.10), transparent 55%),
        radial-gradient(900px 500px at 88% 65%, rgba(0, 255, 255, 0.06), transparent 55%),
        linear-gradient(180deg, #0a0015 0%, #0c001a 35%, #05000e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Subtle noise/dust overlay (no images) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.18;
    background-image:
        radial-gradient(rgba(0, 255, 65, 0.20) 1px, transparent 1px),
        radial-gradient(rgba(255, 0, 255, 0.16) 1px, transparent 1px);
    background-size: 220px 220px, 320px 320px;
    background-position: 0 0, 120px 40px;
    filter: blur(0.2px);
    mix-blend-mode: screen;
}

/* Scanline effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    /* Container for CRT overlays (scanlines + subtle color drift/glitch) */
    opacity: 0.95;
    mix-blend-mode: multiply;
    animation: crtFlicker 6.5s ease-in-out infinite;
}

/* Disable CRT overlays while modal is open (clean image viewing) */
body.modal-open::before {
    opacity: 0 !important;
}

body.modal-open .scanlines {
    opacity: 0 !important;
    animation: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* Scanlines layer (animated independently so we can also add subtle glitch) */
.scanlines::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.28),
            rgba(0, 0, 0, 0.28) 1px,
            transparent 1px,
            transparent 3px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(0, 255, 255, 0.05),
            rgba(0, 255, 255, 0.05) 1px,
            transparent 1px,
            transparent 6px
        );
    opacity: 0.95;
    animation: scanline 7s linear infinite;
}

/* Subpixel / chroma mask (very subtle) */
.scanlines::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        rgba(0, 255, 255, 0.020) 0px,
        rgba(0, 255, 255, 0.020) 1px,
        rgba(157, 0, 255, 0.018) 1px,
        rgba(157, 0, 255, 0.018) 2px,
        rgba(0, 0, 0, 0.0) 2px,
        rgba(0, 0, 0, 0.0) 3px
    );
    opacity: 0.45;
    mix-blend-mode: screen;
    animation: crtSubpixel 9.5s ease-in-out infinite;
}

/* Slight CRT color drift/glitch (only when supported) */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .scanlines {
        -webkit-backdrop-filter: saturate(1.06) contrast(1.03) hue-rotate(0.3deg);
        backdrop-filter: saturate(1.06) contrast(1.03) hue-rotate(0.3deg);
        animation: crtFlicker 6.5s ease-in-out infinite, crtColorDrift 12s ease-in-out infinite;
    }
}

@keyframes crtColorDrift {
    0%, 100% {
        -webkit-backdrop-filter: saturate(1.05) contrast(1.02) hue-rotate(0.15deg);
        backdrop-filter: saturate(1.05) contrast(1.02) hue-rotate(0.15deg);
    }
    50% {
        -webkit-backdrop-filter: saturate(1.08) contrast(1.04) hue-rotate(-0.55deg);
        backdrop-filter: saturate(1.08) contrast(1.04) hue-rotate(-0.55deg);
    }
}

@keyframes crtFlicker {
    0%, 100% { opacity: 0.92; }
    35% { opacity: 0.96; }
    36% { opacity: 0.90; }
    37% { opacity: 0.96; }
    72% { opacity: 0.94; }
}

@keyframes crtSubpixel {
    0%, 100% { transform: translateX(0); opacity: 0.40; }
    50% { transform: translateX(1px); opacity: 0.50; }
}

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

/* Glow effect */
@keyframes glow {
    0%, 100% { 
        text-shadow: 0 0 5px var(--text-primary), 0 0 10px var(--text-primary);
    }
    50% { 
        text-shadow: 0 0 10px var(--text-primary), 0 0 20px var(--text-primary), 0 0 30px var(--text-primary);
    }
}

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

@keyframes neon-glow {
    0%, 100% { 
        box-shadow: 0 0 5px var(--neon-pink), 0 0 10px var(--neon-pink);
    }
    50% { 
        box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink), 0 0 30px var(--neon-cyan);
    }
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 18px;
    position: relative;
    z-index: 1;
}

/* Header */
.terminal-header {
    border: 1px solid var(--panel-border-strong);
    padding: 18px 18px 14px;
    margin-bottom: 14px;
    background: var(--panel-bg);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.85) inset,
        0 0 0 1px rgba(0, 255, 65, 0.18),
        0 12px 35px rgba(0, 0, 0, 0.55),
        0 0 35px var(--panel-glow),
        0 0 18px rgba(0, 255, 65, 0.10);
}

.ascii-art {
    /* Responsive ASCII logo sizing (scales down on mobile) */
    font-size: clamp(10px, 1.35vw, 16px);
    line-height: 1.08;
    color: var(--neon-pink);
    text-shadow:
        0 0 6px rgba(255, 0, 255, 0.55),
        0 0 14px rgba(255, 0, 255, 0.35),
        0 0 22px rgba(0, 255, 255, 0.10);
    white-space: pre;
    overflow-x: auto;
    margin-bottom: 15px;
}

/* Keep the logo readable on very small screens */
@media (max-width: 420px) {
    .ascii-art {
        font-size: 10px;
        line-height: 1.05;
    }
}

.terminal-line {
    color: var(--text-primary);
    margin: 4px 0;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.45);
    animation: glow 3.25s ease-in-out infinite;
}

.prompt {
    color: var(--neon-cyan);
    font-weight: bold;
    margin-right: 5px;
}

/* Navigation */
.terminal-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    padding: 6px 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.35);
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.nav-btn:hover {
    background: rgba(0, 255, 65, 0.16);
    border-color: var(--panel-border-strong);
    box-shadow:
        0 0 0 1px rgba(0, 255, 65, 0.20),
        0 0 14px rgba(0, 255, 65, 0.25);
}

.nav-btn.active {
    background: rgba(255, 0, 255, 0.18);
    border-color: rgba(255, 0, 255, 0.75);
    color: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 0 0 1px rgba(255, 0, 255, 0.18),
        0 0 18px rgba(255, 0, 255, 0.22);
}

/* Big framed content area (matches reference layout) */
#mainContent {
    --content-pad: 16px;
    --hero-inset: 10px;
    border: 1px solid rgba(0, 255, 65, 0.55);
    background: var(--panel-bg);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.85) inset,
        0 18px 55px rgba(0, 0, 0, 0.55);
    padding: var(--content-pad);
    position: relative;
}

/* Tabs sit “attached” to the framed content box */
.terminal-tabs {
    margin: calc(-1 * var(--content-pad)) calc(-1 * var(--content-pad)) var(--content-pad);
    padding: 0;
    display: flex;
    align-items: flex-end;
    gap: 0;
    border-bottom: 1px solid rgba(0, 255, 65, 0.22);
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.40) 0%,
        rgba(0, 0, 0, 0.26) 100%
    );
}

.terminal-tabs .nav-btn {
    position: relative;
    /* Hard-edged editor-like tabs */
    border: 1px solid rgba(0, 255, 65, 0.22);
    border-bottom: none;              /* “tab” attaches to the panel */
    border-radius: 0;
    margin: 0 0 -1px;                 /* sit on top border */
    padding: 10px 14px 11px;
    background: rgba(0, 0, 0, 0.22);
    color: rgba(0, 255, 65, 0.72);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.75) inset,
        0 -1px 0 rgba(0, 255, 65, 0.06) inset;
}

.terminal-tabs .nav-btn + .nav-btn {
    /* Connected-tab divider look (like editor tabs) */
    margin-left: 0;
}

.terminal-tabs .nav-btn + .nav-btn::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0px;
    bottom: 0px;
    width: 1px;
    background: rgba(0, 255, 65, 0.18);
}

.terminal-tabs .nav-btn:hover {
    background: rgba(0, 255, 65, 0.10);
    color: rgba(0, 255, 65, 0.95);
}

.terminal-tabs .nav-btn.active {
    /* More prominent purple active tab */
    background: linear-gradient(
        180deg,
        rgba(157, 0, 255, 0.38) 0%,
        rgba(0, 0, 0, 0.72) 85%
    );
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(157, 0, 255, 0.65);
    border-top-color: rgba(0, 255, 255, 0.45);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.75) inset,
        0 0 26px rgba(157, 0, 255, 0.22),
        0 0 18px rgba(0, 255, 255, 0.10);
    text-shadow:
        0 0 16px rgba(157, 0, 255, 0.30),
        0 0 10px rgba(0, 255, 255, 0.10);
}

.terminal-tabs .nav-btn.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: rgba(0, 0, 0, 0.72); /* hides the panel border under active tab */
}

/* Align the leftmost tab with the content frame edge */
.terminal-tabs .nav-btn:first-child {
    border-left: none;
}

.terminal-tabs .nav-btn:last-child {
    border-right: none;
}

.terminal-tabs .nav-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.75) inset,
        0 0 0 2px rgba(0, 255, 255, 0.35),
        0 0 18px rgba(0, 255, 255, 0.18);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    /* Make cards in each row equal-height (match tallest card in row) */
    align-items: stretch;
    gap: 22px;
    margin-top: 30px;
}

.gallery-item {
    border: 2px solid var(--cyber-purple);
    background: rgba(0, 0, 0, 0.8);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 1 / 1; /* square previews */
    overflow: hidden;
    background: rgba(0, 0, 0, 0.65);
    border-bottom: 2px solid var(--cyber-purple);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* standardized crop */
    display: block;
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::before {
    opacity: 0;
    animation: none;
}

.gallery-item:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 255, 0.55);
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.12);
}

.gallery-item:hover .gallery-thumb img {
    filter: brightness(1.1);
}

/* NSFW thumbnails: blurred in grid only (modal stays clean) */
.gallery-item.is-nsfw .gallery-thumb img {
    filter: blur(16px) saturate(0.8) brightness(0.9);
}

.gallery-item.is-nsfw:hover .gallery-thumb img {
    filter: blur(14px) saturate(0.9) brightness(1.0);
}

/* When enabled via command, show NSFW items unblurred in gallery view */
body.nsfw-reveal .gallery-item.is-nsfw .gallery-thumb img,
body.nsfw-reveal .gallery-item.is-nsfw:hover .gallery-thumb img {
    filter: brightness(1.05) contrast(1.02);
}

.nsfw-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 6px 8px;
    border: 1px solid rgba(255, 0, 255, 0.70);
    background: rgba(0, 0, 0, 0.75);
    color: var(--neon-pink);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.18);
}

.terminal-checkbox {
    margin-right: 10px;
    transform: translateY(1px);
}

.gallery-item-info {
    padding: 15px;
    background: rgba(0, 0, 0, 0.9);
    border-top: 0;
}

.gallery-item-title {
    color: var(--neon-pink);
    font-size: 16px;
    margin-bottom: 8px;
    text-shadow: 0 0 5px var(--neon-pink);
}

.gallery-item-artist {
    color: var(--neon-cyan);
    font-size: 14px;
    margin-bottom: 5px;
}

.gallery-item-artist a {
    color: var(--neon-cyan);
    text-decoration: none;
    border-bottom: 1px solid var(--neon-cyan);
    transition: all 0.3s ease;
}

.gallery-item-artist a:hover {
    color: var(--neon-yellow);
    border-bottom-color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow);
}

/* Terminal Window */
.terminal-window {
    border: 1px solid rgba(0, 255, 65, 0.55);
    background: var(--panel-bg-2);
    padding: 18px;
    min-width: 0;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.85) inset,
        0 0 0 1px rgba(0, 255, 65, 0.08),
        0 0 30px rgba(0, 255, 65, 0.10),
        0 0 18px rgba(0, 255, 65, 0.10);
}

.window-title {
    color: var(--neon-pink);
    text-align: left;
    font-size: 12px;
    margin: -18px -18px 14px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 0, 255, 0.55);
    background: rgba(255, 0, 255, 0.06);
    text-shadow: 0 0 6px rgba(255, 0, 255, 0.55);
    letter-spacing: 0.08em;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.terminal-label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.terminal-input,
.file-input {
    width: 100%;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.55);
    color: var(--text-primary);
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    transition: all 0.3s ease;
}

.terminal-input:focus {
    outline: none;
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

textarea.terminal-input {
    resize: vertical;
    min-height: 80px;
}

.file-input {
    cursor: pointer;
}

.terminal-btn {
    background: transparent;
    border: 1px solid rgba(255, 0, 255, 0.75);
    color: var(--neon-pink);
    padding: 9px 16px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    margin-top: 10px;
}

.terminal-btn:hover {
    background: var(--neon-pink);
    color: #fff;
    box-shadow: 0 0 20px var(--neon-pink);
    transform: translateY(-2px);
}

.terminal-btn:active {
    transform: translateY(0);
}

.error-msg {
    color: #ff0000;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ff0000;
    background: rgba(255, 0, 0, 0.1);
    text-shadow: 0 0 5px #ff0000;
}

.success-msg {
    color: var(--terminal-green);
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--terminal-green);
    background: rgba(0, 255, 65, 0.1);
    text-shadow: 0 0 5px var(--terminal-green);
}

/* Admin Panel */
.admin-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--cyber-purple);
}

.section-title {
    color: var(--neon-cyan);
    font-size: 16px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.admin-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.admin-item {
    border: 2px solid var(--text-primary);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
}

.admin-item-media {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.admin-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-item-placeholder {
    color: rgba(0, 255, 255, 0.75);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

.admin-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 10px;
}

.admin-item-title {
    color: var(--neon-pink);
    font-size: 12px;
    margin-bottom: 5px;
}

.admin-controls {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.admin-edit-btn {
    padding: 8px 10px;
}

.admin-character-editor {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(157, 0, 255, 0.28);
}

.admin-character-form .terminal-input,
.admin-character-form .file-input {
    font-size: 13px;
}

.admin-character-form .admin-controls {
    margin-top: 8px;
}

.delete-btn {
    background: transparent;
    border: 1px solid #ff0000;
    color: #ff0000;
    padding: 5px 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.delete-btn:hover {
    background: #ff0000;
    color: #fff;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(10, 0, 21, 0.95);
    border: 3px solid var(--neon-pink);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    padding: 30px;
    position: relative;
    box-shadow: 0 0 50px var(--neon-pink);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--neon-pink);
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    border: 2px solid var(--neon-pink);
    background: rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--neon-pink);
    color: #fff;
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto 20px;
    /* Full-size view should be “clean” (no extra effects) */
    border: none;
    box-shadow: none;
    filter: none;
}

.modal-info {
    margin-top: 20px;
}

.modal-title {
    color: var(--neon-pink);
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--neon-pink);
}

.modal-artist {
    color: var(--neon-cyan);
    font-size: 18px;
    margin-bottom: 15px;
}

.modal-artist a {
    color: var(--neon-cyan);
    text-decoration: none;
    border-bottom: 1px solid var(--neon-cyan);
}

.modal-artist a:hover {
    color: var(--neon-yellow);
    border-bottom-color: var(--neon-yellow);
}

.modal-description {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--cyber-purple);
}

/* Loading state */
.loading {
    text-align: center;
    color: var(--text-primary);
    padding: 40px;
    font-size: 18px;
    animation: glow 2s ease-in-out infinite;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: var(--neon-cyan);
    padding: 60px 20px;
    font-size: 16px;
    border: 2px dashed var(--cyber-purple);
    margin: 20px 0;
}

/* Responsive overrides live at the end of this file. */

/* Home / Profile Section */
.home-view {
    margin-top: 6px;
}

.profile-container {
    display: block;
}

.profile-content {
    flex: 1;
    min-width: 0;
}

.home-logo {
    display: flex;
    justify-content: center;
    text-align: center;
    margin: 6px 0 14px;
    /* Extra glow just for the Luke Spots title */
    text-shadow:
        0 0 10px rgba(255, 0, 255, 0.70),
        0 0 24px rgba(255, 0, 255, 0.40),
        0 0 34px rgba(157, 0, 255, 0.22),
        0 0 18px rgba(0, 255, 255, 0.12);
    filter: drop-shadow(0 0 18px rgba(255, 0, 255, 0.18));
}

.home-panels {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 16px;
}

.links-panel .social-links {
    flex-direction: column;
    align-items: flex-start;
}

.links-panel .social-link {
    width: 100%;
    justify-content: space-between;
}

.luke-mark {
    display: block;
    width: 75%;
    max-width: 980px;
    height: auto;
    margin: 0 auto 14px;
    opacity: 0.96;
    /* Subtle “terminal” treatment (static) */
    filter:
        saturate(1.04)
        contrast(1.06)
        brightness(0.98)
        drop-shadow(0 0 6px rgba(0, 255, 255, 0.28))
        drop-shadow(0 0 14px rgba(0, 255, 255, 0.16))
        drop-shadow(0 0 12px rgba(157, 0, 255, 0.18))
        drop-shadow(0 0 24px rgba(157, 0, 255, 0.10));
}

.luke-mark:not([src]) {
    display: none;
}

.profile-shell {
    margin: 6px 0 14px;
    padding: 10px 10px 8px;
    border: 1px solid rgba(0, 255, 65, 0.25);
    background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.04);
}

.profile-shell .terminal-line {
    font-size: 12px;
    /* Reduce glow intensity for this block only */
    text-shadow: 0 0 3px rgba(0, 255, 65, 0.22);
    animation: none;
}

.terminal-input-line .terminal-cursor {
    display: inline-block;
    margin-left: 2px;
    color: var(--text-primary);
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.35);
    animation: caretBlink 1s steps(2, end) infinite;
    will-change: opacity;
}

.profile-bio {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 15px;
    margin-bottom: 20px;
}

.profile-bio p {
    margin-bottom: 15px;
}

.gallery-search {
    margin: 12px 0 16px;
}

.gallery-search-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid rgba(157, 0, 255, 0.20);
}

.gallery-search-field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.gallery-search-input {
    width: 100%;
    padding-right: 52px;
}

.gallery-search-clear {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 2;

    display: none;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 8px;

    border: 1px solid rgba(0, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.45);
    color: rgba(0, 255, 255, 0.90);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.gallery-search-clear:hover {
    border-color: rgba(157, 0, 255, 0.55);
    box-shadow: 0 0 12px rgba(157, 0, 255, 0.18);
}

.gallery-search-clear.visible {
    display: inline-flex;
}

.gallery-search-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;

    display: none;
    max-height: 240px;
    overflow: auto;

    background: rgba(0, 0, 0, 0.92);
    border: 1px solid rgba(0, 255, 255, 0.28);
    box-shadow:
        0 0 0 1px rgba(157, 0, 255, 0.14) inset,
        0 10px 30px rgba(0, 0, 0, 0.55),
        0 0 18px rgba(0, 255, 255, 0.10);
    backdrop-filter: blur(6px);
}

.gallery-search-dropdown.open {
    display: block;
}

.gallery-search-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    padding: 10px 10px;

    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    color: rgba(0, 255, 255, 0.92);
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0, 255, 255, 0.10);
}

.gallery-search-option:last-child {
    border-bottom: none;
}

.gallery-search-option:hover {
    background: rgba(0, 255, 255, 0.06);
}

.gallery-search-option.active {
    background: linear-gradient(
        90deg,
        rgba(157, 0, 255, 0.28),
        rgba(0, 255, 255, 0.08)
    );
    box-shadow: 0 0 0 1px rgba(157, 0, 255, 0.22) inset;
}

.gallery-search-status {
    padding: 0 12px 12px;
    color: rgba(0, 255, 255, 0.85);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.10);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(0, 255, 255, 0.55);
    background: rgba(0, 255, 255, 0.05);
    color: var(--neon-cyan);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.social-link:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--neon-cyan);
    transform: translateY(-2px);
}

.social-icon {
    font-size: 18px;
}

/* Characters Section */
.section-header {
    color: var(--neon-pink);
    font-size: 20px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

.character-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 18px;
}

.character-card {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 16px;
    align-items: stretch;
    border: 1px solid rgba(0, 255, 65, 0.35);
    background: rgba(0, 0, 0, 0.82);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding: 12px;
}

.character-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan), var(--neon-yellow));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.character-card:hover::before {
    opacity: 0.55;
    animation: neon-glow 1.5s ease-in-out infinite;
}

.character-card:hover {
    transform: translateY(-5px);
}

.character-refsheet {
    border: 1px solid rgba(0, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.35);
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.08);
}

.character-refsheet img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.95) contrast(1.05);
}

.character-info {
    padding: 12px 12px 10px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(0, 255, 65, 0.18);
    min-width: 0;
}

.character-card:hover .character-info {
    background: rgba(0, 0, 0, 0.84);
    border-color: rgba(0, 255, 65, 0.24);
}

.character-name {
    color: var(--neon-pink);
    font-size: 18px;
    margin-bottom: 5px;
    text-shadow: 0 0 5px var(--neon-pink);
}

.character-species {
    color: var(--neon-cyan);
    font-size: 13px;
    margin-bottom: 10px;
}

.character-pronouns {
    color: var(--neon-yellow);
    font-size: 12px;
    margin-bottom: 8px;
}

.character-desc-preview {
    color: var(--text-primary);
    font-size: 12px;
    line-height: 1.5;
    margin-top: 10px;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.16);
}

.character-actions {
    margin-top: 14px;
}

.character-view-btn {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(157, 0, 255, 0.65);
    background: rgba(157, 0, 255, 0.10);
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.04em;
    transition: all 0.25s ease;
}

.character-view-btn:hover {
    background: rgba(157, 0, 255, 0.22);
    box-shadow: 0 0 22px rgba(157, 0, 255, 0.25);
}

.character-download-btn {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding: 10px 12px;
    margin-top: 10px;
    border: 1px solid rgba(0, 255, 255, 0.55);
    background: rgba(0, 255, 255, 0.06);
    color: rgba(0, 255, 255, 0.92);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.04em;
    transition: all 0.25s ease;
}

.character-download-btn:hover {
    background: rgba(0, 255, 255, 0.14);
    box-shadow: 0 0 22px rgba(0, 255, 255, 0.18);
}

.character-refsheet-placeholder {
    color: rgba(0, 255, 255, 0.75);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.15);
}

.modal-placeholder {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 255, 255, 0.28);
    color: rgba(0, 255, 255, 0.75);
    letter-spacing: 0.12em;
}

/* Character Modal */
.modal-character-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--cyber-purple);
}

.character-detail {
    color: var(--text-primary);
    font-size: 14px;
}

.character-detail-label {
    color: var(--neon-cyan);
    display: block;
    margin-bottom: 5px;
}

.character-refsheet-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    border: 2px solid var(--neon-yellow);
    color: var(--neon-yellow);
    text-decoration: none;
    transition: all 0.3s ease;
}

.character-refsheet-link:hover {
    background: var(--neon-yellow);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--neon-yellow);
}

/* ============================================================================
   Responsive overrides (keep at end so they win)
   ========================================================================== */
@media (max-width: 768px) {
    .character-card {
        grid-template-columns: 1fr;
    }

    .character-refsheet {
        height: 200px;
    }

    .container {
        padding: 18px 12px;
    }

    .terminal-header {
        padding: 14px 12px 12px;
    }

    .terminal-tabs .nav-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    /* ASCII logo stays readable, but doesn’t dominate */
    .ascii-art {
        font-size: clamp(9px, 2.8vw, 12px);
        line-height: 1.05;
        margin-bottom: 12px;
    }

    #mainContent {
        --content-pad: 12px;
        --hero-inset: 8px;
        padding: var(--content-pad);
    }

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

    .gallery-thumb {
        aspect-ratio: 1 / 1;
    }

    /* square previews on mobile too */

    .modal-content {
        padding: 18px;
    }

    .modal-character-info {
        grid-template-columns: 1fr;
    }

    .home-panels {
        grid-template-columns: 1fr;
    }

    .luke-mark {
        width: 100%;
        margin-bottom: 12px;
    }

    .profile-bio {
        font-size: 14px;
        line-height: 1.7;
    }

    .social-links {
        gap: 10px;
        margin-top: 14px;
    }

    .admin-gallery {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}
