@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --brand-deep: #794A3A;
    --brand-red: #DD5341;
    --brand-salmon: #F57F5B;
    --brand-yellow: #FACA78;
    --brand-teal: #68C7C1;
    --muted: #e0e0e0;
    --bg-light: var(--brand-yellow);
    --fg-light: var(--brand-deep);

    /* ── Cyberpunk Dark Palette ── */
    --bg-dark:       #050810;   /* void black  */
    --bg-panel:      #0A0F1E;   /* deep navy panel */
    --bg-card:       #0D1528;   /* card surface */
    --fg-dark:       #00F5FF;   /* electric cyan */
    --cy-magenta:    #FF00A0;   /* hot magenta */
    --cy-yellow:     #F5E642;   /* acid yellow */
    --cy-green:      #39FF14;   /* neon green */
    --cy-purple:     #9D00FF;   /* deep purple */
    --cy-orange:     #FF6B00;   /* neon orange */
    --cy-border:     rgba(0,245,255,0.35);
    --cy-glow:       rgba(0,245,255,0.18);
    --cy-glow-mg:    rgba(255,0,160,0.22);

    --muted-light: rgba(121,74,58,0.68);
    --muted-dark:  rgba(0,245,255,0.55);
    --color-danger:  #FF073A;
    --color-success: #39FF14;

    /* Golden Ratio Font Scale */
    --font-xs: 14px;
    --font-sm: 22px;
    --font-md: 36px;
    --font-lg: 58px;
    --font-xl: 94px;
}

