/* ============================================================
   MakeshiftMC Forum — Sky Theme / 8-Bit Aesthetic
   ============================================================
   Colors: sky blue, cloud white, grass green, dirt brown, sun gold
   Style: Boxy, pixelated borders, retro Minecraft feel
   ============================================================ */

/* ---- CSS Variables ---- */
:root,
[data-theme="dark"] {
    --bg-deepest: #1b2a3a;
    --bg-base: #243447;
    --bg-card: #2c3e55;
    --bg-card-hover: #35495e;
    --bg-input: #1e2f40;
    --border: #4a7a9b;
    --border-light: #5c94b8;
    --text-primary: #e8f4fd;
    --text-secondary: #a8c8de;
    --text-muted: #6d99b5;
    --accent-green: #7fcc4a;
    --accent-gold: #f5c842;
    --accent-blue: #6ec6f5;
    --accent-red: #e85d5d;
    --accent-purple: #b48ef0;
    --accent-teal: #5ee8d2;
    --accent-dirt: #a0784a;
    --accent-sky: #87ceeb;
    --accent-sun: #ffe066;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --navbar-bg: rgba(27, 42, 58, 0.95);
    --flash-success: #1a5c2a;
    --flash-error: #6b2020;
    --flash-info: #1a4a6b;
    --pixel-border: 3px solid var(--border);
}

[data-theme="light"] {
    --bg-deepest: #c8e6f5;
    --bg-base: #dff0fa;
    --bg-card: #eaf5fc;
    --bg-card-hover: #d4ecf8;
    --bg-input: #dff0fa;
    --border: #7ab8d6;
    --border-light: #5ca3c8;
    --text-primary: #1b2a3a;
    --text-secondary: #3a5a72;
    --text-muted: #5a8099;
    --navbar-bg: rgba(223, 240, 250, 0.95);
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --flash-success: #c8f5d0;
    --flash-error: #f5c8c8;
    --flash-info: #c8e0f5;
}

/* ---- Cloud Theme — Baby blue sky, like the landing portal ---- */
[data-theme="cloud"] {
    --bg-deepest: #7ec8e3;
    --bg-base: #8fd4eb;
    --bg-card: rgba(255, 255, 255, 0.18);
    --bg-card-hover: rgba(255, 255, 255, 0.28);
    --bg-input: rgba(255, 255, 255, 0.15);
    --border: rgba(255, 255, 255, 0.35);
    --border-light: rgba(255, 255, 255, 0.5);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.55);
    --accent-green: #4ade80;
    --accent-gold: #ffe066;
    --accent-blue: #ffffff;
    --accent-red: #ff7b7b;
    --accent-purple: #c9a3ff;
    --accent-teal: #5ee8d2;
    --accent-dirt: #d4a574;
    --accent-sky: #b8e4f8;
    --accent-sun: #ffe066;
    --shadow: rgba(0, 0, 0, 0.12);
    --shadow-lg: rgba(0, 0, 0, 0.2);
    --navbar-bg: rgba(90, 171, 207, 0.92);
    --flash-success: rgba(74, 222, 128, 0.25);
    --flash-error: rgba(255, 123, 123, 0.25);
    --flash-info: rgba(255, 255, 255, 0.2);
    --pixel-border: 3px solid rgba(255, 255, 255, 0.35);
}

/* ---- Retro Theme — Neon arcade, CRT glow ---- */
[data-theme="retro"] {
    --bg-deepest: #0a0a0a;
    --bg-base: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --bg-input: #0d0d0d;
    --border: #ff00ff;
    --border-light: #00ffff;
    --text-primary: #00ff41;
    --text-secondary: #00cc33;
    --text-muted: #009922;
    --accent-green: #00ff41;
    --accent-gold: #ffff00;
    --accent-blue: #00ffff;
    --accent-red: #ff0040;
    --accent-purple: #ff00ff;
    --accent-teal: #00ffcc;
    --accent-dirt: #ff8800;
    --accent-sky: #00aaff;
    --accent-sun: #ffff00;
    --shadow: rgba(255, 0, 255, 0.15);
    --shadow-lg: rgba(0, 255, 65, 0.2);
    --navbar-bg: rgba(10, 10, 10, 0.97);
    --flash-success: #003300;
    --flash-error: #330011;
    --flash-info: #001133;
    --pixel-border: 3px solid #ff00ff;
}

/* ---- Modern Theme — Sleek, minimal, clean ---- */
[data-theme="modern"] {
    --bg-deepest: #f8f9fa;
    --bg-base: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f3f5;
    --bg-input: #f8f9fa;
    --border: #dee2e6;
    --border-light: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #868e96;
    --accent-green: #20c997;
    --accent-gold: #fab005;
    --accent-blue: #339af0;
    --accent-red: #fa5252;
    --accent-purple: #7950f2;
    --accent-teal: #15aabf;
    --accent-dirt: #e67700;
    --accent-sky: #74c0fc;
    --accent-sun: #ffd43b;
    --shadow: rgba(0, 0, 0, 0.04);
    --shadow-lg: rgba(0, 0, 0, 0.08);
    --navbar-bg: rgba(255, 255, 255, 0.97);
    --flash-success: #d3f9d8;
    --flash-error: #ffe3e3;
    --flash-info: #d0ebff;
    --pixel-border: 1px solid #dee2e6;
}

/* ---- Simple Theme — Black and white, minimal ---- */
[data-theme="simple"] {
    --bg-deepest: #ffffff;
    --bg-base: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5f5;
    --bg-input: #fafafa;
    --border: #222222;
    --border-light: #444444;
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-muted: #777777;
    --accent-green: #000000;
    --accent-gold: #000000;
    --accent-blue: #000000;
    --accent-red: #cc0000;
    --accent-purple: #000000;
    --accent-teal: #000000;
    --accent-dirt: #555555;
    --accent-sky: #666666;
    --accent-sun: #888888;
    --shadow: rgba(0, 0, 0, 0.06);
    --shadow-lg: rgba(0, 0, 0, 0.1);
    --navbar-bg: rgba(255, 255, 255, 0.98);
    --flash-success: #e8e8e8;
    --flash-error: #ffdddd;
    --flash-info: #e8e8e8;
    --pixel-border: 2px solid #222222;
}

