/* ═══════════════════════════════════════════════════════════════
   RoboArt — F.R.A.N.K.'s Autonomous Art Gallery
   Professional gallery aesthetic: dark, cinematic, art-focused.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg-primary: #060609;
    --bg-secondary: #0c0c12;
    --bg-card: #111118;
    --bg-card-hover: #181822;
    --bg-glass: rgba(14, 14, 22, 0.85);
    --bg-input: #151520;
    --border: #1e1e2e;
    --border-light: #2e2e42;
    --text-primary: #ede8e8;
    --text-secondary: #a09aaa;
    --text-muted: #6a6278;
    --accent-coral: #d4736c;
    --accent-coral-glow: #e8847d;
    --accent-coral-dim: rgba(212, 115, 108, 0.12);
    --accent-purple: #7a5f8a;
    --accent-purple-light: #9a7faa;
    --accent-mauve: #c0a8cc;
    --accent-warm: #c49a8a;
    --danger: #c44040;
    --success: #5a9a6a;
    --shadow-glow: rgba(212, 115, 108, 0.2);
    --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-card-hover: 0 16px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(212, 115, 108, 0.08);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', var(--font-main);
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius: 8px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset & Base ──────────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Cinematic ambient glow — subtle, pushed below header */
body::before {
    content: '';
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100% - 80px);
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 30%, rgba(122, 95, 138, 0.025) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(212, 115, 108, 0.02) 0%, transparent 60%);
}

a {
    color: var(--accent-coral);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-coral-glow);
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background: rgba(212, 115, 108, 0.3);
    color: #fff;
}

/* ── Scrollbar ─────────────────────────────────────────────── */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ── Sci-fi Background Layers ─────────────────────────────── */

#gol-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    will-change: contents;
}

.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    mix-blend-mode: screen;
    will-change: transform;
}

.aurora-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 115, 108, 0.6) 0%, transparent 70%);
    top: -15%;
    left: 15%;
    animation: auroraFloat1 22s ease-in-out infinite;
}

.aurora-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(122, 95, 138, 0.5) 0%, transparent 70%);
    bottom: -10%;
    right: 10%;
    animation: auroraFloat2 28s ease-in-out infinite;
}

.aurora-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(192, 168, 204, 0.4) 0%, transparent 70%);
    top: 40%;
    left: -5%;
    animation: auroraFloat3 18s ease-in-out infinite;
}

@keyframes auroraFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 40px) scale(1.1); }
    66% { transform: translate(-40px, 80px) scale(0.95); }
}

@keyframes auroraFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-60px, -40px) scale(1.15); }
}

@keyframes auroraFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(100px, -30px) scale(1.1); }
    75% { transform: translate(-50px, 60px) scale(0.9); }
}

.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0.030;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* ── Header / Nav ──────────────────────────────────────────── */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 6, 9, 0.88);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-bottom: 1px solid rgba(30, 30, 46, 0.6);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(212, 115, 108, 0.3);
    box-shadow: none;
    transition: border-color 0.3s ease;
}

.logo-link:hover .logo-img {
    border-color: rgba(212, 115, 108, 0.6);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-primary);
}

.logo-text span {
    color: var(--accent-coral);
}

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

.nav-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-coral);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out-expo);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link:hover::after {
    width: 60%;
}

.nav-link.active {
    color: var(--accent-coral);
}

.nav-link.active::after {
    width: 80%;
    box-shadow: 0 0 8px rgba(212, 115, 108, 0.5);
}

/* ── Buttons ───────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    letter-spacing: 0.5px;
    font-family: var(--font-main);
}

.btn-primary {
    background: var(--accent-coral);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-coral-glow);
    box-shadow: 0 4px 24px var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
    background: rgba(255, 255, 255, 0.03);
}

.btn-small {
    padding: 5px 12px;
    font-size: 11px;
}

/* ── Scroll Progress Bar ──────────────────────────────────── */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-coral), var(--accent-purple-light), var(--accent-coral));
    background-size: 200% 100%;
    z-index: 9999;
    transform-origin: left;
    transform: scaleX(0);
    transition: none;
    animation: gradientShift 3s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

/* ── Hero / ASCII Art ──────────────────────────────────────── */