/* ── Cyberpunk keyframes ── */
@keyframes cy-pulse-border {
    0%, 100% { box-shadow: 0 0 6px var(--cy-glow), 0 0 18px var(--cy-glow); }
    50%       { box-shadow: 0 0 12px var(--fg-dark), 0 0 30px var(--cy-glow); }
}
@keyframes cy-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
    20%, 24%, 55% { opacity: 0.85; }
}
@keyframes cy-scan {
    0%   { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

/* ── Glitch: page-load burst on brand (text-shadow chromatic split) ── */
@keyframes glitch-burst {
    0%   { text-shadow: 0 0 10px #00F5FF, 0 0 30px rgba(0,245,255,0.3); transform: none; }
    8%   { text-shadow: 4px 0 #FF00A0, -4px 0 #00F5FF; transform: skewX(-4deg); }
    16%  { text-shadow: -4px 0 #FF00A0, 4px 0 #39FF14; transform: skewX(4deg) translateX(3px); }
    24%  { text-shadow: 3px 0 #00F5FF, -3px 0 #FF00A0; transform: skewX(-2deg); }
    30%  { text-shadow: 0 0 10px #00F5FF, 0 0 30px rgba(0,245,255,0.3); transform: none; }
    38%  { text-shadow: -5px 0 #FF00A0, 5px 0 #00F5FF; transform: skewX(5deg) translateX(-2px); }
    44%  { text-shadow: 5px 0 #39FF14, -5px 0 #FF00A0; transform: skewX(-3deg); }
    50%  { text-shadow: 0 0 10px #00F5FF, 0 0 30px rgba(0,245,255,0.3); transform: none; }
    58%  { text-shadow: 3px 0 #FF00A0, -3px 0 #00F5FF; transform: skewX(2deg); }
    64%  { text-shadow: 0 0 10px #00F5FF, 0 0 30px rgba(0,245,255,0.3); transform: none; }
    100% { text-shadow: 0 0 10px #00F5FF, 0 0 30px rgba(0,245,255,0.3); transform: none; }
}

/* ── Glitch: icon flicker on load (chromatic split + skew, matches glitch-burst) ── */
@keyframes glitch-icon {
    0%   { filter: drop-shadow(0 0 6px #00F5FF); transform: none; }
    8%   { filter: drop-shadow(4px 0 #FF00A0) drop-shadow(-4px 0 #00F5FF); transform: skewX(-4deg); }
    16%  { filter: drop-shadow(-4px 0 #FF00A0) drop-shadow(4px 0 #39FF14); transform: skewX(4deg) translateX(3px); }
    24%  { filter: drop-shadow(3px 0 #00F5FF) drop-shadow(-3px 0 #FF00A0); transform: skewX(-2deg); }
    30%  { filter: drop-shadow(0 0 6px #00F5FF); transform: none; }
    38%  { filter: drop-shadow(-5px 0 #FF00A0) drop-shadow(5px 0 #00F5FF); transform: skewX(5deg) translateX(-2px); }
    44%  { filter: drop-shadow(5px 0 #39FF14) drop-shadow(-5px 0 #FF00A0); transform: skewX(-3deg); }
    50%  { filter: drop-shadow(0 0 6px #00F5FF); transform: none; }
    58%  { filter: drop-shadow(3px 0 #FF00A0) drop-shadow(-3px 0 #00F5FF); transform: skewX(2deg); }
    64%  { filter: drop-shadow(0 0 6px #00F5FF); transform: none; }
    100% { filter: none; transform: none; }
}

/* ── Glitch: Sharvil — continuous heavy glitch ── */
@keyframes sharvil-text {
    0%, 80%, 100% {
        text-shadow: 0 0 10px #FF0033, 0 0 24px rgba(255,0,51,0.4);
        transform: none;
    }
    81% { text-shadow: 5px 0 #FF6600, -5px 0 #FF0033; transform: skewX(-5deg); }
    83% { text-shadow: -5px 0 #FF6600,  5px 0 #FF0033; transform: skewX(5deg) translateX(4px); }
    85% { text-shadow:  4px 0 #FF0033, -4px 0 #FF6600; transform: skewX(-3deg); }
    87% { text-shadow: 0 0 10px #FF0033, 0 0 24px rgba(255,0,51,0.4); transform: none; }
    91% { text-shadow: -6px 0 #FF6600,  6px 0 #FF0033; transform: skewX(6deg) translateX(-3px); }
    93% { text-shadow:  6px 0 #FF0033, -6px 0 #FF6600; transform: skewX(-4deg); }
    95% { text-shadow: 0 0 10px #FF0033, 0 0 24px rgba(255,0,51,0.4); transform: none; }
}

@keyframes sharvil-intense {
    0%, 60%, 100% {
        text-shadow: 0 0 14px #FF0033, 0 0 40px rgba(255,0,51,0.5);
        transform: none;
        color: #FF0033;
    }
    5%  { text-shadow:  8px 0 #FF6600, -8px 0 #FF0033; transform: skewX(-8deg) translateX(4px);  color: #FF3300; }
    10% { text-shadow: -8px 0 #FF6600,  8px 0 #FF0033; transform: skewX(8deg) translateX(-4px);  }
    15% { text-shadow:  5px 0 #FF0033, -5px 0 #FF6600; transform: skewX(-3deg);  color: #FF0033; }
    20% { text-shadow: 0 0 14px #FF0033; transform: none; }
    62% { text-shadow: -7px 0 #FF6600,  7px 0 #FF0033; transform: skewX(7deg); color: #FF4400; }
    65% { text-shadow:  7px 0 #FF0033, -7px 0 #FF6600; transform: skewX(-5deg); }
    68% { text-shadow: 0 0 14px #FF0033; transform: none; color: #FF0033; }
}

/* ── Joyce float ── */
@keyframes joyce-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33%       { transform: translateY(-4px) rotate(2deg); }
    66%       { transform: translateY(-2px) rotate(-1deg); }
}

/* ── Applied-by-JS glitch classes (dark theme only) ── */
.cy-glitch-burst {
    animation: glitch-burst 2s ease-out forwards !important;
}

.cy-glitch-icon {
    animation: glitch-icon 2s ease-out forwards !important;
}

/* ── Sharvil profile: neon red override (dark theme only) ── */
body.sharvil-profile .site-brand {
    color: #FF0033 !important;
    text-shadow: 0 0 12px #FF0033, 0 0 40px rgba(255,0,51,0.5) !important;
    animation: sharvil-intense 2s ease-out forwards !important;
}

body.sharvil-profile .site-header {
    border-bottom-color: rgba(255,0,51,0.4) !important;
    box-shadow: 0 2px 20px rgba(255,0,51,0.18) !important;
}

body.sharvil-profile .nav-icon,
body.sharvil-profile .mobile-nav-icon {
    color: #FF0033 !important;
}

body.sharvil-profile .nav-icon:hover {
    background: rgba(255,0,51,0.1) !important;
    color: #FF6600 !important;
    box-shadow: 0 0 12px rgba(255,0,51,0.3) !important;
}

body.sharvil-profile .global-search-form {
    border-color: rgba(255,0,51,0.35) !important;
}
body.sharvil-profile .global-search-form:focus-within {
    box-shadow: 0 0 16px rgba(255,0,51,0.3) !important;
    border-color: #FF0033 !important;
}
body.sharvil-profile .global-search-form button {
    background: #FF0033 !important;
}
body.sharvil-profile .global-search-bar {
    border-bottom-color: rgba(255,0,51,0.25) !important;
}

body.sharvil-profile .profile-photo {
    border-color: #FF0033 !important;
    box-shadow: 0 0 0 3px #050810, 0 0 24px rgba(255,0,51,0.6), 0 0 50px rgba(255,0,51,0.25) !important;
    animation: sharvil-text 2s ease-out forwards !important;
}

body.sharvil-profile h2 {
    color: #FF0033 !important;
    animation: sharvil-intense 2s ease-out forwards !important;
}

body.sharvil-profile h3 {
    color: #FF0033 !important;
    text-shadow: 0 0 8px rgba(255,0,51,0.4) !important;
    animation: sharvil-text 2s ease-out forwards !important;
}

body.sharvil-profile a {
    color: #FF0033 !important;
}
body.sharvil-profile a:hover {
    color: #FF6600 !important;
    text-shadow: 0 0 6px rgba(255,102,0,0.4) !important;
}

body.sharvil-profile .post {
    border-left-color: #FF0033 !important;
    box-shadow: 0 2px 16px rgba(255,0,51,0.1), inset 0 0 20px rgba(255,0,51,0.02) !important;
}
body.sharvil-profile .post:hover {
    box-shadow: 0 0 22px rgba(255,0,51,0.3), 0 8px 30px rgba(255,0,51,0.12) !important;
    border-left-color: #FF6600 !important;
    border-color: rgba(255,0,51,0.4) !important;
}

body.sharvil-profile .post-author,
body.sharvil-profile .post-author a {
    color: #FF0033 !important;
    text-shadow: 0 0 8px rgba(255,0,51,0.4) !important;
}

body.sharvil-profile .post-content {
    color: rgba(255,80,80,0.92) !important;
    animation: sharvil-text 2s ease-out forwards !important;
}

body.sharvil-profile .post-meta {
    border-top-color: rgba(255,0,51,0.2) !important;
    color: rgba(255,80,80,0.7) !important;
}

body.sharvil-profile .post-score {
    color: #FF0033 !important;
    border-color: rgba(255,0,51,0.3) !important;
    background: rgba(255,0,51,0.08) !important;
}

body.sharvil-profile hr {
    border-top-color: rgba(255,0,51,0.2) !important;
    box-shadow: 0 0 8px rgba(255,0,51,0.1) !important;
}

body.sharvil-profile .post-timestamp {
    color: rgba(255,80,80,0.5) !important;
}

body.sharvil-profile .notif-dropdown-header {
    color: #FF0033 !important;
}
body.sharvil-profile .notif-item strong {
    color: #FF0033 !important;
}

/* ===== Global Scrollbar Styling ===== */

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #00F5FF #050810;
}

/* Chrome, Edge, Safari */
*::-webkit-scrollbar {
    width: 6px;
}

*::-webkit-scrollbar-track {
    background: #050810;
}

*::-webkit-scrollbar-thumb {
    background: #00F5FF;
    border-radius: 10px;
    border: 2px solid #050810;
    box-shadow: 0 0 6px #00F5FF;
}

*::-webkit-scrollbar-thumb:hover {
    background: #FF00A0;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg-dark);
    background-image:
        linear-gradient(rgba(0,245,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,245,255,0.025) 1px, transparent 1px),
        linear-gradient(rgba(0,0,0,0.4) 2px, transparent 0);
    background-size: 40px 40px, 40px 40px, 100% 4px;
    color: var(--fg-dark);
    font-size: var(--font-md);
    --muted-current: var(--muted-dark);
    min-height: 100vh;
    padding: 0;
}

.container {
    max-width: 100%;
    margin: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 40px 60px;
    color: var(--fg-dark);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: none;
    padding-bottom: 0;
    background: linear-gradient(135deg, #050810 0%, #0A0F1E 100%);
    margin: -40px -60px 40px -60px;
    padding: 30px 60px;
    border-bottom: 2px solid var(--fg-dark);
    box-shadow: 0 2px 20px var(--cy-glow);
}

header h1 {
    font-size: var(--font-lg);
    color: var(--cy-magenta);
    text-shadow: 0 0 10px var(--cy-magenta), 0 0 30px var(--cy-glow-mg);
}

nav a {
    color: var(--fg-dark);
    text-decoration: none;
    font-weight: 600;
    margin-left: 20px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--cy-magenta);
    text-shadow: 0 0 8px var(--cy-magenta);
}

h1, h2, h3 {
    color: var(--fg-dark);
    margin: 20px 0 15px 0;
    font-weight: 600;
    text-shadow: 0 0 8px var(--cy-glow);
    letter-spacing: 1px;
}

h1 {
    font-size: var(--font-lg);
}

h2 {
    font-size: var(--font-lg);
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--cy-border);
    border-radius: 4px;
    font-size: var(--font-sm);
    transition: all 0.3s ease;
    background: var(--bg-card);
    color: var(--fg-dark);
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--fg-dark);
    box-shadow: 0 0 12px var(--cy-glow);
}

.search-bar button {
    padding: 12px 24px;
    background: var(--cy-magenta);
    color: #050810;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.search-bar button:hover {
    background: var(--fg-dark);
    transform: translateY(-2px);
    box-shadow: 0 0 14px var(--cy-glow);
}

.search-bar button:active {
    transform: translateY(0);
}

/* Forms */
form {
    margin: 20px 0;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--cy-magenta);
    font-size: var(--font-md);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: var(--font-xs);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--cy-border);
    border-radius: 4px;
    font-size: var(--font-sm);
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg-card);
    color: var(--fg-dark);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--fg-dark);
    box-shadow: 0 0 14px var(--cy-glow), inset 0 0 8px rgba(0,245,255,0.08);
}

textarea {
    resize: vertical;
}

/* Buttons */
button,
input[type="submit"],
.btn {
    padding: 12px 24px;
    background: transparent;
    color: var(--fg-dark);
    border: 1px solid var(--fg-dark);
    border-radius: 3px;
    font-weight: 600;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
    position: relative;
}

.vertical-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.vertical-toggle input[type="radio"] {
    transform: scale(1.2);
}

button:hover,
input[type="submit"]:hover,
.btn:hover {
    background: var(--fg-dark);
    color: #050810;
    transform: translateY(-2px);
    box-shadow: 0 0 16px var(--cy-glow), 0 6px 20px var(--cy-glow);
}

button:active,
input[type="submit"]:active,
.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: transparent;
    color: var(--cy-green);
    border-color: var(--cy-green);
}

.btn-success:hover {
    background: var(--cy-green);
    color: #050810;
    box-shadow: 0 0 14px rgba(57,255,20,0.4);
}

.btn-danger {
    background: transparent;
    color: #FF073A;
    border-color: #FF073A;
}

.btn-danger:hover {
    background: #FF073A;
    color: #050810;
    box-shadow: 0 0 14px rgba(255,7,58,0.5);
}

/* Posts */
.post {
    border: 1px solid var(--cy-border);
    border-left: 2px solid var(--fg-dark);
    border-radius: 3px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: var(--bg-card);
    background-image: linear-gradient(135deg, var(--bg-card) 0%, #0A0F1E 100%);
    box-shadow: 0 2px 16px rgba(0,245,255,0.06), inset 0 0 20px rgba(0,245,255,0.02);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
    position: relative;
    overflow: hidden;
}

.post:hover {
    box-shadow: 0 0 20px var(--cy-glow), 0 8px 30px rgba(0,245,255,0.12);
    transform: translateY(-3px);
    border-left-color: var(--cy-magenta);
    border-color: rgba(0,245,255,0.5);
}

.post-author {
    font-weight: 600;
    color: var(--cy-magenta);
    margin-bottom: 10px;
    font-size: var(--font-md);
    text-shadow: 0 0 8px var(--cy-glow-mg);
    letter-spacing: 0.5px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.post-content {
    margin: 15px 0;
    line-height: 1.6;
    color: rgba(0,245,255,0.9);
    overflow-wrap: break-word;
    word-break: break-word;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--cy-border);
    font-size: var(--font-sm);
    color: var(--fg-dark);
}

.post-timestamp {
    color: var(--muted-current);
}

.post-score {
    font-weight: 600;
    background: rgba(0,245,255,0.08);
    padding: 4px 12px;
    border-radius: 2px;
    color: var(--fg-dark);
    border: 1px solid var(--cy-border);
    text-shadow: 0 0 6px var(--cy-glow);
}

.post-actions {
    display: flex;
    gap: 15px;
    margin-top: 12px;
    margin-bottom: 0;
}

.post-actions a,
.post-actions button {
    padding: 8px 16px;
    font-size: var(--font-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    color: var(--fg-dark);
    border: 1px solid var(--cy-border);
    border-radius: 2px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.post-actions a:hover,
.post-actions button:hover {
    background: rgba(0,245,255,0.1);
    color: var(--fg-dark);
    border-color: var(--fg-dark);
    box-shadow: 0 0 10px var(--cy-glow);
}

.post-actions .btn-vote-up {
    background: var(--color-success);
}

.post-actions .btn-vote-down {
    background: var(--color-danger);
}

.btn-vote {
    padding: 8px 16px;
    font-size: var(--font-lg);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid;
    border-radius: 2px;
    transition: all 0.3s ease;
    margin: 10px;
    background: transparent;
}

.btn-vote-up {
    background: transparent;
    color: var(--cy-green);
    border-color: var(--cy-green);
    transition: all 0.3s ease;
}

.btn-vote-up:hover {
    transform: scale(1.15);
    background: var(--cy-green);
    color: #050810;
    box-shadow: 0 0 14px rgba(57,255,20,0.5);
}

.btn-vote-down {
    background: transparent;
    color: #FF073A;
    border-color: #FF073A;
    transition: all 0.3s ease;
}

.btn-vote-down:hover {
    transform: scale(1.15);
    background: #FF073A;
    color: #050810;
    box-shadow: 0 0 14px rgba(255,7,58,0.5);
}

/* Profile */
.profile-card {
    background: linear-gradient(135deg, #050810 0%, #0D1528 100%);
    color: var(--fg-dark);
    padding: 30px;
    border-radius: 3px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid var(--cy-border);
    border-top: 2px solid var(--fg-dark);
    box-shadow: 0 0 30px var(--cy-glow), inset 0 0 30px rgba(0,245,255,0.03);
}

.profile-card h1 {
    color: var(--cy-magenta);
    margin-top: 0;
    font-size: var(--font-xl);
    text-shadow: 0 0 16px var(--cy-glow-mg);
}

.profile-card p {
    margin: 10px 0;
    opacity: 0.9;
}

.profile-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.profile-actions button,
.profile-actions form {
    margin: 0;
}

.profile-actions form {
    display: inline;
}

/* Links */
a {
    color: var(--fg-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--cy-magenta);
    text-shadow: 0 0 6px var(--cy-glow-mg);
}

.btn-signup {
    background: transparent;
    color: var(--cy-green);
    border: 1px solid var(--cy-green);
    padding: 16px 32px;
    border-radius: 3px;
    font-weight: 600;
    font-size: var(--font-md);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    margin-top: 20px;
}

.btn-signup:hover {
    background: var(--cy-green);
    color: #050810;
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(57,255,20,0.4);
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--cy-border);
    border-top: 2px solid var(--fg-dark);
    border-radius: 3px;
    padding: 40px;
    width: 100%;
    max-width: 50%;
    box-shadow: 0 0 40px var(--cy-glow), 0 20px 60px rgba(0,0,0,0.8);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.login-card h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
}

.login-card form {
    margin-bottom: 30px;
}

.login-card p {
    text-align: center;
    color: var(--fg-dark);
    margin-bottom: 15px;
}

.login-card .btn {
    width: 100%;
    text-align: center;
}

.login-card .btn-signup {
    width: 100%;
    margin-top: 15px;
}

/* File Input */
.file-input {
    display: none;
}

.file-input-label {
    background: transparent;
    color: var(--cy-yellow);
    border: 1px solid var(--cy-yellow);
    padding: 12px 24px;
    border-radius: 3px;
    font-weight: 600;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    margin-bottom: 20px;
}

.file-input-label:hover {
    background: var(--cy-yellow);
    color: #050810;
    transform: translateY(-2px);
    box-shadow: 0 0 16px rgba(245,230,66,0.4);
}

.file-input-label:active {
    transform: translateY(0);
}

/* User Cards */
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.user-card {
    background: var(--bg-card);
    border: 1px solid var(--cy-border);
    border-top: 2px solid var(--fg-dark);
    border-radius: 3px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,245,255,0.08);
    transition: all 0.3s ease;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.user-card:hover {
    box-shadow: 0 0 20px var(--cy-glow), 0 8px 28px rgba(0,245,255,0.1);
    transform: translateY(-4px);
    border-top-color: var(--cy-magenta);
}

.user-card-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 2px solid var(--fg-dark);
    box-shadow: 0 0 12px var(--cy-glow);
}

.user-card h3 {
    color: var(--cy-magenta);
    margin-bottom: 15px;
    text-shadow: 0 0 8px var(--cy-glow-mg);
}

.btn-card {
    width: 100%;
    margin-top: 10px;
}

.friend-popup {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    max-height: 80vh;
    background: var(--bg-card);
    border: 1px solid var(--cy-border);
    border-top: 2px solid var(--fg-dark);
    border-radius: 3px;
    padding: 25px;
    z-index: 2000;
    overflow-y: auto;
    transition: top 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 40px var(--cy-glow), 0 30px 60px rgba(0,0,0,0.8);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.friend-popup.active {
    top: 12%;
}

.friend-list-scroll {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.friend-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease;
}

.friend-row:hover {
    background: rgba(0,245,255,0.06);
    transform: translateX(6px);
    border-left: 2px solid var(--fg-dark);
    padding-left: 8px;
}

.friend-row-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-row-name {
    font-weight: 500;
}

/* Profile Photo */
.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--fg-dark);
    box-shadow: 0 0 0 3px #050810, 0 0 20px var(--cy-glow), 0 0 40px rgba(0,245,255,0.1);
}

/* Radio Button Styling */
input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-success);
}

/* Neo-Brutalism Theme */
body.neo-brutalism {
    background: #FAFAF5;
    color: #0A0A0A;
    font-family: 'JetBrains Mono', monospace;
}

body.neo-brutalism * {
    scrollbar-color: #0A0A0A #FAFAF5;
}

body.neo-brutalism *::-webkit-scrollbar-track { background: #FAFAF5; }
body.neo-brutalism *::-webkit-scrollbar-thumb { background: #0A0A0A; border-radius: 0; }

body.neo-brutalism .container {
    background: #FAFAF5;
    color: #0A0A0A;
}

body.neo-brutalism h1,
body.neo-brutalism h2,
body.neo-brutalism h3 {
    color: #0A0A0A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.neo-brutalism .site-header {
    background: #FFED47;
    border-bottom: 4px solid #0A0A0A;
    color: #0A0A0A;
}

body.neo-brutalism .site-brand {
    color: #0A0A0A;
    text-shadow: none;
    animation: none;
}

body.neo-brutalism .nav-icon {
    color: #0A0A0A;
    border-radius: 8px;
}

body.neo-brutalism .nav-icon:hover {
    background: #FF4757;
    color: #FAFAF5;
}

body.neo-brutalism .nav-icon::after {
    background: #0A0A0A;
    color: #FFED47;
    border: 2px solid #0A0A0A;
    border-radius: 0;
}

body.neo-brutalism header {
    background: #FFED47;
    border-bottom: 4px solid #0A0A0A;
}

body.neo-brutalism header h1 {
    color: #0A0A0A;
}

body.neo-brutalism nav a {
    color: #0A0A0A;
    font-weight: 700;
}

body.neo-brutalism nav a:hover {
    color: #FF4757;
}

body.neo-brutalism a {
    color: #0A0A0A;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

body.neo-brutalism a:hover {
    color: #FF4757;
}

body.neo-brutalism .global-search-bar {
    background: #F0EDE0;
    border-bottom: 3px solid #0A0A0A;
}

body.neo-brutalism .global-search-form {
    background: #FAFAF5;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 4px 4px 0 #0A0A0A;
}

body.neo-brutalism .global-search-form:focus-within {
    box-shadow: 6px 6px 0 #0A0A0A;
}

body.neo-brutalism .global-search-form input[type="text"] {
    color: #0A0A0A;
    background: transparent;
}

body.neo-brutalism .global-search-form button {
    background: #FFED47;
    color: #0A0A0A;
    font-weight: 700;
    border-radius: 0;
    border-left: 3px solid #0A0A0A;
}

body.neo-brutalism .global-search-form button:hover {
    background: #FF4757;
    color: #FAFAF5;
}

body.neo-brutalism .search-icon {
    color: #0A0A0A;
}

body.neo-brutalism .search-bar input {
    border: 3px solid #0A0A0A;
    background: #FAFAF5;
    color: #0A0A0A;
    border-radius: 0;
}

body.neo-brutalism .search-bar input:focus {
    border-color: #0A0A0A;
    box-shadow: 4px 4px 0 #0A0A0A;
}

body.neo-brutalism .search-bar button {
    background: #FFED47;
    color: #0A0A0A;
    border-radius: 0;
    border: 3px solid #0A0A0A;
}

body.neo-brutalism .search-bar button:hover {
    background: #FF4757;
    color: #FAFAF5;
}

body.neo-brutalism label {
    color: #0A0A0A;
    font-weight: 700;
    text-transform: uppercase;
    font-size: var(--font-xs);
    letter-spacing: 1px;
}

body.neo-brutalism input[type="text"],
body.neo-brutalism input[type="email"],
body.neo-brutalism input[type="password"],
body.neo-brutalism textarea,
body.neo-brutalism select {
    border: 3px solid #0A0A0A;
    background: #FAFAF5;
    color: #0A0A0A;
    border-radius: 0;
}

body.neo-brutalism input[type="text"]:focus,
body.neo-brutalism input[type="email"]:focus,
body.neo-brutalism input[type="password"]:focus,
body.neo-brutalism textarea:focus,
body.neo-brutalism select:focus {
    outline: none;
    border-color: #0A0A0A;
    box-shadow: 4px 4px 0 #0A0A0A;
}

body.neo-brutalism button,
body.neo-brutalism input[type="submit"],
body.neo-brutalism .btn {
    background: #FFED47;
    color: #0A0A0A;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 4px 4px 0 #0A0A0A;
    transition: box-shadow 0.1s ease, transform 0.1s ease;
}

body.neo-brutalism button:hover,
body.neo-brutalism input[type="submit"]:hover,
body.neo-brutalism .btn:hover {
    background: #FFED47;
    box-shadow: 2px 2px 0 #0A0A0A;
    transform: translate(2px, 2px);
}

body.neo-brutalism button:active,
body.neo-brutalism input[type="submit"]:active,
body.neo-brutalism .btn:active {
    box-shadow: 0px 0px 0 #0A0A0A;
    transform: translate(4px, 4px);
}

body.neo-brutalism .btn-danger {
    background: #FF4757;
    color: #FAFAF5;
    border-color: #0A0A0A;
    box-shadow: 4px 4px 0 #0A0A0A;
}

body.neo-brutalism .btn-danger:hover {
    background: #e03040;
    box-shadow: 2px 2px 0 #0A0A0A;
    transform: translate(2px, 2px);
}

body.neo-brutalism .btn-success {
    background: #2ED573;
    color: #0A0A0A;
    border-color: #0A0A0A;
    box-shadow: 4px 4px 0 #0A0A0A;
}

body.neo-brutalism .btn-success:hover {
    background: #20c060;
    box-shadow: 2px 2px 0 #0A0A0A;
    transform: translate(2px, 2px);
}

body.neo-brutalism .main-content {
    background: #FAFAF5;
}

body.neo-brutalism hr {
    border-top: 3px solid #0A0A0A;
}

body.neo-brutalism .post {
    background: #FAFAF5;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 6px 6px 0 #0A0A0A;
    transition: box-shadow 0.1s ease, transform 0.1s ease;
}

body.neo-brutalism .post:hover {
    box-shadow: 4px 4px 0 #0A0A0A;
    transform: translate(2px, 2px);
}

body.neo-brutalism .post-author {
    color: #FF4757;
    font-weight: 700;
    text-transform: uppercase;
    font-size: var(--font-sm);
}

body.neo-brutalism .post-author a {
    color: #FF4757;
    text-decoration: none;
}

body.neo-brutalism .post-author a:hover {
    color: #0A0A0A;
    text-decoration: underline;
}

body.neo-brutalism .post-content {
    color: #0A0A0A;
}

body.neo-brutalism .post-meta {
    border-top: 3px solid #0A0A0A;
    color: #0A0A0A;
}

body.neo-brutalism .post-score {
    background: #FFED47;
    color: #0A0A0A;
    border: 2px solid #0A0A0A;
    border-radius: 0;
    font-weight: 700;
    box-shadow: 2px 2px 0 #0A0A0A;
}

body.neo-brutalism .post-actions a,
body.neo-brutalism .post-actions button {
    background: #FAFAF5;
    color: #0A0A0A;
    border: 2px solid #0A0A0A;
}

body.neo-brutalism .btn-vote-up {
    background: #2ED573;
    color: #0A0A0A;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 3px 3px 0 #0A0A0A;
}

body.neo-brutalism .btn-vote-up:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #0A0A0A;
    background: #20c060;
}

body.neo-brutalism .btn-vote-down {
    background: #FF4757;
    color: #FAFAF5;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 3px 3px 0 #0A0A0A;
}

body.neo-brutalism .btn-vote-down:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #0A0A0A;
    background: #e03040;
}

body.neo-brutalism .profile-card {
    background: #FFED47;
    color: #0A0A0A;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 6px 6px 0 #0A0A0A;
}

body.neo-brutalism .profile-card h1 {
    color: #0A0A0A;
}

body.neo-brutalism .profile-photo {
    border: 4px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 5px 5px 0 #0A0A0A;
}

body.neo-brutalism .btn-signup {
    background: #2ED573;
    color: #0A0A0A;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 4px 4px 0 #0A0A0A;
}

body.neo-brutalism .btn-signup:hover {
    box-shadow: 2px 2px 0 #0A0A0A;
    transform: translate(2px, 2px);
    background: #2ED573;
}

body.neo-brutalism .login-card {
    background: #FAFAF5;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 8px 8px 0 #0A0A0A;
}

body.neo-brutalism .file-input-label {
    background: #FFED47;
    color: #0A0A0A;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 4px 4px 0 #0A0A0A;
}

body.neo-brutalism .file-input-label:hover {
    box-shadow: 2px 2px 0 #0A0A0A;
    transform: translate(2px, 2px);
    background: #FFED47;
}

body.neo-brutalism .user-card {
    background: #FAFAF5;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 5px 5px 0 #0A0A0A;
    transition: box-shadow 0.1s ease, transform 0.1s ease;
}

body.neo-brutalism .user-card:hover {
    box-shadow: 3px 3px 0 #0A0A0A;
    transform: translate(2px, 2px);
}

body.neo-brutalism .user-card h3 {
    color: #FF4757;
    text-transform: uppercase;
}

body.neo-brutalism .user-card-photo {
    border: 3px solid #0A0A0A;
    border-radius: 0;
}

body.neo-brutalism .friend-popup {
    background: #FAFAF5;
    border: 4px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 8px 8px 0 #0A0A0A;
}

body.neo-brutalism .friend-row:hover {
    background: #FFED47;
    transform: translateX(4px);
}

body.neo-brutalism .friend-row-photo {
    border: 2px solid #0A0A0A;
    border-radius: 0;
}

body.neo-brutalism .notif-dropdown {
    background: #FAFAF5;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 5px 5px 0 #0A0A0A;
}

body.neo-brutalism .notif-dropdown-header {
    color: #0A0A0A;
    border-bottom: 2px solid #0A0A0A;
    background: #FFED47;
    font-weight: 700;
    text-transform: uppercase;
}

body.neo-brutalism .notif-clear-btn {
    border-color: #FF4757;
    color: #FF4757;
    background: transparent;
    border-radius: 0;
}

body.neo-brutalism .notif-item {
    color: #0A0A0A;
    border-bottom: 1px solid rgba(10,10,10,0.15);
}

body.neo-brutalism .notif-item:hover {
    background: #FFED47;
}

body.neo-brutalism .notif-item strong {
    color: #FF4757;
}

body.neo-brutalism .notif-empty {
    color: rgba(10,10,10,0.5);
}

body.neo-brutalism .notif-badge {
    background: #FF4757;
    border: 2px solid #0A0A0A;
    border-radius: 0;
}

body.neo-brutalism .nav-icon:hover::after {
    background: #0A0A0A;
    color: #FFED47;
    border-radius: 0;
}

body.neo-brutalism .mobile-bottom-nav {
    background: #FFED47;
    border-top: 4px solid #0A0A0A;
}

body.neo-brutalism .mobile-nav-icon {
    color: #0A0A0A;
}

body.neo-brutalism .mobile-nav-icon:hover,
body.neo-brutalism .mobile-nav-icon:active {
    color: #FF4757;
    background: rgba(10,10,10,0.08);
}

body.neo-brutalism .mobile-notif-fixed .nav-icon {
    background: #FFED47;
    border: 2px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 3px 3px 0 #0A0A0A;
    color: #0A0A0A;
}

body.neo-brutalism .notif-clear-btn:hover {
    background: rgba(255,71,87,0.1);
    transform: none;
}

/* Theme toggle switch */
.theme-toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.theme-toggle-label {
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--fg-dark);
}

body.neo-brutalism .theme-toggle-label {
    color: #0A0A0A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* iOS-style toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #444;
    border-radius: 28px;
    transition: 0.3s;
    border: 2px solid #3DF2E0;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #3DF2E0;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(28px);
}

/* Neo-brutalism toggle override */
body.neo-brutalism .toggle-slider {
    background: #ccc;
    border: 3px solid #0A0A0A;
    border-radius: 0;
    box-shadow: 3px 3px 0 #0A0A0A;
}

body.neo-brutalism .toggle-slider:before {
    background: #0A0A0A;
    border-radius: 0;
}

body.neo-brutalism .toggle-switch input:checked + .toggle-slider {
    background: #FFED47;
}


/* ── Neo-brutalism: remove cyberpunk clip-path corners ── */
body.neo-brutalism .post,
body.neo-brutalism button,
body.neo-brutalism input[type="submit"],
body.neo-brutalism .btn,
body.neo-brutalism .search-bar input,
body.neo-brutalism .login-card,
body.neo-brutalism .user-card,
body.neo-brutalism .friend-popup,
body.neo-brutalism .notif-dropdown,
body.neo-brutalism .global-search-form {
    clip-path: none !important;
}

/* Joyce Theme — Pastel Lavender Cutesy ✨ */
body.joyce {
    background-color: #F5F0FF;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(199,125,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,133,194,0.1) 0%, transparent 50%);
    color: #3D2B5E;
}

body.joyce * { scrollbar-color: #C77DFF #EDE4FF; }
body.joyce *::-webkit-scrollbar-track { background: #EDE4FF; }
body.joyce *::-webkit-scrollbar-thumb { background: #C77DFF; border-radius: 20px; border: none; box-shadow: none; }
body.joyce *::-webkit-scrollbar-thumb:hover { background: #FF85C2; }

body.joyce .container { background: transparent; color: #3D2B5E; }

body.joyce h1, body.joyce h2, body.joyce h3 {
    color: #3D2B5E;
    text-shadow: none;
    letter-spacing: 0;
    animation: none;
}

body.joyce .site-header {
    background: linear-gradient(135deg, #EDE4FF 0%, #F5E6FF 100%);
    border-bottom: 2px solid #C77DFF;
    box-shadow: 0 2px 16px rgba(199,125,255,0.15);
}

body.joyce .site-brand {
    color: #C77DFF;
    text-shadow: 0 1px 8px rgba(199,125,255,0.3);
    animation: joyce-float 4s ease-in-out infinite;
    letter-spacing: 2px;
}

body.joyce .nav-icon {
    color: #8B7BAD;
    border-radius: 50%;
}
body.joyce .nav-icon:hover {
    background: rgba(199,125,255,0.15);
    color: #C77DFF;
    box-shadow: 0 0 10px rgba(199,125,255,0.2);
}
body.joyce .nav-icon::after {
    background: #F9F5FF;
    color: #3D2B5E;
    border: 1.5px solid #C77DFF;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(199,125,255,0.2);
    text-shadow: none;
}

body.joyce header {
    background: linear-gradient(135deg, #EDE4FF 0%, #F5E6FF 100%);
    border-bottom: 2px solid #C77DFF;
}
body.joyce header h1 { color: #C77DFF; }

body.joyce nav a { color: #8B7BAD; }
body.joyce nav a:hover { color: #FF85C2; text-shadow: none; }

body.joyce .global-search-bar {
    background: rgba(245,240,255,0.96);
    border-bottom: 1.5px solid rgba(199,125,255,0.3);
    backdrop-filter: blur(4px);
}
body.joyce .global-search-form {
    background: #F9F5FF;
    border: 1.5px solid rgba(199,125,255,0.4);
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(199,125,255,0.1);
}
body.joyce .global-search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(199,125,255,0.2);
    border-color: #C77DFF;
}
body.joyce .global-search-form input[type="text"] {
    color: #3D2B5E;
}
body.joyce .global-search-form input[type="text"]::placeholder { color: #B8A8D4; }
body.joyce .global-search-form button {
    background: #C77DFF;
    color: #fff;
    border-left: none;
    border-radius: 0 20px 20px 0;
    letter-spacing: 0;
    text-transform: none;
}
body.joyce .global-search-form button:hover {
    background: #FF85C2;
    color: #fff;
}
body.joyce .search-icon { color: #B8A8D4; }

body.joyce .search-bar input {
    border-color: rgba(199,125,255,0.4);
    background: #F9F5FF;
    color: #3D2B5E;
    border-radius: 12px;
}
body.joyce .search-bar input:focus {
    border-color: #C77DFF;
    box-shadow: 0 0 0 3px rgba(199,125,255,0.18);
}
body.joyce .search-bar button {
    background: #C77DFF;
    color: #fff;
    border-radius: 12px;
}
body.joyce .search-bar button:hover { background: #FF85C2; transform: translateY(-2px); box-shadow: none; }

body.joyce label {
    color: #8B7BAD;
    text-transform: none;
    letter-spacing: 0;
    font-size: var(--font-xs);
}

body.joyce input[type="text"],
body.joyce input[type="email"],
body.joyce input[type="password"],
body.joyce textarea,
body.joyce select {
    border: 1.5px solid rgba(199,125,255,0.4);
    border-radius: 12px;
    background: #F9F5FF;
    color: #3D2B5E;
}
body.joyce input[type="text"]:focus,
body.joyce input[type="email"]:focus,
body.joyce input[type="password"]:focus,
body.joyce textarea:focus,
body.joyce select:focus {
    border-color: #C77DFF;
    box-shadow: 0 0 0 3px rgba(199,125,255,0.18);
}

body.joyce button,
body.joyce input[type="submit"],
body.joyce .btn {
    background: #C77DFF;
    color: #fff;
    border: none;
    border-radius: 20px;
    clip-path: none;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 3px 12px rgba(199,125,255,0.3);
}
body.joyce button:hover,
body.joyce input[type="submit"]:hover,
body.joyce .btn:hover {
    background: #FF85C2;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255,133,194,0.35);
}

body.joyce .btn-danger {
    background: #FFB3C6;
    color: #7B2040;
    border: none;
    box-shadow: 0 2px 8px rgba(255,133,194,0.2);
}
body.joyce .btn-danger:hover {
    background: #FF85A2;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255,133,194,0.4);
    transform: translateY(-2px);
}

body.joyce .btn-success {
    background: #A8F0C6;
    color: #1A5C3A;
    border: none;
    box-shadow: 0 2px 8px rgba(168,240,198,0.3);
}
body.joyce .btn-success:hover {
    background: #7ADCA8;
    color: #1A5C3A;
}

body.joyce .post {
    background: #F9F5FF;
    border: 1.5px solid rgba(199,125,255,0.22);
    border-left: 3px solid #C77DFF;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(199,125,255,0.1);
    clip-path: none;
}
body.joyce .post:hover {
    box-shadow: 0 8px 24px rgba(199,125,255,0.2), 0 2px 8px rgba(255,133,194,0.1);
    transform: translateY(-3px);
    border-left-color: #FF85C2;
}

body.joyce .post-author { color: #C77DFF; text-shadow: none; letter-spacing: 0; }
body.joyce .post-author a { color: #C77DFF; }
body.joyce .post-author a:hover { color: #FF85C2; }
body.joyce .post-content { color: #3D2B5E; animation: none; }
body.joyce .post-meta { border-top: 1px solid rgba(199,125,255,0.2); color: #8B7BAD; }
body.joyce .post-timestamp { color: #B8A8D4; }
body.joyce .post-score {
    background: rgba(199,125,255,0.1);
    color: #C77DFF;
    border: 1px solid rgba(199,125,255,0.3);
    border-radius: 20px;
    text-shadow: none;
}
body.joyce .post-actions a,
body.joyce .post-actions button {
    background: rgba(199,125,255,0.1);
    color: #8B7BAD;
    border: 1px solid rgba(199,125,255,0.2);
    border-radius: 20px;
}
body.joyce .post-actions a:hover,
body.joyce .post-actions button:hover {
    background: rgba(199,125,255,0.2);
    color: #C77DFF;
    box-shadow: none;
}

body.joyce .btn-vote-up {
    background: rgba(168,240,198,0.3);
    color: #2A7A4C;
    border: 1px solid rgba(168,240,198,0.5);
    border-radius: 20px;
}
body.joyce .btn-vote-up:hover {
    background: #A8F0C6;
    color: #1A5C3A;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(168,240,198,0.4);
}
body.joyce .btn-vote-down {
    background: rgba(255,179,198,0.3);
    color: #8C2A40;
    border: 1px solid rgba(255,179,198,0.5);
    border-radius: 20px;
}
body.joyce .btn-vote-down:hover {
    background: #FFB3C6;
    color: #7B2040;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255,179,198,0.4);
}

body.joyce .profile-card {
    background: linear-gradient(135deg, #EDE4FF 0%, #F9F5FF 100%);
    color: #3D2B5E;
    border: 1.5px solid rgba(199,125,255,0.3);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(199,125,255,0.12);
}

body.joyce .profile-card h1 { color: #C77DFF; text-shadow: none; }

body.joyce a { color: #C77DFF; }
body.joyce a:hover { color: #FF85C2; text-shadow: none; }

body.joyce .btn-signup {
    background: #C77DFF;
    color: #fff;
    border: none;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(199,125,255,0.3);
    clip-path: none;
}
body.joyce .btn-signup:hover {
    background: #FF85C2;
    color: #fff;
    box-shadow: 0 6px 18px rgba(255,133,194,0.35);
    transform: translateY(-2px);
}

body.joyce .login-card {
    background: #F9F5FF;
    border: 1.5px solid rgba(199,125,255,0.3);
    border-top: 2px solid #C77DFF;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(199,125,255,0.15);
    clip-path: none;
}

body.joyce .file-input-label {
    background: #C77DFF;
    color: #fff;
    border: none;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(199,125,255,0.3);
    clip-path: none;
}
body.joyce .file-input-label:hover {
    background: #FF85C2;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(255,133,194,0.35);
}

body.joyce .user-card {
    background: #F9F5FF;
    border: 1.5px solid rgba(199,125,255,0.22);
    border-top: 2px solid #C77DFF;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(199,125,255,0.1);
    clip-path: none;
}
body.joyce .user-card:hover {
    box-shadow: 0 8px 22px rgba(199,125,255,0.2);
    transform: translateY(-4px);
    border-top-color: #FF85C2;
}
body.joyce .user-card h3 { color: #C77DFF; text-shadow: none; }
body.joyce .user-card-photo {
    border: 2px solid #C77DFF;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(199,125,255,0.2);
}

body.joyce .friend-popup {
    background: #F9F5FF;
    border: 1.5px solid rgba(199,125,255,0.35);
    border-top: 2px solid #C77DFF;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(199,125,255,0.2);
    clip-path: none;
}
body.joyce .friend-row:hover {
    background: rgba(199,125,255,0.08);
    transform: translateX(4px);
    border-left: 2px solid #C77DFF;
    padding-left: 8px;
}

body.joyce .notif-dropdown {
    background: #F9F5FF;
    border: 1.5px solid rgba(199,125,255,0.3);
    border-top: 2px solid #C77DFF;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(199,125,255,0.15);
    clip-path: none;
}
body.joyce .notif-dropdown-header {
    color: #C77DFF;
    background: rgba(199,125,255,0.06);
    border-bottom: 1px solid rgba(199,125,255,0.2);
    text-shadow: none;
}
body.joyce .notif-item { color: #3D2B5E; border-bottom: 1px solid rgba(199,125,255,0.1); }
body.joyce .notif-item:hover { background: rgba(199,125,255,0.07); }
body.joyce .notif-item strong { color: #C77DFF; text-shadow: none; }
body.joyce .notif-empty { color: #B8A8D4; }
body.joyce .notif-badge { background: #FF85C2; border: none; }

body.joyce .mobile-bottom-nav {
    background: linear-gradient(135deg, #EDE4FF 0%, #F5E6FF 100%);
    border-top: 2px solid rgba(199,125,255,0.4);
    box-shadow: 0 -4px 16px rgba(199,125,255,0.12);
}
body.joyce .mobile-nav-icon { color: #8B7BAD; }
body.joyce .mobile-nav-icon:hover,
body.joyce .mobile-nav-icon:active {
    color: #C77DFF;
    background: rgba(199,125,255,0.1);
    text-shadow: none;
}
body.joyce .mobile-notif-fixed .nav-icon {
    background: rgba(237,228,255,0.95);
    border: 1.5px solid rgba(199,125,255,0.4);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(199,125,255,0.15);
}

body.joyce .sidebar-left { background: rgba(237,228,255,0.5); }
body.joyce .sidebar-right { background: #EDE4FF; }
body.joyce .main-content { background: transparent; }

body.joyce hr {
    border-top: 1px solid rgba(199,125,255,0.2);
    box-shadow: none;
}

body.joyce .profile-photo {
    border: 3px solid #C77DFF;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #F5F0FF, 0 4px 20px rgba(199,125,255,0.25);
    animation: joyce-float 5s ease-in-out infinite;
}

body.joyce .toggle-slider {
    background: #D4B8F0;
    border-color: #C77DFF;
    border-radius: 28px;
}
body.joyce .toggle-slider:before { background: #fff; border-radius: 50%; }
body.joyce .toggle-switch input:checked + .toggle-slider { background: #C77DFF; }
body.joyce .theme-toggle-label { color: #8B7BAD; text-transform: none; letter-spacing: 0; }

/* Dark Theme */
body.dark .sidebar-left {
    background: transparent;
}

body.dark .main-content {
    background: transparent;
}

/* Status Messages */
.status-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}
.status-info {
    background: rgba(104,199,193,0.08);
    color: var(--brand-teal);
    border-left: 4px solid var(--brand-teal);
}
.status-success {
    background: rgba(122,64,58,0.06);
    color: var(--brand-deep);
    border-left: 4px solid var(--brand-deep);
}
.status-warning {
    background: rgba(250,202,120,0.12);
    color: var(--brand-deep);
    border-left: 4px solid var(--brand-yellow);
}
.status-error {
    background: rgba(221,83,65,0.08);
    color: var(--brand-red);
    border-left: 4px solid var(--brand-red);
}


hr {
    border: none;
    border-top: 1px solid var(--cy-border);
    margin: 20px 0;
    box-shadow: 0 0 8px var(--cy-glow);
}

/* Utilities */
.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--muted-current);
}

/* ====== Global Layout ====== */

/* --- Site Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #050810 0%, #0A0F1E 100%);
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--cy-border);
    box-shadow: 0 2px 20px var(--cy-glow), 0 0 1px var(--fg-dark);
}

/* Left nav icons */
.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Right side: brand + bell — no longer needed as separate wrapper */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-brand {
    color: var(--fg-dark);
    font-size: var(--font-md);
    font-weight: 600;
    letter-spacing: 4px;
    white-space: nowrap;
    order: -1;
    text-shadow: 0 0 10px var(--fg-dark), 0 0 30px var(--cy-glow);
    animation: cy-flicker 8s infinite;
}

/* Nav icon buttons / links */
.nav-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 3px;
    color: var(--fg-dark);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.nav-icon svg {
    width: 22px;
    height: 22px;
    pointer-events: none;
}

.nav-icon:hover {
    background: rgba(0,245,255,0.1);
    color: var(--cy-magenta);
    transform: translateY(-2px);
    box-shadow: 0 0 12px var(--cy-glow);
}

/* Tooltip label */
.nav-icon::after {
    content: attr(data-label);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--fg-dark);
    border: 1px solid var(--cy-border);
    padding: 4px 10px;
    border-radius: 2px;
    font-size: var(--font-xs);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 9999;
    text-shadow: 0 0 6px var(--cy-glow);
    box-shadow: 0 0 10px var(--cy-glow);
}

.nav-icon:hover::after {
    opacity: 1;
}

/* --- Notification Bell --- */
.notif-wrapper {
    position: relative;
}

.notif-btn {
    font-family: inherit;
}

.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #FF073A;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    pointer-events: none;
}

/* Notification dropdown */
.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--cy-border);
    border-top: 2px solid var(--fg-dark);
    border-radius: 3px;
    box-shadow: 0 0 30px var(--cy-glow), 0 8px 32px rgba(0,0,0,0.7);
    z-index: 9999;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.notif-dropdown.open {
    display: block;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--cy-border);
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--cy-magenta);
    text-shadow: 0 0 6px var(--cy-glow-mg);
    background: rgba(0,245,255,0.04);
}

.notif-clear-btn {
    background: transparent;
    border: 1px solid #FF073A;
    color: #FF073A;
    font-size: var(--font-xs);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: background 0.2s ease;
    transform: none;
    box-shadow: none;
}

.notif-clear-btn:hover {
    background: rgba(255,7,58,0.15);
    transform: none;
    box-shadow: none;
}

.notif-list {
    max-height: 360px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #00F5FF #050810;
    display: inline-flex !important;
    flex-direction: column !important;
    text-align: center !important;
}

.notif-list::-webkit-scrollbar {
    width: 5px;
}

.notif-list::-webkit-scrollbar-track {
    background: #0B0F14;
}

.notif-list::-webkit-scrollbar-thumb {
    background: #3DF2E0;
    border-radius: 3px;
}

.notif-item {
    padding: 12px 16px;
    font-size: var(--font-xs);
    color: var(--fg-dark);
    border-bottom: 1px solid rgba(0,245,255,0.07);
    line-height: 1.5;
    transition: background 0.15s ease;
}

.notif-item:hover {
    background: rgba(0,245,255,0.07);
}

.notif-item strong {
    color: var(--cy-magenta);
    text-shadow: 0 0 4px var(--cy-glow-mg);
}

.notif-icon {
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    font-size: 13px;
    margin-right: 6px;
}

.notif-empty {
    padding: 20px 16px;
    color: rgba(0,245,255,0.4);
    font-size: var(--font-xs);
    text-align: center;
}

/* --- Sticky Search Bar (below header) --- */
.global-search-bar {
    position: sticky;
    top: 64px;
    z-index: 990;
    background: rgba(5,8,16,0.95);
    border-bottom: 1px solid var(--cy-border);
    padding: 10px 10%;
    backdrop-filter: blur(4px);
}

.global-search-form {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--cy-border);
    border-radius: 2px;
    overflow: hidden;
    margin: 0;
    transition: box-shadow 0.2s ease;
}

.global-search-form:focus-within {
    box-shadow: 0 0 16px var(--cy-glow);
    border-color: var(--fg-dark);
}

.search-icon {
    width: 18px;
    height: 18px;
    margin: 0 12px;
    color: rgba(0,245,255,0.5);
    flex-shrink: 0;
}

.global-search-form input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: var(--font-sm);
    color: var(--fg-dark);
    font-family: inherit;
    width: auto;
}

.global-search-form input[type="text"]:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

.global-search-form button {
    background: var(--cy-magenta);
    color: #050810;
    border: none;
    border-left: 1px solid var(--cy-border);
    border-radius: 0;
    padding: 10px 22px;
    font-size: var(--font-sm);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    transform: none;
    box-shadow: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.global-search-form button:hover {
    background: var(--fg-dark);
    color: #050810;
    transform: none;
    box-shadow: none;
}

/* --- Layout & Main Content --- */
.layout {
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 126px);
    padding: 40px 10%;
}

.main-content {
    width: 80%;
    max-width: 1100px;
    background: transparent;
}

/* Remove old sidebars (in case referenced elsewhere) */
.sidebar-left,
.sidebar-right {
    display: none !important;
}


/* ── Global Chat: terminal green text (dark/cyberpunk theme) ── */
.chat-box {
    color: var(--cy-green);
}

.chat-box * {
    color: var(--cy-green);
}

/* Chat message bubbles / text elements */
.chat-message,
.chat-text,
.message-text,
.chat-content {
    color: var(--cy-green);
}

/* Neo-brutalism: revert chat to normal dark text */
body.neo-brutalism .chat-box,
body.neo-brutalism .chat-box *,
body.neo-brutalism .chat-message,
body.neo-brutalism .chat-text,
body.neo-brutalism .message-text,
body.neo-brutalism .chat-content {
    color: #0A0A0A;
}

/* ===== Mobile-only elements: hidden on desktop ===== */
.mobile-bottom-nav,
.mobile-notif-fixed {
    display: none !important;
}

/* Override inside mobile breakpoint */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
    }
    .mobile-notif-fixed {
        display: block !important;
    }
}

/* Responsive Design - MUST BE AT END */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .post-content {
        font-size: var(--font-sm) !important;
    }

    .post-parent {
        font-size: var(--font-sm) !important;
    }

    /* ── Header: brand only, centred ── */
    .site-header {
        padding: 0 16px;
        height: 52px;
        justify-content: center;
    }

    /* Hide all nav icons + notification bell from the header */
    .site-header .header-nav {
        display: none;
    }

    .site-brand {
        font-size: var(--font-md);
        margin-left: 0 !important; /* override inline style */
    }

    /* ── Mobile fixed notification bell (top-right, below header) ── */
    .mobile-notif-fixed {
        display: block;
        position: fixed;
        top: 52px; /* sits flush below the 52px header */
        right: 14px;
        z-index: 995;
        padding: 6px 0;
    }

    .mobile-notif-fixed .nav-icon {
        width: 40px;
        height: 40px;
        background: rgba(5,8,16,0.95);
        border: 1px solid var(--cy-border);
        border-radius: 3px;
        box-shadow: 0 0 10px var(--cy-glow);
    }

    .mobile-notif-fixed .nav-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Mobile notification dropdown opens downward from bell */
    .mobile-notif-dropdown {
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: calc(100vw - 28px);
        max-width: 320px;
    }

    /* ── Sticky Bottom Nav ── */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: linear-gradient(135deg, #050810 0%, #0A0F1E 100%);
        border-top: 1px solid var(--cy-border);
        box-shadow: 0 -2px 20px var(--cy-glow);
        height: 62px;
        align-items: center;
        justify-content: space-around;
        padding: 0 8px;
        /* safe area for notched phones */
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .mobile-nav-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        flex: 1;
        height: 100%;
        color: var(--fg-dark);
        text-decoration: none;
        background: transparent;
        border: none;
        border-radius: 3px;
        cursor: pointer;
        padding: 6px 0;
        transition: color 0.2s ease, background 0.2s ease;
        /* override desktop tooltip pseudo-element */
        position: relative;
    }

    .mobile-nav-icon::after {
        display: none !important;
    }

    .mobile-nav-icon svg {
        width: 22px;
        height: 22px;
        pointer-events: none;
    }

    .mobile-nav-icon:hover,
    .mobile-nav-icon:active {
        color: var(--cy-magenta);
        background: rgba(0,245,255,0.08);
        transform: none;
        text-shadow: 0 0 6px var(--cy-glow-mg);
    }

    .mobile-nav-label {
        font-size: 10px;
        font-family: 'JetBrains Mono', monospace;
        font-weight: 600;
        letter-spacing: 0.5px;
        color: inherit;
        line-height: 1;
    }

    /* ── Search bar: proportionate, respects bottom nav ── */
    .global-search-bar {
        top: 52px;
        padding: 8px 12px;
        background: rgba(5,8,16,0.97);
    }

    .global-search-form {
        border-radius: 8px;
        margin-right: 50px;
    }

    .global-search-form input[type="text"] {
        font-size: var(--font-xs);
        padding: 8px 0;
    }

    .global-search-form button {
        padding: 8px 14px;
        font-size: var(--font-xs);
    }

    .search-icon {
        width: 15px;
        height: 15px;
        margin: 0 8px;
    }

    /* ── Layout: add bottom padding so content clears the bottom nav ── */
    .layout {
        padding: 16px 14px 80px 14px;
    }

    .main-content {
        width: 100%;
        max-width: 100%;
    }

    /* ── Hide desktop notification bell tooltip ── */
    .nav-icon::after {
        display: none;
    }

    h1 { font-size: var(--font-lg); }
    h2 { font-size: var(--font-md); }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .profile-actions {
        flex-direction: column;
    }

    .post { padding: 16px; }

    /* ── Vote + Reply buttons: force single row, no wrapping ── */
    .post-actions {
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
    }

    .post-actions a,
    .post-actions button,
    .btn-vote {
        white-space: nowrap;
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 8px 10px;
        font-size: var(--font-xs);
    }

    /* ── Profile photo: force perfect circle ── */
    .profile-photo {
        width: 120px;
        height: 120px;
        aspect-ratio: 1 / 1;
        border-radius: 50%;
        object-fit: cover;
    }

    .user-card-photo {
        width: 80px;
        height: 80px;
        aspect-ratio: 1 / 1;
        border-radius: 50%;
        object-fit: cover;
    }

    .friend-row-photo {
        width: 44px;
        height: 44px;
        aspect-ratio: 1 / 1;
        border-radius: 50%;
        object-fit: cover;
    }

    .profile-card { padding: 20px; }

    .login-container {
        min-height: calc(100vh - 80px);
    }

    .login-card {
        max-width: 90%;
        padding: 30px;
    }

    .login-card h1 { font-size: var(--font-lg); }

    .chat-box {
        font-size: var(--font-xs) !important;
    }
}

/* Extra small screens (phones) */
@media (max-width: 480px) {
    .container { padding: 12px; }

    .site-brand {
        font-size: var(--font-md);
    }

    .post-content {
        font-size: var(--font-sm) !important;
    }

    .post-parent {
        font-size: var(--font-sm) !important;
    }

    .global-search-bar {
        padding: 6px 10px;
    }

    .layout {
        padding: 12px 10px 80px 10px;
    }

    .main-content {
        width: 100%;
        max-width: 100%;
    }

    .mobile-notif-dropdown {
        width: calc(100vw - 24px);
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select,
    button,
    .btn {
        font-size: var(--font-sm);
    }

    .post-actions a,
    .post-actions button,
    .btn-vote {
        width: 100%;
    }

    .login-container {
        min-height: auto;
        padding: 10px;
    }

    .login-card {
        max-width: 100%;
        padding: 20px;
    }

    .login-card h1 {
        font-size: var(--font-md);
        margin-bottom: 20px;
    }

    .login-card p { font-size: var(--font-sm); }

    .login-card .btn,
    .login-card .btn-signup {
        font-size: var(--font-sm);
        padding: 10px 20px;
    }

    img,
    .post img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .chat-box {
        font-size: var(--font-xs) !important;
    }
}
/* ── Chat & Room Styles ── */

    /* ── Chatroom Lobby Styles ── */
    #chatrooms-lobby {
        max-width: 700px;
        margin: 0 auto;
        padding: 24px 16px;
    }

    .cr-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .cr-title {
        font-family: 'JetBrains Mono', monospace;
        font-size: 1.5rem;
        margin: 0;
    }

    .cr-stats {
        display: flex;
        gap: 16px;
        font-size: 13px;
        opacity: .8;
    }

    .cr-search-row {
        display: flex;
        gap: 10px;
        margin-bottom: 24px;
    }

    .cr-search {
        flex: 1;
        padding: 10px 14px;
        border-radius: 6px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 14px;
        outline: none;
        transition: border-color .2s;
    }

    .cr-section {
        margin-bottom: 28px;
    }

    .cr-section-title {
        font-size: 11px;
        letter-spacing: .12em;
        text-transform: uppercase;
        opacity: .55;
        margin-bottom: 10px;
        font-family: 'JetBrains Mono', monospace;
    }

    .cr-room-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 16px;
        border-radius: 6px;
        margin-bottom: 10px;
        transition: transform .15s;
    }

    .cr-room-card:hover {
        transform: translateX(3px);
    }

    .cr-room-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .cr-room-name {
        font-family: 'JetBrains Mono', monospace;
        font-size: 15px;
        font-weight: 600;
    }

    .cr-room-meta {
        font-size: 12px;
        opacity: .6;
    }

    .cr-room-right {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .cr-timer {
        font-family: 'JetBrains Mono', monospace;
        font-size: 12px;
        opacity: .7;
    }

    .cr-empty {
        font-size: 14px;
        opacity: .5;
        padding: 16px 0;
        font-family: 'JetBrains Mono', monospace;
    }

    /* Buttons */
    .cr-btn {
        padding: 8px 16px;
        border-radius: 5px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        border: 2px solid transparent;
        transition: all .18s;
        text-decoration: none;
        display: inline-block;
    }

    /* Modal */
    .cr-modal-overlay {
        position: fixed;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }

    .cr-modal {
        width: 360px;
        padding: 28px;
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .cr-modal-title {
        font-family: 'JetBrains Mono', monospace;
        font-size: 1.1rem;
        font-weight: 700;
    }

    .cr-label {
        font-family: 'JetBrains Mono', monospace;
        font-size: 12px;
        opacity: .7;
    }

    .cr-input {
        padding: 10px 12px;
        border-radius: 5px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 14px;
        outline: none;
        width: 100%;
        box-sizing: border-box;
    }

    .cr-modal-actions {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 4px;
    }

    .cr-error {
        font-family: 'JetBrains Mono', monospace;
        font-size: 13px;
        padding: 8px 12px;
        border-radius: 4px;
        border-left: 3px solid #FF4757;
    }

    /* ── Dark / Cyberpunk Theme ── */
    body.dark .cr-search,
    body.dark .cr-input {
        background: #0D1528;
        border: 1px solid rgba(0, 245, 255, 0.25);
        color: #e0f7fa;
    }

    body.dark .cr-search:focus,
    body.dark .cr-input:focus {
        border-color: #00F5FF;
    }

    body.dark .cr-room-card {
        background: rgba(0, 245, 255, 0.04);
        border: 1px solid rgba(0, 245, 255, 0.15);
        border-left: 3px solid #00F5FF;
    }

    body.dark .cr-title {
        color: #00F5FF;
        text-shadow: 0 0 12px rgba(0, 245, 255, 0.4);
    }

    body.dark .cr-section-title {
        color: rgba(0, 245, 255, 0.55);
    }

    body.dark .cr-room-name {
        color: #39FF14;
        text-shadow: 0 0 6px rgba(57, 255, 20, 0.3);
    }

    body.dark .cr-timer {
        color: rgba(0, 245, 255, 0.6);
    }

    body.dark .cr-btn-primary {
        background: var(--color-success);
        color: #0D1528;
        border-color: transparent;
    }

    body.dark .cr-btn-primary:hover {
        box-shadow: 0 0 16px rgba(0, 245, 255, 0.5);
    }

    body.dark .cr-btn-enter {
        background: transparent;
        border: 2px solid #39FF14;
        color: #39FF14;
    }

    body.dark .cr-btn-enter:hover {
        background: rgba(57, 255, 20, 0.1);
    }

    body.dark .cr-btn-join {
        background: transparent;
        border: 2px solid #00F5FF;
        color: #00F5FF;
    }

    body.dark .cr-btn-join:hover {
        background: rgba(0, 245, 255, 0.1);
    }

    body.dark .cr-btn-ghost {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.6);
    }

    body.dark .cr-btn-ghost:hover {
        border-color: #FF00A0;
        color: #FF00A0;
    }

    body.dark .cr-modal-overlay {
        background: rgba(0, 0, 0, 0.75);
    }

    body.dark .cr-modal {
        background: #0D1528;
        border: 1px solid rgba(0, 245, 255, 0.3);
        box-shadow: 0 0 40px rgba(0, 245, 255, 0.15);
    }

    body.dark .cr-error {
        background: rgba(255, 71, 87, 0.1);
        color: #FF4757;
    }

    /* ── Neo-Brutalism Theme ── */
    body.neo-brutalism .cr-search,
    body.neo-brutalism .cr-input {
        background: #FAFAF5;
        border: 2px solid #0A0A0A;
        color: #0A0A0A;
    }

    body.neo-brutalism .cr-search:focus,
    body.neo-brutalism .cr-input:focus {
        outline: 3px solid #FF4757;
    }

    body.neo-brutalism .cr-room-card {
        background: #FAFAF5;
        border: 2px solid #0A0A0A;
        box-shadow: 4px 4px 0 #0A0A0A;
        border-radius: 0;
    }

    body.neo-brutalism .cr-title {
        color: #0A0A0A;
    }

    body.neo-brutalism .cr-room-name {
        color: #0A0A0A;
    }

    body.neo-brutalism .cr-btn-primary {
        background: #FF4757;
        color: #FFF;
        border: 2px solid #0A0A0A;
        box-shadow: 3px 3px 0 #0A0A0A;
        border-radius: 0;
    }

    body.neo-brutalism .cr-btn-primary:hover {
        transform: translate(-1px, -1px);
        box-shadow: 4px 4px 0 #0A0A0A;
    }

    body.neo-brutalism .cr-btn-enter {
        background: #39FF14;
        color: #0A0A0A;
        border: 2px solid #0A0A0A;
        border-radius: 0;
        box-shadow: 3px 3px 0 #0A0A0A;
    }

    body.neo-brutalism .cr-btn-join {
        background: #00F5FF;
        color: #0A0A0A;
        border: 2px solid #0A0A0A;
        border-radius: 0;
        box-shadow: 3px 3px 0 #0A0A0A;
    }

    body.neo-brutalism .cr-btn-ghost {
        background: #FAFAF5;
        border: 2px solid #0A0A0A;
        color: #0A0A0A;
        border-radius: 0;
    }

    body.neo-brutalism .cr-modal-overlay {
        background: rgba(0, 0, 0, 0.5);
    }

    body.neo-brutalism .cr-modal {
        background: #FAFAF5;
        border: 3px solid #0A0A0A;
        box-shadow: 6px 6px 0 #0A0A0A;
        border-radius: 0;
    }

    body.neo-brutalism .cr-error {
        background: rgba(255, 71, 87, 0.1);
        color: #FF4757;
        border-left-color: #FF4757;
    }

    /* ── Room View Styles ── */
    #chatroom-view {
        max-width: 900px;
        margin: 0 auto;
        padding: 20px 16px;
        display: flex;
        flex-direction: column;
        height: calc(100vh - 180px);
    }

    .cr-layout {
        display: flex;
        gap: 16px;
        flex: 1;
        min-height: 0;
    }

    .cr-chat-area {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .cr-chat-box {
        flex: 1;
        overflow-y: auto;
        padding: 12px;
        border-radius: 6px;
        margin-bottom: 12px;
        min-height: 0;
    }

    .cr-msg-form {
        display: flex;
        gap: 8px;
    }

    .cr-msg-input {
        flex: 1;
        padding: 10px 14px;
        border-radius: 6px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 14px;
        outline: none;
    }

    .cr-members {
        width: 170px;
        flex-shrink: 0;
    }

    .cr-member-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 0;
        font-family: 'JetBrains Mono', monospace;
        font-size: 13px;
    }

    .cr-member-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #39FF14;
        flex-shrink: 0;
    }

    .cr-badge {
        font-family: 'JetBrains Mono', monospace;
        font-size: 11px;
        padding: 2px 7px;
        border-radius: 10px;
    }

    .cr-badge-sm {
        margin-left: 4px;
    }

    .cr-header-actions {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .cr-invite-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-height: 220px;
        overflow-y: auto;
    }

    .cr-invite-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cr-success {
        font-family: 'JetBrains Mono', monospace;
        font-size: 13px;
        padding: 8px 12px;
        border-radius: 4px;
        border-left: 3px solid #39FF14;
    }

    /* ── Dark Theme ── */
    body.dark .cr-chat-box {
        background: #0D1528;
        border: 1px solid rgba(0, 245, 255, 0.2);
        border-left: 2px solid #00F5FF;
        box-shadow: 0 0 20px rgba(0, 245, 255, 0.06), inset 0 0 20px rgba(0, 245, 255, 0.02);
    }

    body.dark .cr-msg-input {
        background: #0D1528;
        border: 1px solid rgba(0, 245, 255, 0.25);
        color: #e0f7fa;
    }

    body.dark .cr-msg-input:focus {
        border-color: #00F5FF;
    }

    body.dark .cr-btn-send {
        background: var(--cy-green);
        color: #0D1528;
        border: none;
        font-weight: 700;
    }

    body.dark .cr-btn-send:hover {
        box-shadow: 0 0 12px rgba(0, 245, 255, 0.5);
    }

    body.dark .cr-btn-invite {
        background: transparent;
        border: 2px solid #FF00A0;
        color: #FF00A0;
    }

    body.dark .cr-btn-invite:hover {
        background: rgba(255, 0, 160, 0.1);
    }

    body.dark .cr-btn-leave {
        background: transparent;
        border: 2px solid rgba(255, 71, 87, 0.6);
        color: #FF4757;
    }

    body.dark .cr-btn-leave:hover {
        background: rgba(255, 71, 87, 0.1);
    }

    body.dark .cr-btn-invite-send {
        background: transparent;
        border: 2px solid #FF00A0;
        color: #FF00A0;
        padding: 4px 12px;
        border-radius: 4px;
        font-size: 12px;
    }

    body.dark .cr-members {
        border-left: 1px solid rgba(0, 245, 255, 0.1);
        padding-left: 16px;
    }

    body.dark .cr-member-item {
        color: #e0f7fa;
    }

    body.dark .cr-badge {
        background: rgba(0, 245, 255, 0.1);
        color: #00F5FF;
    }

    body.dark .cr-modal-overlay {
        background: rgba(0, 0, 0, 0.75);
    }

    body.dark .cr-modal {
        background: #0D1528;
        border: 1px solid rgba(0, 245, 255, 0.3);
        box-shadow: 0 0 40px rgba(0, 245, 255, 0.15);
    }

    body.dark .cr-btn-ghost {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.6);
    }

    body.dark .cr-error {
        background: rgba(255, 71, 87, 0.1);
        color: #FF4757;
    }

    body.dark .cr-success {
        background: rgba(57, 255, 20, 0.08);
        color: #39FF14;
    }

    body.dark .cr-invite-list {
        color: #e0f7fa;
    }

    body.dark .cr-timer-inline {
        color: rgba(0, 245, 255, 0.6);
        font-size: 13px;
    }

    body.dark .cr-title {
        color: #00F5FF;
        text-shadow: 0 0 12px rgba(0, 245, 255, 0.4);
    }

    /* ── Neo-Brutalism Theme ── */
    body.neo-brutalism .cr-chat-box {
        background: #FAFAF5;
        border: 2px solid #0A0A0A;
        box-shadow: 4px 4px 0 #0A0A0A;
        border-radius: 0;
    }

    body.neo-brutalism .cr-msg-input {
        background: #FAFAF5;
        border: 2px solid #0A0A0A;
        color: #0A0A0A;
        border-radius: 0;
    }

    body.neo-brutalism .cr-btn-send {
        background: #FF4757;
        color: #FFF;
        border: 2px solid #0A0A0A;
        box-shadow: 3px 3px 0 #0A0A0A;
        border-radius: 0;
    }

    body.neo-brutalism .cr-btn-invite {
        background: #FF00A0;
        color: #FFF;
        border: 2px solid #0A0A0A;
        border-radius: 0;
        box-shadow: 3px 3px 0 #0A0A0A;
    }

    body.neo-brutalism .cr-btn-leave {
        background: #FAFAF5;
        border: 2px solid #FF4757;
        color: #FF4757;
        border-radius: 0;
    }

    body.neo-brutalism .cr-btn-invite-send {
        background: #FF00A0;
        color: #FFF;
        border: 2px solid #0A0A0A;
        border-radius: 0;
        padding: 4px 12px;
        font-size: 12px;
    }

    body.neo-brutalism .cr-members {
        border-left: 2px solid #0A0A0A;
        padding-left: 16px;
    }

    body.neo-brutalism .cr-badge {
        background: #39FF14;
        color: #0A0A0A;
        border: 1px solid #0A0A0A;
    }

    body.neo-brutalism .cr-modal {
        background: #FAFAF5;
        border: 3px solid #0A0A0A;
        box-shadow: 6px 6px 0 #0A0A0A;
        border-radius: 0;
    }

    body.neo-brutalism .cr-modal-overlay {
        background: rgba(0, 0, 0, 0.5);
    }

    body.neo-brutalism .cr-btn-ghost {
        background: #FAFAF5;
        border: 2px solid #0A0A0A;
        color: #0A0A0A;
        border-radius: 0;
    }

    body.neo-brutalism .cr-error {
        background: rgba(255, 71, 87, 0.1);
        color: #FF4757;
    }

    body.neo-brutalism .cr-success {
        background: rgba(57, 255, 20, 0.15);
        color: #2ea700;
    }

/* ══════════════════════════════════════════════════════════
   CHATROOM (cr-) RESPONSIVE OVERRIDES
   – Smaller fonts globally
   – Wider message area on desktop
   – Mobile: sidebar moves below chat, box stretches edge-to-edge
   ══════════════════════════════════════════════════════════ */

/* ── Desktop: wider message area, tighter fonts ── */
#chatroom-view {
    max-width: 1100px;
    padding: 16px 20px;
    height: calc(100vh - 120px);
}
.cr-title                        { font-size: 1.1rem; }
.cr-room-meta                    { font-size: 11px; }
.cr-timer-inline                 { font-size: 11px; }
.cr-btn                          { font-size: 12px; padding: 6px 13px; }
.cr-msg-input                    { font-size: 13px; padding: 8px 12px; }
.cr-member-item                  { font-size: 12px; }
.cr-badge                        { font-size: 10px; padding: 1px 6px; }
.cr-members                      { width: 150px; }

/* ── Mobile (≤ 640px) ── */
@media (max-width: 640px) {

    /* Container: zero horizontal padding so content can bleed edge-to-edge */
    #chatroom-view {
        max-width: 100% !important;
        width: 100% !important;
        padding: 10px 0 0 !important;
        height: calc(100vh - 100px) !important;
        box-sizing: border-box;
    }

    /* Header: add side padding back just for the header */
    .cr-header {
        padding: 0 12px 10px !important;
        margin-bottom: 8px !important;
        flex-wrap: wrap;
        gap: 6px;
        align-items: flex-start;
    }

    /* ── Invite & Leave: same compact outlined style ── */
    .cr-btn-invite,
    .cr-btn-leave {
        font-size: 11px !important;
        padding: 5px 10px !important;
        min-width: 0 !important;
        width: auto !important;
        box-shadow: none !important;
    }
    /* Dark theme: unify to a small outlined look */
    body.dark .cr-btn-invite,
    body.dark .cr-btn-leave {
        background: transparent !important;
        border-width: 1.5px !important;
    }
    /* Neo-brutalism: same size, keep outlines but trim shadow */
    body.neo-brutalism .cr-btn-invite {
        font-size: 11px !important;
        padding: 5px 10px !important;
        box-shadow: 2px 2px 0 #0A0A0A !important;
    }
    body.neo-brutalism .cr-btn-leave {
        font-size: 11px !important;
        padding: 5px 10px !important;
    }

    /* Header action group */
    .cr-header-actions {
        gap: 6px !important;
        align-items: center;
    }

    /* Layout: stack column – chat on top, sidebar below */
    .cr-layout {
        flex-direction: column !important;
        gap: 0 !important;
        min-height: 0;
        flex: 1;
    }

    /* Chat area fills full width */
    .cr-chat-area {
        width: 100% !important;
        min-width: 0;
    }

    /* Message box: flush with screen edges */
    .cr-chat-box {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        margin-bottom: 8px !important;
        padding: 10px 12px !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Message form: full width, consistent height */
    .cr-msg-form {
        padding: 0 10px 8px !important;
        gap: 6px !important;
        align-items: stretch !important;  /* both children same height */
        box-sizing: border-box;
        width: 100%;
    }

    .cr-msg-input {
        font-size: 13px !important;
        padding: 9px 12px !important;
        height: 38px !important;
        box-sizing: border-box;
    }

    .cr-btn-send {
        font-size: 12px !important;
        padding: 0 16px !important;
        height: 38px !important;
        min-width: 60px !important;
        flex-shrink: 0;
        box-sizing: border-box;
        box-shadow: none !important;
    }
    body.neo-brutalism .cr-btn-send {
        box-shadow: 2px 2px 0 #0A0A0A !important;
        height: 38px !important;
    }

    /* Members sidebar: moves below chat, wraps horizontally */
    .cr-members {
        width: 100% !important;
        flex-shrink: 0;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center;
        gap: 4px 12px !important;
        padding: 8px 12px 6px !important;
        border-left: none !important;
        border-top: 1px solid rgba(0,245,255,0.15);
        box-sizing: border-box;
    }
    body.dark .cr-members {
        border-left: none !important;
        border-top: 1px solid rgba(0,245,255,0.15) !important;
        padding-left: 12px !important;
    }
    body.neo-brutalism .cr-members {
        border-left: none !important;
        border-top: 2px solid #0A0A0A !important;
        padding-left: 12px !important;
    }

    /* Section title spans full row */
    .cr-members .cr-section-title {
        width: 100%;
        font-size: 10px;
        margin-bottom: 2px;
    }

    .cr-member-item {
        font-size: 11px !important;
        padding: 2px 0 !important;
    }

    /* Modal fits small screen */
    .cr-modal {
        width: calc(100vw - 32px) !important;
        padding: 20px 16px !important;
    }
}