/* ---- Calm Theme — Warm cream, soft pastels ---- */
[data-theme="calm"] {
    --bg-deepest: #f5f0e8;
    --bg-base: #faf6f0;
    --bg-card: #fffcf7;
    --bg-card-hover: #f0ebe3;
    --bg-input: #f5f0e8;
    --border: #d4c5a9;
    --border-light: #e2d6be;
    --text-primary: #3d3425;
    --text-secondary: #6b5e4d;
    --text-muted: #998a74;
    --accent-green: #8fbc6a;
    --accent-gold: #d4a843;
    --accent-blue: #7badc4;
    --accent-red: #c47a6e;
    --accent-purple: #a88cb8;
    --accent-teal: #7bbfae;
    --accent-dirt: #b89a6a;
    --accent-sky: #a4c8d8;
    --accent-sun: #e0c477;
    --shadow: rgba(61, 52, 37, 0.06);
    --shadow-lg: rgba(61, 52, 37, 0.12);
    --navbar-bg: rgba(250, 246, 240, 0.97);
    --flash-success: #e4f0d8;
    --flash-error: #f0ddd8;
    --flash-info: #d8e8f0;
    --pixel-border: 2px solid #d4c5a9;
}

/* ---- Rush Theme — Base is dark, JS cycles colors ---- */
[data-theme="rush"] {
    --bg-deepest: #1b2a3a;
    --bg-base: #243447;
    --bg-card: #2c3e55;
    --bg-card-hover: #35495e;
    --bg-input: #1e2f40;
    --border: #4a7a9b;
    --border-light: #5c94b8;
    --text-primary: #e8f4fd;
    --text-secondary: #a8c8de;
    --text-muted: #6d99b5;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --navbar-bg: rgba(27, 42, 58, 0.95);
    --flash-success: #1a5c2a;
    --flash-error: #6b2020;
    --flash-info: #1a4a6b;
    --pixel-border: 3px solid var(--border);
    /* accent colors are overridden by JS every few seconds */
    --accent-green: #7fcc4a;
    --accent-gold: #f5c842;
    --accent-blue: #6ec6f5;
    --accent-red: #e85d5d;
    --accent-purple: #b48ef0;
    --accent-teal: #5ee8d2;
    --accent-dirt: #a0784a;
    --accent-sky: #87ceeb;
    --accent-sun: #ffe066;
}

/* ---- Wild Theme — Chaotic, annoying on purpose ---- */
[data-theme="wild"] {
    --bg-deepest: #1a0a2e;
    --bg-base: #220e3a;
    --bg-card: #2a1245;
    --bg-card-hover: #351a55;
    --bg-input: #1e0c35;
    --border: #ff00ff;
    --border-light: #00ffff;
    --text-primary: #ffffff;
    --text-secondary: #ffcc00;
    --text-muted: #ff66cc;
    --accent-green: #00ff00;
    --accent-gold: #ffff00;
    --accent-blue: #00ccff;
    --accent-red: #ff0000;
    --accent-purple: #ff00ff;
    --accent-teal: #00ffcc;
    --accent-dirt: #ff8800;
    --accent-sky: #00aaff;
    --accent-sun: #ffff00;
    --shadow: rgba(255, 0, 255, 0.3);
    --shadow-lg: rgba(255, 255, 0, 0.3);
    --navbar-bg: rgba(26, 10, 46, 0.9);
    --flash-success: #003300;
    --flash-error: #330000;
    --flash-info: #000033;
    --pixel-border: 3px solid #ff00ff;
}

/* ---- Wild Theme — Chaotic animations ---- */
[data-theme="wild"] .nav-link {
    animation: wild-bounce 0.5s ease-in-out infinite alternate;
}
[data-theme="wild"] .nav-link:nth-child(2) { animation-delay: 0.1s; }
[data-theme="wild"] .nav-link:nth-child(3) { animation-delay: 0.2s; }
[data-theme="wild"] .nav-link:nth-child(4) { animation-delay: 0.3s; }
[data-theme="wild"] .nav-link:nth-child(5) { animation-delay: 0.4s; }
[data-theme="wild"] .nav-link:nth-child(6) { animation-delay: 0.5s; }
[data-theme="wild"] .nav-link:nth-child(7) { animation-delay: 0.15s; }
[data-theme="wild"] .nav-link:nth-child(8) { animation-delay: 0.35s; }

[data-theme="wild"] .card,
[data-theme="wild"] .category-card,
[data-theme="wild"] .sidebar-widget,
[data-theme="wild"] .trending-card {
    animation: wild-wobble 2s ease-in-out infinite alternate;
}
[data-theme="wild"] .card:nth-child(even),
[data-theme="wild"] .category-card:nth-child(even) {
    animation-direction: alternate-reverse;
    animation-delay: 0.3s;
}

[data-theme="wild"] .btn {
    animation: wild-pulse 0.8s ease-in-out infinite alternate;
}

[data-theme="wild"] .nav-logo .logo-text {
    animation: wild-rainbow 1.5s linear infinite;
}

[data-theme="wild"] .footer {
    animation: wild-slide 3s ease-in-out infinite alternate;
}

[data-theme="wild"] body {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><text y='24' font-size='24'>💥</text></svg>") 16 16, auto;
}

@keyframes wild-bounce {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-8px) rotate(3deg); }
}

@keyframes wild-wobble {
    0% { transform: rotate(-1deg) scale(1); }
    50% { transform: rotate(1deg) scale(1.01); }
    100% { transform: rotate(-0.5deg) scale(0.99); }
}

@keyframes wild-pulse {
    0% { transform: scale(1); filter: hue-rotate(0deg); }
    100% { transform: scale(1.08); filter: hue-rotate(90deg); }
}

@keyframes wild-rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes wild-slide {
    0% { transform: translateX(-5px); }
    100% { transform: translateX(5px); }
}

/* ---- Retro Theme — CRT scanline overlay + glow effects ---- */
[data-theme="retro"] .navbar,
[data-theme="retro"] .card,
[data-theme="retro"] .category-card,
[data-theme="retro"] .sidebar-widget {
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.15), inset 0 0 30px rgba(0, 0, 0, 0.3);
}

[data-theme="retro"] .nav-logo .logo-text {
    text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41, 0 0 40px #00ff41;
}

[data-theme="retro"] .btn-primary {
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
}

[data-theme="retro"] .btn-primary:hover {
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.7);
}

/* ---- Modern Theme — Remove pixel borders, smooth everything ---- */
[data-theme="modern"] .card,
[data-theme="modern"] .category-card,
[data-theme="modern"] .sidebar-widget,
[data-theme="modern"] .trending-card,
[data-theme="modern"] .btn,
[data-theme="modern"] .nav-ip,
[data-theme="modern"] .flash,
[data-theme="modern"] input,
[data-theme="modern"] textarea,
[data-theme="modern"] select {
    border-radius: 10px !important;
}