.hero-section {
    text-align: center;
    padding: 72px 24px 56px;
    position: relative;
    z-index: 1;
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(212, 115, 108, 0.03) 0%, transparent 60%),
        linear-gradient(180deg, transparent 60%, var(--bg-primary) 100%);
    overflow: hidden;
}

/* Ensure nothing scrolls over the header */
.header {
    z-index: 200;
}

/* Animated scan line across hero */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-coral), transparent);
    animation: scanLine 8s linear infinite;
}

@keyframes scanLine {
    0% { left: -50%; }
    100% { left: 150%; }
}

.ascii-art-container {
    max-width: 640px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 8vw, 72px);
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 24px;
    line-height: 1;
    color: var(--accent-coral);
    text-shadow: 0 0 40px rgba(212, 115, 108, 0.3), 0 0 80px rgba(212, 115, 108, 0.1);
    animation: titleGlow 6s ease-in-out infinite;
    position: relative;
}

/* Glitch effect on title */
.hero-title::before,
.hero-title::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-title::before {
    color: var(--accent-coral);
    animation: glitch1 4s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.hero-title::after {
    color: var(--accent-purple-light);
    animation: glitch2 3s infinite linear alternate-reverse;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
    0%, 93% { transform: none; opacity: 0; }
    94% { transform: translate(-3px, -1px); opacity: 0.7; }
    95% { transform: translate(2px, 1px); opacity: 0.7; }
    96% { transform: translate(-1px, 2px); opacity: 0.7; }
    97%, 100% { transform: none; opacity: 0; }
}

@keyframes glitch2 {
    0%, 90% { transform: none; opacity: 0; }
    91% { transform: translate(2px, 1px); opacity: 0.5; }
    92% { transform: translate(-3px, -1px); opacity: 0.5; }
    93% { transform: translate(1px, -2px); opacity: 0.5; }
    94%, 100% { transform: none; opacity: 0; }
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 40px rgba(212, 115, 108, 0.3), 0 0 80px rgba(212, 115, 108, 0.1); }
    50% { text-shadow: 0 0 50px rgba(212, 115, 108, 0.45), 0 0 100px rgba(212, 115, 108, 0.18), 0 0 4px rgba(255, 255, 255, 0.06); }
}

.hero-title-small {
    font-size: clamp(24px, 5vw, 42px);
    margin-bottom: 16px;
}

/* Staggered letter entrance */
.hero-title > span {
    display: inline-block;
    animation: letterDrop 0.6s var(--ease-out-expo) both;
}

.hero-title > span:nth-child(1)  { animation-delay: 0.05s; }
.hero-title > span:nth-child(2)  { animation-delay: 0.08s; }
.hero-title > span:nth-child(3)  { animation-delay: 0.11s; }
.hero-title > span:nth-child(4)  { animation-delay: 0.14s; }
.hero-title > span:nth-child(5)  { animation-delay: 0.17s; }
.hero-title > span:nth-child(6)  { animation-delay: 0.2s; }
.hero-title > span:nth-child(7)  { animation-delay: 0.23s; }
.hero-title > span:nth-child(8)  { animation-delay: 0.26s; }
.hero-title > span:nth-child(9)  { animation-delay: 0.29s; }
.hero-title > span:nth-child(10) { animation-delay: 0.32s; }
.hero-title > span:nth-child(11) { animation-delay: 0.35s; }
.hero-title > span:nth-child(12) { animation-delay: 0.38s; }
.hero-title > span:nth-child(13) { animation-delay: 0.41s; }

@keyframes letterDrop {
    0% { opacity: 0; transform: translateY(-30px) rotateX(40deg); filter: blur(6px); }
    100% { opacity: 1; transform: translateY(0) rotateX(0deg); filter: blur(0); }
}

.hero-title .hero-dot {
    color: var(--text-muted);
    opacity: 0.4;
    font-weight: 400;
    margin: 0 -1px;
}

.hero-title .hero-a,
.hero-title .hero-r2,
.hero-title .hero-t {
    color: #fff;
    text-shadow: 0 0 40px rgba(212, 115, 108, 0.4);
}

.ascii-art-small {
    font-size: 11px;
    margin-bottom: 16px;
}

.hero-acronym {
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 12px;
    line-height: 1.8;
    animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.5s both;
}

.about-acronym {
    font-size: 14px;
    margin-bottom: 20px;
}

.hero-acronym .letter {
    color: var(--accent-coral);
    font-weight: 700;
    font-size: 1.15em;
}

.hero-tagline {
    font-size: 15px;
    color: var(--text-muted);
    font-style: italic;
    letter-spacing: 0.5px;
    opacity: 0;
    animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.7s both;
}

/* Typing cursor blink for tagline */
.hero-tagline::after {
    content: '|';
    animation: cursorBlink 1s step-end infinite;
    color: var(--accent-coral);
    margin-left: 2px;
    font-weight: 200;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes fadeSlideUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 0.8; transform: translateY(0); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 10px 24px;
    border: 1px solid rgba(212, 115, 108, 0.25);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2.5px;
    color: var(--accent-coral);
    text-transform: uppercase;
    background: rgba(212, 115, 108, 0.04);
    backdrop-filter: blur(10px);
    animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.9s both,
               badgePulse 4s ease-in-out 2s infinite;
    position: relative;
    overflow: hidden;
    max-width: 90vw;
    text-align: center;
    line-height: 1.6;
}

/* Shimmer sweep across badge */
.hero-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 115, 108, 0.15), transparent);
    animation: shimmer 5s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

@keyframes badgePulse {
    0%, 100% { border-color: rgba(212, 115, 108, 0.25); box-shadow: none; }
    50% { border-color: rgba(212, 115, 108, 0.5); box-shadow: 0 0 20px rgba(212, 115, 108, 0.1); }
}

.hero-badge .badge-icon {
    font-size: 14px;
    opacity: 0.7;
    animation: spin 12s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Feed Layout — Gallery Grid ────────────────────────────── */

.feed-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 24px 120px;
    position: relative;
    z-index: 1;
}

#feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── Category Filter ───────────────────────────────────────── */

.category-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 7px 18px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.5px;
    text-transform: capitalize;
    position: relative;
    overflow: hidden;
}

/* Ripple highlight on hover */
.category-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 100px;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(212, 115, 108, 0.12), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-btn:hover::before {
    opacity: 1;
}

.category-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.category-btn:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

.category-btn.active {
    background: var(--accent-coral);
    border-color: var(--accent-coral);
    color: #fff;
    box-shadow: 0 2px 20px var(--shadow-glow);
    transform: scale(1.05);
}

.category-btn .cat-count {
    font-size: 10px;
    opacity: 0.6;
    margin-left: 4px;
}

/* ── Art Card — Gallery Style ─────────────────────────────── */

.art-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.5s var(--ease-out-expo);
    position: relative;
    animation: cardEntrance 0.7s var(--ease-out-expo) both;
    contain: layout style;
}

/* Stagger card entrance from JS via --delay custom property */
.art-card:nth-child(3n+1) { animation-delay: 0s; }
.art-card:nth-child(3n+2) { animation-delay: 0.08s; }
.art-card:nth-child(3n+3) { animation-delay: 0.16s; }

@keyframes cardEntrance {
    0% { opacity: 0; transform: translateY(40px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.art-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.art-card-header {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.art-card-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--accent-coral);
    object-fit: cover;
}

.art-card-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.art-card-author-sub {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.art-card-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    position: relative;
}

.art-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), filter 0.4s ease;
}

.art-card:hover .art-card-image-wrap img {
    transform: scale(1.06);
    filter: brightness(0.75);
}

/* Title overlay on hover */
.art-card-image-wrap::after {
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 16px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(8px);
    transition: all var(--transition-slow);
    pointer-events: none;
}

.art-card:hover .art-card-image-wrap::after {
    opacity: 1;
    transform: translateY(0);
}

/* Double-tap heart animation */
.heart-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 80px;
    pointer-events: none;
    z-index: 10;
    animation: heartBurst 0.8s ease-out forwards;
    filter: drop-shadow(0 0 30px var(--accent-coral));
}

@keyframes heartBurst {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.art-card-actions {
    padding: 10px 14px 4px;
    display: flex;
    gap: 2px;
}

.reaction-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 3px 5px;
    border-radius: var(--radius);
    transition: opacity 0.2s ease, filter 0.2s ease;
    position: relative;
    opacity: 0.5;
    filter: grayscale(0.6);
    will-change: opacity, filter;
}

.download-btn {
    background: none;
    border: none;
    font-size: 18px;
    padding: 3px 6px;
    opacity: 0.4;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
    margin-left: auto;
}