[data-theme="modern"] .navbar {
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--shadow);
}

[data-theme="modern"] .nav-logo .logo-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ---- Simple Theme — Strip decorations ---- */
[data-theme="simple"] * {
    text-shadow: none !important;
    border-radius: 0 !important;
}

[data-theme="simple"] .card,
[data-theme="simple"] .category-card,
[data-theme="simple"] .sidebar-widget,
[data-theme="simple"] .trending-card {
    box-shadow: none;
    border: 2px solid #222;
}

[data-theme="simple"] .nav-logo .logo-text {
    font-family: 'Courier New', monospace;
    text-shadow: none !important;
}

[data-theme="simple"] .btn {
    box-shadow: none;
    border: 2px solid #222;
    font-weight: 700;
}

/* ---- Calm Theme — Softer borders, gentle shadows ---- */
[data-theme="calm"] .card,
[data-theme="calm"] .category-card,
[data-theme="calm"] .sidebar-widget {
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(61, 52, 37, 0.06);
}

[data-theme="calm"] .navbar {
    box-shadow: 0 1px 6px rgba(61, 52, 37, 0.08);
}

[data-theme="calm"] .nav-logo .logo-text {
    text-shadow: none;
    color: #5a4a32;
}

/* ---- Cloud Theme — Glassy frosted look ---- */
[data-theme="cloud"] body {
    background: linear-gradient(180deg, #7ec8e3 0%, #5aabcf 40%, #3d8bb5 100%);
    background-attachment: fixed;
}

[data-theme="cloud"] .card,
[data-theme="cloud"] .category-card,
[data-theme="cloud"] .sidebar-widget,
[data-theme="cloud"] .trending-card {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

[data-theme="cloud"] .navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-theme="cloud"] .nav-logo .logo-text {
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 255, 255, 0.2);
}

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

/* ---- Base ---- */
html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-deepest);
    /* Sky gradient background */
    background-image: linear-gradient(180deg, #1a3550 0%, #1b2a3a 30%, #243447 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent-sky);
    text-decoration: none;
    transition: color 0.15s;
}
a:hover { color: var(--accent-sun); }

img { max-width: 100%; height: auto; }

::selection { background: rgba(135, 206, 235, 0.3); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deepest); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; /* boxy */ }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ---- Typography ---- */
.pixel-font, h1, h2, h3 {
    font-family: 'Press Start 2P', monospace;
}
h1 { font-size: 1.4rem; line-height: 1.5; margin-bottom: 0.75rem; }
h2 { font-size: 1rem; line-height: 1.5; margin-bottom: 0.5rem; }
h3 { font-size: 0.8rem; line-height: 1.5; margin-bottom: 0.5rem; }

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes pixelBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.stagger-in > * { animation: fadeInUp 0.3s ease both; }
.stagger-in > *:nth-child(1) { animation-delay: 0.03s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.08s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.13s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.18s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.23s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.28s; }
.stagger-in > *:nth-child(7) { animation-delay: 0.33s; }
.stagger-in > *:nth-child(8) { animation-delay: 0.38s; }

/* ============================================================
   NAVBAR — 8-bit style, boxy, pixel border bottom
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--navbar-bg);
    backdrop-filter: blur(8px);
    border-bottom: 4px solid var(--accent-dirt);
    padding: 0 1rem;
    image-rendering: pixelated;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 58px;
    gap: 1rem;
}

.nav-logo { flex-shrink: 0; }

.logo-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.85rem;
    color: var(--accent-sky);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.4), 0 0 10px rgba(135,206,235,0.3);
    transition: all 0.2s;
    display: inline-block;
}
.logo-text:hover {
    color: var(--accent-sun);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.4), 0 0 14px rgba(255,224,102,0.3);
    transform: scale(1.04);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text-secondary);
    padding: 0.45rem 0.7rem;
    border-radius: 2px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s;
    white-space: nowrap;
    border: 2px solid transparent;
}
.nav-link:hover {
    color: var(--text-primary);
    background: rgba(135, 206, 235, 0.08);
    border-color: rgba(135, 206, 235, 0.15);
}
.nav-link.active {
    color: var(--accent-sun);
    background: rgba(255, 224, 102, 0.08);
    border-color: rgba(255, 224, 102, 0.2);
    border-bottom: 2px solid var(--accent-sun);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Server IP — pixel chip */
.nav-ip {
    background: rgba(135, 206, 235, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 2px;
    font-size: 0.68rem;
    font-family: 'Press Start 2P', monospace;
    color: var(--accent-teal);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid rgba(94, 232, 210, 0.2);
}
.nav-ip:hover {
    border-color: var(--accent-teal);
    background: rgba(94, 232, 210, 0.15);
    box-shadow: 0 0 10px rgba(94, 232, 210, 0.2);
}

/* Notification bell */
.nav-bell {
    position: relative;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.35rem;
    border-radius: 2px;
    transition: all 0.2s;
}
.nav-bell:hover { color: var(--accent-sun); background: rgba(255,224,102,0.08); }

.bell-badge {
    position: absolute;
    top: 0; right: -2px;
    background: var(--accent-red);
    color: white;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
    animation: pixelBlink 2s infinite;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 340px;
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    box-shadow: 4px 4px 0 var(--shadow);
    max-height: 420px;
    overflow-y: auto;
    z-index: 100;
    animation: fadeInScale 0.15s ease;
}

/* User menu */
.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 2px;
    transition: all 0.2s;
    position: relative;
    border: 2px solid transparent;
}
.nav-user:hover { background: var(--bg-card); border-color: var(--border); }

.user-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 2px;
    object-fit: cover;
    border: 2px solid var(--border);
    image-rendering: pixelated;
}

.user-name { font-size: 0.82rem; font-weight: 500; color: var(--text-primary); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 190px;
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    box-shadow: 4px 4px 0 var(--shadow);
    padding: 0.4rem;
    z-index: 100;
    animation: fadeInScale 0.15s ease;
}
.user-dropdown a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.82rem;
    border-radius: 2px;
    transition: all 0.15s;
}
.user-dropdown a:hover { background: rgba(135,206,235,0.1); color: var(--accent-sky); }
.user-dropdown hr { border: none; border-top: 2px solid var(--border); margin: 0.3rem 0; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 3px;
    background: var(--text-secondary);
    transition: all 0.2s;
}