.download-btn:hover {
    opacity: 0.8;
}

.reaction-btn:hover {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.3) rotate(-5deg);
}

.reaction-btn:active {
    transform: scale(0.9);
    transition-duration: 0.1s;
}

.reaction-btn.active {
    opacity: 1;
    filter: grayscale(0);
    animation: reactionPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes reactionPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.4) rotate(8deg); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.reaction-btn .count {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-mono);
    min-width: 12px;
    text-align: center;
}

.reaction-btn.active .count {
    color: var(--accent-coral);
}

.art-card-title {
    padding: 4px 14px 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.art-card-title .frank-label {
    color: var(--accent-coral);
    font-weight: 700;
    margin-right: 5px;
    font-size: 12px;
}

.art-card-comments-preview {
    padding: 0 14px 12px;
}

.card-comment {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-comment-author {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-count-link {
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
}

.comment-count-link:hover {
    color: var(--text-secondary);
}

/* ── Inline Comment Form (expands under card) ────────────── */

.inline-comment-form {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease-out-expo), padding 0.35s ease;
    padding: 0 14px;
    background: var(--bg-secondary);
    border-top: 0 solid var(--border);
}

.inline-comment-form.open {
    max-height: 220px;
    padding: 12px 14px 14px;
    border-top-width: 1px;
}

.inline-comment-name {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-main);
    outline: none;
    margin-bottom: 8px;
    min-height: 44px;
    transition: border-color 0.2s ease;
}

.inline-comment-name:focus {
    border-color: var(--accent-coral);
}

.inline-comment-text {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-main);
    outline: none;
    resize: none;
    min-height: 64px;
    line-height: 1.5;
    transition: border-color 0.2s ease;
}

.inline-comment-text:focus {
    border-color: var(--accent-coral);
}

.inline-comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.inline-comment-actions .btn {
    min-height: 40px;
    padding: 8px 20px;
    font-size: 13px;
}

/* ── Modal / Lightbox ──────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
}

.modal-overlay.active {
    display: flex;
    animation: modalFadeIn 0.35s var(--ease-out-expo) forwards;
}

.modal-overlay.active .modal-content,
.modal-overlay.active .auth-box,
.modal-overlay.active .admin-modal-box {
    animation: modalSlideUp 0.4s var(--ease-out-expo) forwards;
}

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

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    max-width: 1060px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.modal-image-side {
    flex: 1;
    min-width: 0;
    background-color: #000;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Blurred version of the image fills the black bars */
.modal-image-side::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.4);
    z-index: 0;
}

.modal-image-side img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 90vh;
    position: relative;
    z-index: 1;
}

.modal-detail-side {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
    background: var(--bg-secondary);
}

.modal-header {
    padding: 18px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    line-height: 1.4;
    color: var(--text-primary);
}

.modal-comments {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
}

.comment-item {
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.5;
}

.comment-author {
    font-weight: 700;
    color: var(--accent-coral);
    margin-right: 6px;
}

.comment-text {
    color: var(--text-primary);
}

.comment-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.modal-reactions {
    padding: 12px 18px;
    display: flex;
    gap: 4px;
    border-top: 1px solid var(--border);
}

.modal-comment-form {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

.modal-comment-form input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-main);
    outline: none;
    transition: border-color var(--transition);
    min-height: 44px;
}

.modal-comment-form input:focus {
    border-color: var(--accent-coral);
}

.modal-comment-form input::placeholder {
    color: var(--text-muted);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.7;
    transition: all var(--transition);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    opacity: 1;
    background: rgba(212, 115, 108, 0.3);
}

/* ── Auth Modal ────────────────────────────────────────────── */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.auth-modal.active {
    display: flex;
}

.auth-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    width: 400px;
    max-width: 95vw;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
}

.auth-box h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.auth-box .subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.form-group input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-main);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
    border-color: var(--accent-coral);
    box-shadow: 0 0 0 3px rgba(212, 115, 108, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.auth-error {
    color: var(--danger);
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
}

.auth-box .btn {
    width: 100%;
    justify-content: center;
    padding: 13px;
    font-size: 14px;
    margin-top: 8px;
}

.auth-toggle {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-toggle a {
    color: var(--accent-coral);
    font-weight: 600;
}

.auth-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition);
}

.auth-close:hover {
    color: var(--text-primary);
}

/* ── About Page ────────────────────────────────────────────── */

.about-container {
    max-width: 740px;
    margin: 0 auto;
    padding: 60px 28px 120px;
    position: relative;
    z-index: 1;
}

.about-hero {
    text-align: center;
    margin-bottom: 64px;
    padding: 20px 0;
}

.about-logo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid rgba(212, 115, 108, 0.6);
    box-shadow:
        0 0 0 8px rgba(212, 115, 108, 0.05),
        0 0 0 20px rgba(212, 115, 108, 0.02),
        0 0 30px rgba(212, 115, 108, 0.3),
        0 0 60px rgba(212, 115, 108, 0.15),
        0 0 120px rgba(122, 95, 138, 0.08);
    margin: 0 auto 32px;
    object-fit: cover;
    animation: fadeInUp 0.5s var(--ease-out-expo) both, logoPulse 4s ease-in-out 0.5s infinite;
}

@keyframes logoPulse {
    0%, 100% {
        box-shadow:
            0 0 0 8px rgba(212, 115, 108, 0.05),
            0 0 0 20px rgba(212, 115, 108, 0.02),
            0 0 30px rgba(212, 115, 108, 0.3),
            0 0 60px rgba(212, 115, 108, 0.15),
            0 0 120px rgba(122, 95, 138, 0.08);
    }
    50% {
        box-shadow:
            0 0 0 12px rgba(212, 115, 108, 0.08),
            0 0 0 28px rgba(212, 115, 108, 0.04),
            0 0 40px rgba(212, 115, 108, 0.4),
            0 0 80px rgba(212, 115, 108, 0.2),
            0 0 160px rgba(122, 95, 138, 0.12);
    }
}

.about-hero .hero-title {
    animation: fadeInUp 0.6s var(--ease-out-expo) 0.15s both, titleGlow 6s ease-in-out 0.8s infinite;
}

.about-hero h1 {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 6px;
    margin-bottom: 12px;
}

.about-hero h1 span {
    color: var(--accent-coral);
}

.about-hero .tagline {
    font-size: 16px;
    color: var(--text-secondary);
    font-style: italic;
    letter-spacing: 0.5px;
    max-width: 500px;
    margin: 0 auto;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.4s both;
}

/* Glass card sections */
.about-section {
    margin-bottom: 28px;
    padding: 32px;
    background: rgba(10, 10, 18, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-xl);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.8s var(--ease-out-expo);
}

.about-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.about-section > * {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

.about-section > *:nth-child(1) { transition-delay: 0.1s; }
.about-section > *:nth-child(2) { transition-delay: 0.18s; }
.about-section > *:nth-child(3) { transition-delay: 0.26s; }
.about-section > *:nth-child(4) { transition-delay: 0.34s; }
.about-section > *:nth-child(5) { transition-delay: 0.42s; }
.about-section > *:nth-child(6) { transition-delay: 0.50s; }

.about-section.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient headings */
.about-section h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
    background: linear-gradient(135deg, var(--accent-coral-glow) 0%, var(--accent-mauve) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-coral), transparent);
    margin-top: 12px;
    border-radius: 2px;
}

.about-section p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 16px;
}

.about-section .highlight {
    color: var(--accent-mauve);
    font-weight: 600;
    text-shadow: 0 0 18px rgba(192, 168, 204, 0.25);
}

/* Notice — first section accent */
.about-notice {
    background: rgba(212, 115, 108, 0.04);
    border: 1px solid rgba(212, 115, 108, 0.10);
    border-radius: var(--radius-xl);
    padding: 36px 36px 28px;
    position: relative;
    overflow: hidden;
}

.about-notice::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 115, 108, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.about-notice h2 {
    background: linear-gradient(135deg, var(--accent-coral-glow) 0%, #fff 200%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Blockquotes with glowing border */
.about-quote {
    position: relative;
    border-left: none;
    padding: 24px 28px 24px 30px;
    margin: 24px 0 0;
    background: rgba(212, 115, 108, 0.03);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
}

.about-quote::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-coral);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(212, 115, 108, 0.5), 0 0 20px rgba(212, 115, 108, 0.2);
}