/* ============================================================
   BUTTONS — Boxy, pixel-style, strong shadows
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border-radius: 2px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(0,0,0,0.4); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0,0,0,0.3); }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.78rem; box-shadow: 2px 2px 0 rgba(0,0,0,0.3); }

.btn-primary {
    background: var(--accent-green);
    color: #1b2a3a;
    border-color: #5aaa30;
}
.btn-primary:hover { background: #8fd65a; color: #1b2a3a; }

.btn-accent {
    background: var(--accent-sun);
    color: #1b2a3a;
    border-color: #d4a830;
}
.btn-accent:hover { background: #ffe88a; color: #1b2a3a; }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--accent-sky); }

.btn-danger {
    background: var(--accent-red);
    color: white;
    border-color: #c44040;
}
.btn-danger:hover { background: #f07070; }

/* ============================================================
   CARDS — Boxy with pixel borders and offset shadows
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    padding: 1.25rem;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
}
.card:hover {
    border-color: var(--accent-sky);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.25);
}

/* ---- Forms ---- */
.form-group { margin-bottom: 1rem; }
.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: var(--bg-input);
    border: 3px solid var(--border);
    border-radius: 2px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-sky);
    box-shadow: 0 0 0 2px rgba(135,206,235,0.15);
}
.form-textarea { min-height: 120px; resize: vertical; }

/* ---- Flash messages ---- */
.flash-container { max-width: 1280px; margin: 0.75rem auto; padding: 0 1rem; }
.flash {
    padding: 0.75rem 1rem;
    border-radius: 2px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    border: 3px solid;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
    animation: fadeInUp 0.25s ease;
}
.flash-success { background: var(--flash-success); color: #a7f3d0; border-color: #059669; }
.flash-error { background: var(--flash-error); color: #fca5a5; border-color: #dc2626; }
.flash-info { background: var(--flash-info); color: #93c5fd; border-color: #3b82f6; }
.flash-close {
    background: none; border: none; color: inherit;
    font-size: 1.2rem; cursor: pointer; opacity: 0.7; padding: 0 0.25rem;
}
.flash-close:hover { opacity: 1; }

/* ---- Main content ---- */
.main-content {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    animation: fadeInUp 0.3s ease;
}

/* ---- Page header ---- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent-sky); }
.breadcrumb-sep { color: var(--text-muted); opacity: 0.5; }

/* ============================================================
   HERO SPLIT — News + Sidebar layout
   ============================================================ */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.4s ease;
}

.hero-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.hero-main-header h2 { margin-bottom: 0; color: var(--accent-sun); }

/* Featured news card — big, full-width in left column */
.featured-news-card {
    display: block;
    border: 3px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.25);
    margin-bottom: 1rem;
}
.featured-news-card:hover {
    border-color: var(--accent-sun);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.3);
}

.featured-news-banner {
    min-height: 200px;
    background-color: #2c4a6a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Fallback gradient when no image */
.featured-news-banner:not([style*="background-image"]) {
    background: linear-gradient(135deg, #2c4a6a 0%, #1a3550 50%, #3a5a7a 100%);
}

.featured-news-overlay {
    position: absolute;
    inset: 0;
    /* Stronger gradient when image is present for text readability */
    background: linear-gradient(transparent 15%, rgba(27,42,58,0.85) 55%, rgba(27,42,58,0.97) 100%);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.featured-news-snippet {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-news-badge {
    display: inline-block;
    background: var(--accent-sun);
    color: #1b2a3a;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    margin-bottom: 0.5rem;
    width: fit-content;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.featured-news-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.featured-news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.featured-news-avatar {
    width: 24px;
    height: 24px;
    border-radius: 2px;
    image-rendering: pixelated;
}

.featured-news-date { color: var(--text-muted); }

/* Mini news cards row */
.news-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.news-mini-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 2px;
    transition: all 0.15s;
    color: var(--text-primary);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}
.news-mini-card:hover {
    border-color: var(--accent-sky);
    background: var(--bg-card-hover);
    transform: translateX(3px);
    color: var(--text-primary);
}

.news-mini-icon { font-size: 1.1rem; flex-shrink: 0; }

.news-mini-title {
    font-size: 0.82rem;
    font-weight: 600;
}
.news-mini-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 3px dashed var(--border);
    border-radius: 2px;
}
.empty-state-icon { font-size: 2rem; margin-bottom: 0.75rem; }

/* ============================================================
   SIDEBAR WIDGETS — Stacked, boxy
   ============================================================ */
.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
}

.widget-header {
    background: rgba(135,206,235,0.08);
    border-bottom: 2px solid var(--border);
    padding: 0.6rem 0.85rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: var(--accent-sky);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.widget-icon { font-size: 0.9rem; }

/* Community Pulse stats */
.pulse-stats {
    display: flex;
    padding: 0.75rem;
    gap: 0;
}
.pulse-stat {
    flex: 1;
    text-align: center;
    padding: 0.4rem;
    border-right: 2px solid var(--border);
}
.pulse-stat:last-child { border-right: none; }
.pulse-stat-value {
    display: block;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.85rem;
    color: var(--accent-sun);
    margin-bottom: 0.25rem;
}
.pulse-stat-label { font-size: 0.68rem; color: var(--text-muted); }

/* Online users */
.online-users {
    padding: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.online-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.4rem;
    background: rgba(126,204,74,0.08);
    border: 1px solid rgba(126,204,74,0.15);
    border-radius: 2px;
    font-size: 0.68rem;
    color: var(--accent-green);
    transition: all 0.15s;
}
.online-user-chip:hover {
    background: rgba(126,204,74,0.15);
    border-color: var(--accent-green);
    color: var(--accent-green);
}
.online-user-avatar { width: 16px; height: 16px; border-radius: 1px; image-rendering: pixelated; }
.online-more { font-size: 0.65rem; color: var(--text-muted); padding: 0.2rem; }
.widget-empty { padding: 0.75rem; text-align: center; font-size: 0.78rem; color: var(--text-muted); }

/* Recent activity */
.recent-activity { padding: 0.35rem; }
.activity-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem;
    border-radius: 2px;
    transition: all 0.15s;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: rgba(135,206,235,0.06); color: var(--text-primary); }
.activity-avatar { width: 22px; height: 22px; border-radius: 2px; image-rendering: pixelated; flex-shrink: 0; }
.activity-title { font-size: 0.75rem; font-weight: 500; line-height: 1.3; }
.activity-meta { font-size: 0.65rem; color: var(--text-muted); margin-top: 0.1rem; }

/* ============================================================
   SECTION BLOCKS — Themed groups with pixel headers
   ============================================================ */
.section-block { margin-bottom: 2rem; }

.section-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 3px solid var(--border);
    flex-wrap: wrap;
}
.section-header h2 {
    margin-bottom: 0;
    color: var(--accent-sky);
}
.section-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ============================================================
   TRENDING — Horizontal scrollable
   ============================================================ */
.trending-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
/* Hide scrollbar but keep functionality */
.trending-scroll::-webkit-scrollbar { height: 6px; }
.trending-scroll::-webkit-scrollbar-track { background: var(--bg-base); border-radius: 0; }
.trending-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; }