.about-quote .author {
    display: block;
    margin-top: 10px;
    font-style: normal;
    font-weight: 600;
    color: var(--accent-coral);
    font-size: 13px;
}

/* About video showcase */
.about-video-showcase {
    margin: 40px auto 48px;
    text-align: center;
    max-width: 700px;
}

.about-video-showcase video {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 115, 108, 0.08);
}

.about-video-caption {
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* About showcase images */
.about-showcase {
    margin: 40px 0;
    text-align: center;
}

.about-showcase img {
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-showcase img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 48px rgba(212, 115, 108, 0.15);
}

.about-showcase figcaption {
    margin-top: 12px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.about-showcase .showcase-sub {
    font-weight: 400;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0;
}

/* References list */
.about-references {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.about-references h3 {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.about-references ul {
    list-style: none;
    padding: 0;
}

.about-references li {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 4px;
    padding-left: 14px;
    position: relative;
}

.about-references li::before {
    content: '\203A';
    position: absolute;
    left: 0;
    color: var(--accent-coral);
    opacity: 0.5;
}

.about-references em {
    font-style: italic;
    color: var(--text-secondary);
}

/* ── Loading ───────────────────────────────────────────────── */

.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 60px;
    grid-column: 1 / -1;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-top-color: var(--accent-coral);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ── Empty state ───────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 15px;
    grid-column: 1 / -1;
}

/* ── User badge in header ──────────────────────────────────── */

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.user-badge .username {
    color: var(--accent-mauve);
}

/* ── Footer ────────────────────────────────────────────────── */

.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 36px 24px 48px;
    color: var(--text-muted);
    font-size: 12px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    border-top: 1px solid var(--border);
    margin-top: 0;
    background: linear-gradient(180deg, transparent, rgba(6, 6, 9, 0.5));
}

.footer a {
    color: var(--accent-coral);
}

.footer .footer-sub {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.6;
}

.footer .footer-credit {
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.5;
    font-family: var(--font-main);
    letter-spacing: 0.5px;
}

/* ── Toast Notifications ───────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 24px;
    font-size: 13px;
    color: var(--text-primary);
    z-index: 3000;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 900px) {
    #feed {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .feed-container {
        padding: 28px 16px 100px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 12px;
        height: 48px;
        flex-wrap: nowrap;
    }
    .nav-actions {
        gap: 4px;
    }
    .nav-link {
        font-size: 11px;
        padding: 4px 6px;
        letter-spacing: 0.5px;
    }
    .logo-text {
        font-size: 14px;
        letter-spacing: 1.5px;
    }
    .logo-img {
        width: 24px;
        height: 24px;
    }
    .logo-link {
        gap: 6px;
    }
    .btn-small {
        padding: 4px 10px;
        font-size: 10px;
    }
    #auth-area {
        display: flex;
        gap: 4px;
    }
    .modal-content {
        flex-direction: column;
        max-height: 95vh;
    }
    .modal-image-side {
        max-height: 50vh;
    }
    .modal-detail-side {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border);
        max-height: 45vh;
    }
    .about-hero h1 {
        font-size: 32px;
        letter-spacing: 4px;
    }
    .ascii-art {
        font-size: 8px;
    }
    .ascii-art-small {
        font-size: 7px;
    }
    .hero-badge {
        font-size: 7px;
        letter-spacing: 1px;
        padding: 7px 14px;
        gap: 6px;
    }
    .hero-badge .badge-icon {
        font-size: 11px;
    }
    .hero-acronym {
        font-size: 12px;
        letter-spacing: 0.5px;
    }
    .hero-tagline {
        font-size: 13px;
    }
    .hero-section {
        padding: 32px 14px 28px;
    }
    .about-container {
        padding: 12px 16px 20px;
    }
    .about-hero {
        margin-bottom: 16px;
        padding: 6px 0;
    }
    .about-section {
        margin-bottom: 16px;
    }
    .about-showcase {
        margin: 16px auto;
    }
    .about-notice {
        padding: 20px 18px 16px;
    }
    .about-section h2 {
        font-size: 18px;
    }
    .about-section p {
        font-size: 14px;
    }
}

@media (max-width: 560px) {
    #feed {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .feed-container {
        padding: 20px 14px 80px;
    }
    .art-card {
        border-radius: var(--radius-lg);
    }
    .category-filter {
        gap: 6px;
        margin-bottom: 20px;
    }
    .category-btn {
        padding: 6px 14px;
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .logo-text {
        font-size: 14px;
        letter-spacing: 1.5px;
    }
    .nav-link {
        font-size: 10px;
        padding: 4px 6px;
    }
    .ascii-art {
        font-size: 6px;
    }
    .hero-acronym {
        font-size: 11px;
    }
}

/* ── Downloads / Wallpaper Grid ─────────────────────────────── */

.downloads-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.wallpaper-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-slow);
}

.wallpaper-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
}

.wallpaper-preview {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.wallpaper-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.wallpaper-card:hover .wallpaper-preview img {
    transform: scale(1.05);
    filter: brightness(0.6);
}

.wallpaper-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.wallpaper-card:hover .wallpaper-overlay {
    opacity: 1;
}

.wallpaper-dl-btn {
    padding: 10px 22px !important;
    font-size: 13px !important;
    text-decoration: none;
    gap: 8px;
}

.wallpaper-info {
    padding: 14px 16px;
}

.wallpaper-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.wallpaper-meta {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

@media (max-width: 560px) {
    .wallpaper-grid {
        grid-template-columns: 1fr;
    }
    .downloads-title {
        font-size: 24px;
    }
    .wallpaper-overlay {
        opacity: 1;
        background: linear-gradient(transparent 40%, rgba(0,0,0,0.7));
        align-items: flex-end;
        padding-bottom: 14px;
    }
}

/* ── Admin Controls ────────────────────────────────────────── */

.admin-fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-coral);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 28px rgba(212, 115, 108, 0.4), 0 0 0 0 rgba(212, 115, 108, 0);
    transition: all 0.25s ease;
}

.admin-fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 36px rgba(212, 115, 108, 0.5);
    background: var(--accent-coral-glow);
}

.admin-card-controls {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.admin-card-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    padding: 0;
}

.admin-card-btn:hover {
    color: var(--accent-coral);
    border-color: var(--accent-coral);
    background: rgba(212, 115, 108, 0.1);
}

.admin-card-btn-danger:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: rgba(196, 64, 64, 0.1);
}

.admin-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    width: 440px;
    max-width: 95vw;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.admin-modal-box h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.admin-modal-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.admin-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-main);
    outline: none;
    transition: border-color var(--transition);
    appearance: none;
    cursor: pointer;
}

.admin-select:focus {
    border-color: var(--accent-coral);
}

.admin-file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}

.admin-file-label:hover {
    border-color: var(--accent-coral);
    color: var(--accent-coral);
    background: rgba(212, 115, 108, 0.04);
}

.admin-status {
    font-size: 13px;
    min-height: 20px;
    margin-bottom: 8px;
}

.admin-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* ── Card entrance animation ───────────────────────────────── */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.art-card {
    animation: fadeInUp 0.5s ease backwards;
}

.art-card:nth-child(1) { animation-delay: 0s; }
.art-card:nth-child(2) { animation-delay: 0.06s; }
.art-card:nth-child(3) { animation-delay: 0.12s; }
.art-card:nth-child(4) { animation-delay: 0.18s; }
.art-card:nth-child(5) { animation-delay: 0.24s; }
.art-card:nth-child(6) { animation-delay: 0.30s; }
.art-card:nth-child(7) { animation-delay: 0.36s; }
.art-card:nth-child(8) { animation-delay: 0.42s; }
.art-card:nth-child(9) { animation-delay: 0.48s; }
.art-card:nth-child(10) { animation-delay: 0.54s; }
.art-card:nth-child(11) { animation-delay: 0.60s; }
.art-card:nth-child(12) { animation-delay: 0.66s; }

/* ── Enhanced card glow ───────────────────────────────────── */

.art-card:hover {
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.7),
                0 0 40px rgba(212, 115, 108, 0.12),
                0 0 80px rgba(212, 115, 108, 0.05);
}

.art-card:hover .art-card-image-wrap img {
    filter: brightness(0.8) contrast(1.05);
}

/* ── SSR noscript fallback for crawlers ────────────────────── */