.trending-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    transition: all 0.2s;
    color: var(--text-primary);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}
.trending-card:hover {
    border-color: var(--accent-sun);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.2);
    color: var(--text-primary);
}

.trending-rank {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.1rem;
    color: var(--accent-sun);
    flex-shrink: 0;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.trending-body { flex: 1; min-width: 0; }
.trending-title { font-size: 0.78rem; font-weight: 600; margin-bottom: 0.35rem; line-height: 1.4; }

.trending-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.trending-avatar { width: 16px; height: 16px; border-radius: 1px; image-rendering: pixelated; }

.trending-stats-row {
    display: flex;
    gap: 0.75rem;
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ============================================================
   CATEGORY CARDS — Boxy with hover accent
   ============================================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.85rem;
}

.category-card {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    padding: 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}
.category-card:hover {
    border-color: var(--accent-sky);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.2);
    color: var(--text-primary);
}

.category-card-wide { grid-column: 1 / -1; }

.category-icon {
    width: 44px;
    height: 44px;
    background: rgba(135,206,235,0.08);
    border: 2px solid rgba(135,206,235,0.15);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.2s;
}
.category-card:hover .category-icon {
    background: rgba(135,206,235,0.15);
    border-color: var(--accent-sky);
    transform: scale(1.1);
}

.category-info h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.category-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }
.category-stats { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.35rem; }

/* Subcategory chips — inline, pill-ish but boxy */
.subcategory-chips {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.subcategory-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 2px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.15s;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}
.subcategory-chip:hover {
    border-color: var(--accent-sky);
    background: var(--bg-card-hover);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
    color: var(--accent-sky);
}
.chip-count {
    font-size: 0.65rem;
    color: var(--text-muted);
    background: rgba(135,206,235,0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
}

/* ============================================================
   THREAD LIST
   ============================================================ */
.thread-list { display: flex; flex-direction: column; gap: 0.5rem; }

.thread-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 2px;
    padding: 0.85rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: all 0.15s;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
    border-left: 4px solid transparent;
}
.thread-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    border-left-color: var(--accent-sky);
    transform: translateX(3px);
    color: var(--text-primary);
}
.thread-card.pinned { border-left: 4px solid var(--accent-sun); }

.thread-avatar {
    width: 40px; height: 40px; border-radius: 2px;
    object-fit: cover; flex-shrink: 0;
    border: 2px solid var(--border);
    image-rendering: pixelated;
}

.thread-info { flex: 1; min-width: 0; }
.thread-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.thread-snippet {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.thread-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Post thumbnail preview (first image in thread) */
.thread-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 48px;
    border: 2px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-left: 0.75rem;
}
.thread-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thread-stats {
    display: flex;
    gap: 1.25rem;
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
}
.thread-stat-item { display: flex; flex-direction: column; align-items: center; min-width: 50px; }
.thread-stat-value { font-weight: 700; color: var(--accent-sky); font-size: 0.88rem; }

/* ============================================================
   BADGES — Pixel style
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 2px solid;
}
.badge-green { background: rgba(127,204,74,0.12); color: #7fcc4a; border-color: rgba(127,204,74,0.2); }
.badge-gold { background: rgba(245,200,66,0.12); color: #f5c842; border-color: rgba(245,200,66,0.2); }
.badge-blue { background: rgba(110,198,245,0.12); color: #6ec6f5; border-color: rgba(110,198,245,0.2); }
.badge-red { background: rgba(232,93,93,0.12); color: #e85d5d; border-color: rgba(232,93,93,0.2); }
.badge-gray { background: rgba(109,153,181,0.12); color: #6d99b5; border-color: rgba(109,153,181,0.2); }
.badge-purple { background: rgba(180,142,240,0.12); color: #b48ef0; border-color: rgba(180,142,240,0.2); }
.badge-locked::before { content: "🔒 "; }
.badge-pinned::before { content: "📌 "; }

.rank-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: 2px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
}

.trade-open { background: rgba(127,204,74,0.12); color: #7fcc4a; border: 2px solid rgba(127,204,74,0.2); }
.trade-closed { background: rgba(232,93,93,0.12); color: #e85d5d; border: 2px solid rgba(232,93,93,0.2); }

/* ============================================================
   POST CARDS — Boxy sidebar, pixel avatars
   ============================================================ */
.post-card {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    margin-bottom: 0.85rem;
    display: flex;
    overflow: hidden;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
    animation: fadeInUp 0.3s ease both;
}
.post-sidebar {
    width: 185px;
    padding: 1.1rem 0.85rem;
    background: rgba(135,206,235,0.03);
    border-right: 3px solid var(--border);
    text-align: center;
    flex-shrink: 0;
}
.post-author-avatar {
    width: 80px; height: 80px; border-radius: 2px;
    object-fit: cover; margin-bottom: 0.5rem;
    border: 3px solid var(--border);
    image-rendering: pixelated;
}
.post-author-name { font-weight: 600; font-size: 0.88rem; margin-bottom: 0.25rem; }
.post-author-name a { color: var(--text-primary); }
.post-author-name a:hover { color: var(--accent-sky); }
.post-author-rank { font-size: 0.62rem; margin-bottom: 0.15rem; }
.post-author-stats { font-size: 0.68rem; color: var(--text-muted); line-height: 1.6; margin-top: 0.4rem; }

.post-author-online {
    display: inline-block; width: 8px; height: 8px; border-radius: 0;
    background: var(--accent-green); margin-right: 3px; vertical-align: middle;
    animation: pixelBlink 2s infinite;
}
.post-author-offline {
    display: inline-block; width: 8px; height: 8px; border-radius: 0;
    background: var(--text-muted); margin-right: 3px; vertical-align: middle;
}