.ssr-feed { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.ssr-feed h2 { color: var(--accent-coral); margin-bottom: 12px; }
.ssr-card { margin-bottom: 32px; }
.ssr-card img { max-width: 100%; border-radius: 8px; }
.ssr-card h3 { color: var(--text-primary); margin: 8px 0 4px; }
.ssr-card p { color: var(--text-muted); font-size: 0.85rem; }

/* ── Background layers — About page boost ─────────────────── */

body:has(.about-container) #gol-canvas { opacity: 0.65; }

/* ── Background layers — Responsive ───────────────────────── */

@media (max-width: 768px) {
    /* Kill GPU-heavy background layers */
    #gol-canvas { display: none !important; }
    .aurora-bg { display: none !important; }
    .noise-overlay { display: none !important; }

    /* Simpler header — no backdrop-filter on mobile */
    .header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(6, 6, 9, 0.96); }

    .about-section { padding: 24px 20px; }
    .about-notice { padding: 24px 20px 20px; }

    /* Kill ALL pseudo-element overlays and decorations */
    .hero-title::before, .hero-title::after { display: none; }
    .hero-section::before { display: none; }
    .hero-badge::before { display: none; }
    .art-card::before { display: none; }
    .category-btn::before { display: none; }
    .art-card-image-wrap::after { display: none; }

    /* No animations on cards — instant render */
    .art-card { animation: none !important; opacity: 1; transform: none; transition: none; }
    .art-card:hover { transform: none; box-shadow: none; }
    .art-card-image-wrap img { transition: none; }
    .art-card:hover .art-card-image-wrap img { transform: none; filter: none; }

    /* Hero: no letter animations */
    .hero-title > span { animation: none; opacity: 1; transform: none; }
    .hero-acronym { animation: none; opacity: 0.8; }
    .hero-tagline { animation: none; opacity: 0.8; }
    .hero-tagline::after { display: none; }
    .hero-badge { animation: none; opacity: 1; }
    .scroll-progress { display: none; }

    /* Mobile feed: 2 columns */
    #feed { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    /* Mobile cards: bigger touch targets, zero transitions */
    .art-card-actions { padding: 12px 14px 6px; gap: 4px; }
    .reaction-btn { font-size: 24px; padding: 6px 8px; transition: none; transform: none; }
    .reaction-btn:hover, .reaction-btn:active { transform: none; }
    .reaction-btn.active { animation: none; }
    .art-card-title { font-size: 14px; padding: 6px 14px 8px; }
    .download-btn { font-size: 22px; padding: 6px 8px; }

    /* Category buttons: no magnetic/ripple effects */
    .category-btn { transition: color 0.15s ease, background 0.15s ease; }
    .category-btn:hover { transform: none; }
    .category-btn:active { transform: none; }

    /* Wallpaper cards: no hover animation */
    .wallpaper-card { transition: none; }
    .wallpaper-card:hover { transform: none; box-shadow: none; }
    .wallpaper-card:hover .wallpaper-preview img { transform: none; filter: none; }

    /* Mobile comment form: bigger inputs */
    .modal-comment-form input { font-size: 16px !important; padding: 12px !important; min-height: 44px; }
    .modal-comment-form .btn { min-height: 44px; padding: 10px 16px !important; font-size: 14px !important; }

    /* Modal full-screen on mobile */
    .modal-overlay { animation: none; }
    .modal-content { flex-direction: column; max-height: 100vh; height: 100vh; border-radius: 0; animation: none; }
    .modal-image-side { max-height: 40vh; min-height: 30vh; }
    .modal-detail-side { width: 100%; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
    .modal-comments { max-height: none; overflow-y: visible; }

    /* Global mobile perf */
    * { -webkit-tap-highlight-color: transparent; }
}

@media (max-width: 560px) {
    /* Single column on small phones */
    #feed { grid-template-columns: 1fr; gap: 12px; }
    .feed-container { padding: 20px 12px 80px; }
    .hero-section { padding: 40px 16px 32px; }
    .hero-title { font-size: 36px !important; }

    /* Even bigger touch targets */
    .reaction-btn { font-size: 26px; padding: 8px 10px; }
    .comment-count-link { font-size: 14px; padding: 4px 0; }

    /* Comment form — full width, stacked */
    .modal-comment-form { flex-direction: column !important; gap: 8px !important; }
    .modal-comment-form input { width: 100% !important; flex: none !important; }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    #gol-canvas { display: none; }
    .aurora-blob { animation: none !important; }
    .scroll-progress { display: none; }
}