.post-body { flex: 1; padding: 1.1rem 1.25rem; display: flex; flex-direction: column; }
.post-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.75rem; font-size: 0.72rem; color: var(--text-muted);
    padding-bottom: 0.5rem; border-bottom: 2px solid rgba(255,255,255,0.04);
}
.post-content { flex: 1; font-size: 0.88rem; line-height: 1.75; word-wrap: break-word; }
.post-content img { max-width: 100%; border-radius: 2px; margin: 0.5rem 0; border: 2px solid var(--border); }
.post-content blockquote {
    border-left: 4px solid var(--accent-sun);
    padding: 0.65rem 1rem;
    margin: 0.5rem 0;
    color: var(--text-secondary);
    background: rgba(245,200,66,0.04);
}
.post-content pre {
    background: var(--bg-deepest);
    padding: 0.85rem;
    border-radius: 2px;
    overflow-x: auto;
    font-size: 0.82rem;
    border: 2px solid var(--border);
}
.post-content code { background: var(--bg-deepest); padding: 0.1rem 0.35rem; border-radius: 2px; font-size: 0.82rem; }
.post-edited { font-size: 0.68rem; color: var(--text-muted); font-style: italic; margin-top: 0.5rem; }
.post-signature {
    margin-top: 0.85rem; padding-top: 0.65rem;
    border-top: 2px dashed var(--border);
    font-size: 0.78rem; color: var(--text-muted); font-style: italic; opacity: 0.7;
}

/* ---- Reactions bar ---- */
.reactions-bar {
    display: flex; align-items: center; gap: 0.4rem;
    margin-top: 0.85rem; padding-top: 0.75rem;
    border-top: 2px solid rgba(255,255,255,0.04);
    flex-wrap: wrap;
}
.reaction-btn {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.55rem; border-radius: 2px;
    border: 2px solid var(--border); background: transparent;
    color: var(--text-muted); font-size: 0.75rem; cursor: pointer;
    transition: all 0.15s; user-select: none;
}
.reaction-btn:hover {
    background: rgba(135,206,235,0.06);
    border-color: var(--border-light);
    color: var(--text-secondary);
    transform: translate(-1px, -1px);
}
.reaction-btn:active { transform: translate(1px, 1px); }
.reaction-btn.active {
    border-color: var(--accent-sky);
    color: var(--accent-sky);
    background: rgba(135,206,235,0.1);
}
.reaction-btn .count { font-weight: 700; font-size: 0.7rem; }

.post-actions { display: flex; gap: 0.5rem; margin-left: auto; }
.post-action-btn {
    background: none; border: none; color: var(--text-muted);
    font-size: 0.72rem; cursor: pointer; padding: 0.25rem 0.4rem;
    border-radius: 2px; transition: all 0.15s;
}
.post-action-btn:hover { color: var(--text-secondary); background: rgba(135,206,235,0.06); }

/* ---- Reply editor ---- */
.reply-editor {
    background: var(--bg-card); border: 3px solid var(--border);
    border-radius: 2px; padding: 1.25rem; margin-top: 1rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}
.reply-editor:focus-within { border-color: var(--accent-sky); }

.ql-toolbar.ql-snow { background: var(--bg-base); border-color: var(--border) !important; border-radius: 2px 2px 0 0; }
.ql-container.ql-snow { border-color: var(--border) !important; border-radius: 0 0 2px 2px; background: var(--bg-input); color: var(--text-primary); min-height: 150px; font-size: 0.88rem; }
.ql-editor.ql-blank::before { color: var(--text-muted); font-style: italic; }
.ql-snow .ql-stroke { stroke: var(--text-secondary); }
.ql-snow .ql-fill { fill: var(--text-secondary); }
.ql-snow .ql-picker-label { color: var(--text-secondary); }
.ql-snow .ql-picker-options { background: var(--bg-card); border-color: var(--border); }
.ql-snow .ql-picker-item { color: var(--text-primary); }
.ql-snow .ql-active .ql-stroke { stroke: var(--accent-sky); }
.ql-snow .ql-active .ql-fill { fill: var(--accent-sky); }
.ql-snow .ql-active { color: var(--accent-sky); }
.ql-snow button:hover .ql-stroke { stroke: var(--accent-sky); }
.ql-snow button:hover .ql-fill { fill: var(--accent-sky); }

/* Editor word/char counter */
.editor-counter {
    text-align: right;
    padding: 0.35rem 0.65rem;
    font-size: 0.68rem;
    font-family: 'Press Start 2P', monospace;
    color: var(--text-muted);
    background: var(--bg-base);
    border: 3px solid var(--border);
    border-top: none;
    border-radius: 0 0 2px 2px;
}

/* ---- Pagination ---- */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 0.3rem; margin-top: 1.5rem;
}
.pagination a, .pagination span {
    padding: 0.4rem 0.75rem; border-radius: 2px;
    font-size: 0.78rem; font-weight: 500; transition: all 0.15s;
}
.pagination a {
    color: var(--text-secondary); border: 2px solid var(--border);
    background: var(--bg-card); box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}
.pagination a:hover {
    border-color: var(--accent-sky); color: var(--accent-sky);
    transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}
.pagination .current {
    background: var(--accent-sky); color: #1b2a3a; font-weight: 700;
    border: 2px solid #5aadcf; box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}
.pagination .dots { color: var(--text-muted); }

/* ============================================================
   PROFILE
   ============================================================ */
.profile-header {
    background: var(--bg-card); border: 3px solid var(--border);
    border-radius: 2px; padding: 1.75rem; display: flex; gap: 1.5rem;
    align-items: flex-start; margin-bottom: 1.5rem;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    position: relative; overflow: hidden;
    animation: fadeInUp 0.3s ease;
}
.profile-header::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 70px;
    background: linear-gradient(135deg, rgba(135,206,235,0.08), rgba(245,200,66,0.05));
    pointer-events: none;
}
.profile-avatar {
    width: 110px; height: 110px; border-radius: 2px; object-fit: cover;
    border: 4px solid var(--border); flex-shrink: 0;
    position: relative; z-index: 1; image-rendering: pixelated;
    transition: border-color 0.2s;
}
.profile-avatar:hover { border-color: var(--accent-sky); }
.profile-info { flex: 1; position: relative; z-index: 1; }
.profile-username {
    font-family: 'Press Start 2P', monospace; font-size: 1.1rem;
    margin-bottom: 0.35rem; color: var(--accent-sky);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}
.profile-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.profile-bio { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 0.65rem; }
.profile-meta { display: flex; gap: 1.25rem; font-size: 0.78rem; color: var(--text-muted); flex-wrap: wrap; }
.profile-meta-item { display: flex; align-items: center; gap: 0.3rem; }

.achievements-grid { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-top: 0.85rem; }
.achievement-badge {
    background: var(--bg-base); border: 2px solid var(--border);
    border-radius: 2px; padding: 0.5rem 0.75rem;
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.78rem; transition: all 0.2s;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}
.achievement-badge:hover {
    border-color: var(--accent-sun); transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}
.achievement-icon { font-size: 1.2rem; }
.achievement-date { font-size: 0.62rem; color: var(--text-muted); }

/* ---- Settings ---- */
.settings-section {
    background: var(--bg-card); border: 3px solid var(--border);
    border-radius: 2px; padding: 1.35rem; margin-bottom: 1.35rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
    animation: fadeInUp 0.3s ease both;
}
.settings-section h2 {
    font-family: 'Inter', sans-serif; font-size: 1.05rem; font-weight: 600;
    margin-bottom: 0.85rem; padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--border); color: var(--accent-sky);
}

/* ---- Search ---- */
.search-bar { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.search-bar .form-input { flex: 1; }
.search-filters { display: flex; gap: 0.65rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search-filters .form-select { width: auto; min-width: 150px; }

/* ============================================================
   STORE — 8-bit shop aesthetic
   ============================================================ */

/* Store hero banner */
.store-hero {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    padding: 1.5rem 1.5rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.3s ease;
}
.store-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-sun), var(--accent-green), var(--accent-sky), var(--accent-sun));
}
.store-hero-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.store-hero-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
    width: 56px; height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245,200,66,0.1);
    border: 3px solid rgba(245,200,66,0.25);
    border-radius: 2px;
}
.store-hero-text h1 {
    color: var(--accent-sun);
    margin-bottom: 0.25rem;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}
.store-hero-text p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}
.store-hero-decorations {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding-top: 0.5rem;
    border-top: 2px dashed rgba(245,200,66,0.15);
}
.store-deco {
    color: var(--accent-sun);
    font-size: 0.7rem;
    opacity: 0.4;
}

/* Store category tab bar */
.store-tab-bar {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}
.store-tab {
    padding: 0.55rem 1rem;
    border-radius: 2px;
    background: transparent;
    border: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.store-tab:hover {
    color: var(--text-primary);
    background: rgba(135,206,235,0.06);
    border-color: rgba(135,206,235,0.1);
}
.store-tab.active {
    background: rgba(245,200,66,0.1);
    border-color: var(--accent-sun);
    color: var(--accent-sun);
    font-weight: 600;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

/* Product grid */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.1rem;
}

/* Product cards */
.store-card {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}
.store-card:hover {
    border-color: var(--accent-sun);
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.25);
}

.store-card-img-wrap {
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--border);
}
.store-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg-base);
    transition: transform 0.3s;
    image-rendering: pixelated;
}
.store-card:hover .store-card-img {
    transform: scale(1.05);
}

.store-card-body {
    padding: 0.85rem;
}
.store-card-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    line-height: 1.4;
}
.store-card-price {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.store-card-price del {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 400;
}
.store-price-current {
    color: var(--accent-sun);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

/* Sale badge */
.sale-badge {
    position: absolute;
    top: 8px; right: 8px;
    background: var(--accent-red);
    color: white;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.45rem;
    font-weight: 700;
    padding: 0.3rem 0.55rem;
    border-radius: 2px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
    border: 2px solid #c44040;
    animation: pixelBlink 2.5s infinite;
}

/* Product detail expand panel */
.store-detail {
    display: none;
    grid-column: 1 / -1;
    background: var(--bg-card);
    border: 3px solid var(--accent-sun);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    animation: fadeInScale 0.2s ease;
}
.store-detail.active { display: block; }
.store-detail-inner {
    padding: 1.25rem;
}
.store-detail h3 {
    font-size: 0.75rem;
    color: var(--accent-sun);
    margin-bottom: 0.65rem;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}
.store-detail-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}
.store-detail-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 2px solid var(--border);
}
.store-detail-price {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    color: var(--accent-sun);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}
.store-detail-price del {
    color: var(--text-muted);
    font-size: 0.65rem;
    margin-right: 0.5rem;
    font-family: 'Inter', sans-serif;
}

/* P2W prank section */
.store-prank-card {
    background: var(--bg-card);
    border: 3px solid var(--accent-red);
    border-radius: 2px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: 4px 4px 0 rgba(232,93,93,0.15);
    position: relative;
    overflow: hidden;
}
.store-prank-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-purple), var(--accent-red));
    animation: prankGlow 2s infinite;
}
@keyframes prankGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.store-prank-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    animation: pixelBlink 1.5s infinite;
}
.store-prank-card h2 {
    color: var(--accent-red);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}
.store-prank-subtitle {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}
.store-prank-fine-print {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px dashed rgba(232,93,93,0.15);
}

.prank-loader {
    width: 80%;
    max-width: 400px;
    height: 8px;
    background: var(--bg-base);
    border: 2px solid var(--border);
    border-radius: 0;
    overflow: hidden;
    margin: 0 auto;
}
.prank-loader-bar {
    width: 30%; height: 100%;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-sun), var(--accent-purple), var(--accent-red));
    background-size: 300% 100%;
    animation: prankSlide 2s infinite linear;
}
@keyframes prankSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* ============================================================
   VOTING — 8-bit themed vote cards
   ============================================================ */

/* Vote hero banner */
.vote-hero {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.3s ease;
}
.vote-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-sky), var(--accent-sun), var(--accent-green));
}
.vote-hero-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.vote-hero-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
    width: 56px; height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(127,204,74,0.1);
    border: 3px solid rgba(127,204,74,0.25);
    border-radius: 2px;
}
.vote-hero-text h1 {
    color: var(--accent-green);
    margin-bottom: 0.25rem;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}
.vote-hero-text p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}
.vote-hero-info {
    display: flex;
    gap: 0;
    border: 2px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.vote-hero-stat {
    flex: 1;
    text-align: center;
    padding: 0.65rem 0.5rem;
    border-right: 2px solid var(--border);
    background: rgba(135,206,235,0.03);
}
.vote-hero-stat:last-child { border-right: none; }
.vote-hero-stat-value {
    display: block;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.85rem;
    color: var(--accent-sun);
    margin-bottom: 0.2rem;
}
.vote-hero-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Vote grid */
.vote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Vote cards */
.vote-card {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 2px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    transition: all 0.2s;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}
.vote-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-sky), var(--accent-sun), var(--accent-green));
    opacity: 0;
    transition: opacity 0.2s;
}
.vote-card:hover {
    border-color: var(--accent-green);
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.25);
}
.vote-card:hover::before { opacity: 1; }

.vote-card-rank {
    position: absolute;
    top: 10px; left: 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: var(--text-muted);
    background: rgba(135,206,235,0.06);
    border: 2px solid var(--border);
    border-radius: 2px;
    padding: 0.2rem 0.4rem;
}

.vote-card-number {
    font-family: 'Press Start 2P', monospace;
    font-size: 2.2rem;
    color: var(--accent-sun);
    margin-bottom: 0.75rem;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}
.vote-card-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}
.vote-card-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 1.1rem;
    line-height: 1.5;
}

/* Vote reminder */
.vote-reminder {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-left: 4px solid var(--accent-sun);
    border-radius: 2px;
    padding: 0.85rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    animation: fadeInUp 0.5s ease;
}
.vote-reminder-icon { font-size: 1.3rem; flex-shrink: 0; }
.vote-reminder strong { color: var(--accent-sun); }

/* ---- Mod table ---- */
.mod-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.mod-table th, .mod-table td { padding: 0.65rem 0.75rem; text-align: left; border-bottom: 2px solid var(--border); font-size: 0.82rem; }
.mod-table th { font-weight: 600; color: var(--accent-sky); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(135,206,235,0.04); }
.mod-table tr:hover td { background: var(--bg-card-hover); }

/* ---- Structured forms ---- */
.structured-form {
    background: rgba(135,206,235,0.03); border: 3px solid var(--border);
    border-radius: 2px; padding: 1.25rem; margin-bottom: 1rem;
}
.structured-field { margin-bottom: 0.75rem; padding-bottom: 0.65rem; border-bottom: 2px solid rgba(255,255,255,0.04); }
.structured-field:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.structured-label { font-weight: 600; font-size: 0.75rem; color: var(--accent-sun); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.04em; }
.structured-value { font-size: 0.88rem; color: var(--text-primary); }

/* ---- Server status bar ---- */
.server-status {
    background: var(--bg-card); border: 3px solid var(--border);
    border-radius: 2px; padding: 0.85rem 1.25rem;
    display: flex; align-items: center; justify-content: center;
    gap: 0.85rem; margin-bottom: 1.5rem; text-align: center;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
    animation: fadeInUp 0.3s ease;
}
.status-dot {
    width: 12px; height: 12px; border-radius: 0;
    background: var(--accent-green); animation: statusPulse 2s infinite;
}
.status-dot.offline { background: var(--accent-red); animation: none; }
.status-text { font-size: 0.85rem; color: var(--text-secondary); }
.status-count { font-weight: 700; color: var(--accent-green); }

/* ---- Legal ---- */
.legal-content {
    background: var(--bg-card); border: 3px solid var(--border);
    border-radius: 2px; padding: 2rem; line-height: 1.8; font-size: 0.88rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}
.legal-content h2 { font-family: 'Inter', sans-serif; font-size: 1.05rem; margin-top: 1.5rem; color: var(--accent-sky); }

/* ============================================================
   FOOTER — Pixel border top
   ============================================================ */
.footer {
    background: var(--bg-base); border-top: 4px solid var(--accent-dirt);
    padding: 1.75rem 1rem; margin-top: auto;
}
.footer-container { max-width: 1280px; margin: 0 auto; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 1.25rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 0.78rem; transition: color 0.15s; }
.footer-links a:hover { color: var(--accent-sky); }
.footer-copy { font-size: 0.68rem; color: var(--text-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    .hero-split { grid-template-columns: 1fr; }
    .hero-sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; position: absolute; top: 58px; left: 0; right: 0;
        background: var(--navbar-bg); backdrop-filter: blur(8px);
        flex-direction: column; padding: 0.6rem; border-bottom: 3px solid var(--border);
        gap: 0.2rem;
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: flex; }
    .nav-ip { display: none; }
    h1 { font-size: 1rem; }
    h2 { font-size: 0.82rem; }
    .post-card { flex-direction: column; }
    .post-sidebar {
        width: 100%; border-right: none; border-bottom: 3px solid var(--border);
        display: flex; align-items: center; gap: 0.65rem; padding: 0.65rem;
    }
    .post-author-avatar { width: 40px; height: 40px; margin-bottom: 0; }
    .profile-header { flex-direction: column; align-items: center; text-align: center; }
    .profile-meta { justify-content: center; }
    .thread-stats { display: none; }
    .trending-card { flex: 0 0 200px; }
}

@media (max-width: 640px) {
    .category-grid { grid-template-columns: 1fr; }
    .category-group { grid-template-columns: 1fr; }
    .store-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .vote-grid { grid-template-columns: 1fr; }
    .hero-sidebar { grid-template-columns: 1fr; }
}

@media (min-width: 1024px) {
    .main-content { padding: 2rem 1.5rem; }
}

/* ============================================================
   Theme Picker — Settings Page
   ============================================================ */
.theme-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

.theme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem;
    border: 3px solid var(--border);
    border-radius: 4px;
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-card:hover {
    border-color: var(--accent-blue);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.theme-card.active {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px var(--accent-green), 0 4px 12px var(--shadow);
}

.theme-preview {
    width: 100%;
    height: 60px;
    border: 2px solid;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.theme-preview-bar {
    width: 100%;
    height: 12px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
}

.theme-preview-dots {
    display: flex;
    gap: 5px;
    padding: 8px 10px;
    justify-content: center;
}

.theme-preview-dots span {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: block;
}

.theme-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.theme-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

/* Rush preview — dots cycle colors */
.theme-preview-rush .rush-dot-1 { animation: rushPreview1 2s ease infinite; }
.theme-preview-rush .rush-dot-2 { animation: rushPreview2 2s ease infinite 0.3s; }
.theme-preview-rush .rush-dot-3 { animation: rushPreview3 2s ease infinite 0.6s; }

@keyframes rushPreview1 {
    0%, 100% { background: #ff6b6b; }
    33% { background: #00ffff; }
    66% { background: #a8ff78; }
}
@keyframes rushPreview2 {
    0%, 100% { background: #ffd93d; }
    33% { background: #ff00ff; }
    66% { background: #78ffd6; }
}
@keyframes rushPreview3 {
    0%, 100% { background: #6bcb77; }
    33% { background: #ffff00; }
    66% { background: #78d5ff; }
}

/* Wild preview — jiggle */
.theme-preview-wild {
    animation: wildPreviewShake 0.4s ease-in-out infinite alternate;
}
@keyframes wildPreviewShake {
    0% { transform: rotate(-1deg); }
    100% { transform: rotate(1deg); }
}

@media (max-width: 480px) {
    .theme-picker {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.5rem;
    }
}
