:root {
    --green-50: #f5f0ff;
    --green-100: #ede5ff;
    --green-200: #d4c4ff;
    --green-300: #b497f7;
    --green-400: #9b6dff;
    --green-500: #833ab4;
    --green-600: #6d2d96;
    --green-700: #5a2480;
    --green-800: #451a66;

    --ink: #1a1a2e;
    --ash: #4a5568;
    --mist: #94a3b8;
    --ghost: #e8e2f0;
    --snow: #f9f7fc;
    --white: #ffffff;

    --surface: #ffffff;
    --bg: #f9f7fc;
    --border: #e8e2f0;

    --error: #e53e3e;
    --error-bg: #fff5f5;
    --error-border: #fed7d7;
    --error-dark: #c53030;
    --success-bg: #f5f0ff;
    --success-border: #d4c4ff;
    --info-bg: #ebf8ff;
    --info-border: #bee3f8;
    --warn-bg: #fffff0;
    --warn-border: #fefcbf;

    /* --- Sketchbook Multicolor Accents --- */
    --accent-cyan: #22d3ee;
    --accent-magenta: #e879f9;
    --accent-orange: #fb923c;
    --accent-yellow: #facc15;
    --accent-rose: #fb7185;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.03);
    --shadow-md: 0 4px 16px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.03);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.04);

    --font: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Manrope', system-ui, -apple-system, sans-serif;
    --font-pixel: 'Space Grotesk', 'Manrope', system-ui, -apple-system, sans-serif;
    --transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    color-scheme: light;
}

:root[data-theme='dark'] {
    --ink: #f7f2ff;
    --ash: #d4c6ea;
    --mist: #9f93b6;
    --ghost: #261d37;
    --snow: #161122;
    --white: #1b1529;
    --surface: #1b1529;
    --bg: #120d1d;
    --border: #35294a;
    --green-50: #201730;
    --green-100: #2a1f40;
    --green-200: #41305e;
    --green-300: #5a4283;
    --green-400: #b089ff;
    --green-500: #9b6dff;
    --green-600: #c3a5ff;
    --green-700: #eadfff;
    --green-800: #f5efff;
    --error-bg: #32171a;
    --error-border: #6c2b34;
    --success-bg: #1c1830;
    --success-border: #4d3a71;
    --info-bg: #132739;
    --info-border: #305a7e;
    --warn-bg: #2d250c;
    --warn-border: #6f5f20;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.32), 0 1px 2px rgba(0,0,0,.2);
    --shadow-md: 0 8px 24px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.24);
    --shadow-lg: 0 16px 40px rgba(0,0,0,.42), 0 4px 12px rgba(0,0,0,.26);
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

:root[data-theme='dark'] body {
    background:
        radial-gradient(circle at top, rgba(176,137,255,.12), transparent 32%),
        radial-gradient(circle at bottom left, rgba(34,211,238,.08), transparent 28%),
        var(--bg);
}

#app { min-height: 100vh; }

.page-loader {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(61,154,104,.08), transparent 42%),
        linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.logo-frame {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: hidden;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(var(--logo-scale, 1.2));
    transform-origin: center;
    display: block;
}

.loader-mark {
    --logo-scale: 1.3;
    width: min(320px, 72vw);
    aspect-ratio: 4.35 / 1;
    border-radius: 28px;
    animation: loaderBounce 0.8s ease infinite alternate;
}

.loader-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    color: var(--ash);
    margin-top: 18px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

@keyframes loaderBounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 16px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    letter-spacing: -0.01em;
    text-transform: none;
}

.btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-primary {
    background: var(--green-500);
    color: var(--white);
    border-bottom: 4px solid var(--green-700);
}

.btn-primary:hover {
    background: var(--green-400);
    transform: translateY(-1px);
    border-bottom-width: 5px;
}

.btn-primary:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
}

.btn-secondary {
    background: var(--green-100);
    color: var(--green-700);
    border-bottom: 4px solid var(--green-300);
}

.btn-secondary:hover {
    background: var(--green-200);
    transform: translateY(-1px);
    border-bottom-width: 5px;
}

.btn-secondary:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
}

.btn-ghost {
    background: var(--ghost);
    color: var(--ash);
    border-bottom: 3px solid #c8cfd4;
}

.btn-ghost:hover {
    background: var(--border);
    color: var(--ink);
    transform: translateY(-1px);
}

.btn-ghost:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
}

.btn-danger {
    background: var(--error);
    color: var(--white);
    border-bottom: 4px solid var(--error-dark);
}

.btn-danger:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
}

.btn-sm { padding: 8px 14px; font-size: 11px; }
.btn-sm svg { width: 12px; height: 12px; }
.btn-xs { padding: 7px 10px; font-size: 10px; }
.btn-xs svg { width: 11px; height: 11px; }
.btn-lg { padding: 14px 28px; font-size: 14px; }
.btn-full { width: 100%; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    border-bottom-width: 4px !important;
}

.btn .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.form-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
    color: var(--ash);
    letter-spacing: -0.01em;
}

.form-control {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    background: var(--white);
    transition: var(--transition);
    outline: none;
    width: 100%;
}

.form-control:focus {
    border-color: var(--green-400);
    border-bottom-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(61,154,104,.1);
}

.form-control::placeholder { color: var(--mist); font-weight: 400; }
.form-control.error { border-color: var(--error); }

select.form-control { cursor: pointer; }

.form-error {
    font-family: var(--font);
    font-size: 12px;
    color: var(--error);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--error-bg);
    border-radius: var(--radius-sm);
    border: 2px solid var(--error-border);
    border-bottom: 4px solid var(--error-border);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    overflow: hidden;
}

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
}

.toast {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    border-bottom: 3px solid transparent;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

.toast.exit { animation: toastOut 0.2s ease forwards; }

.toast-success { background: var(--success-bg); color: var(--green-700); border-color: var(--success-border); border-bottom-color: var(--green-400); }
.toast-error { background: var(--error-bg); color: #9b2c2c; border-color: var(--error-border); border-bottom-color: #feb2b2; }
.toast-info { background: var(--info-bg); color: #2b6cb0; border-color: var(--info-border); border-bottom-color: #90cdf4; }
.toast-warn { background: var(--warn-bg); color: #975a16; border-color: var(--warn-border); border-bottom-color: #f6e05e; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px) scale(0.95); }
    to { opacity: 1; transform: none; }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(20px) scale(0.95); }
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -200px;
    left: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(61,154,104,.06) 0%, transparent 70%);
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    bottom: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(92,184,130,.05) 0%, transparent 70%);
    pointer-events: none;
}

.auth-bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.04;
    filter: blur(60px);
    pointer-events: none;
}

.auth-bg-shape:nth-child(1) { width: 400px; height: 400px; background: var(--green-400); top: -100px; left: -100px; }
.auth-bg-shape:nth-child(2) { width: 350px; height: 350px; background: var(--green-300); bottom: -80px; right: -80px; }
.auth-bg-shape:nth-child(3) { width: 200px; height: 200px; background: var(--green-500); top: 40%; left: 50%; }

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border);
    border-bottom: 5px solid var(--border);
    width: 100%;
    max-width: 440px;
    padding: 42px 40px;
    position: relative;
    z-index: 1;
    animation: cardIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-md);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

.auth-card-wide { max-width: 620px; }

.auth-logo {
    text-align: center;
    margin-bottom: 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.auth-logo-frame {
    --logo-scale: 1.3;
    width: min(224px, 100%);
    aspect-ratio: 4.2 / 1;
    border-radius: 24px;
    animation: logoBob 2s ease-in-out infinite;
}

@keyframes logoBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.auth-logo-image {
    width: 100%;
    height: 100%;
}

.auth-logo-tag {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--green-700);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--ash);
    font-weight: 600;
    margin-bottom: 28px;
    line-height: 1.6;
}

.auth-subtitle strong {
    color: var(--ink);
    font-weight: 700;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-family: var(--font);
    font-size: 12px;
    color: var(--mist);
    font-weight: 600;
}

.auth-footer a {
    color: var(--green-500);
    text-decoration: none;
    font-weight: 700;
}

.auth-footer a:hover { text-decoration: underline; }

.auth-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.auth-inline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -4px 0 20px;
}

.auth-text-link {
    color: var(--green-600);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.auth-text-link:hover { text-decoration: underline; }

.auth-inline-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--green-50), #f8fffb);
    border: 1px solid var(--green-200);
    color: var(--green-700);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-cta {
    box-shadow: 0 14px 30px rgba(61,154,104,.18);
}

.auth-note-card {
    margin: 4px 0 18px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(61,154,104,.08), rgba(92,184,130,.02));
    border: 1px solid rgba(61,154,104,.16);
    color: var(--ash);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}

.role-admin {
    color: #c53030 !important;
}

.role-admin.profile-style-chip {
    background: #fff1f1;
    border-color: #fecaca;
}

.role-moderator.profile-style-chip {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c05621;
}

.auth-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.otp-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 24px 0;
}

.otp-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    color: var(--ink);
    transition: var(--transition);
    outline: none;
}

.otp-input:focus {
    border-color: var(--green-400);
    border-bottom-color: var(--green-600);
    transform: translateY(-2px);
}

.otp-input.filled {
    border-color: var(--green-500);
    border-bottom-color: var(--green-700);
    background: var(--green-50);
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    transition: var(--transition);
}

.avatar-upload-btn {
    padding: 10px 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
    color: var(--mist);
    background: var(--snow);
    transition: var(--transition);
    text-align: center;
    letter-spacing: -0.01em;
}

.avatar-upload-btn:hover {
    border-color: var(--green-400);
    color: var(--green-600);
    background: var(--green-50);
    transform: translateY(-1px);
}

.avatar-upload input[type="file"] { display: none; }

.navbar {
    background: var(--white);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.navbar-logo-frame {
    --logo-scale: 1.34;
    width: 154px;
    height: 44px;
    border-radius: 18px;
    transition: var(--transition);
}

.navbar-logo-image {
    width: 100%;
    height: 100%;
}

.navbar-logo:hover .navbar-logo-frame {
    transform: translateY(-2px);
    box-shadow: none;
}

.navbar-logo-badge {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    background: var(--green-100);
    color: var(--green-700);
    padding: 5px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

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

.nav-theme-btn {
    padding: 8px 12px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border);
    border-bottom: 3px solid var(--border);
    background: var(--surface);
    color: var(--ash);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: lowercase;
}

.nav-theme-btn:hover {
    color: var(--green-700);
    background: var(--green-50);
    border-color: var(--green-200);
    border-bottom-color: var(--green-300);
}

.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
    color: var(--mist);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    letter-spacing: -0.01em;
}

.nav-link:hover { background: var(--green-50); color: var(--green-700); }
.nav-link.active { background: var(--green-100); color: var(--green-700); border-bottom-color: var(--green-400); }

.nav-link-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-link-icon-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-link-icon-mark svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    margin-left: 4px;
}

.nav-avatar:hover { border-color: var(--green-400); transform: translateY(-2px); }

.lobby-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 24px;
}

.lobby-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.lobby-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.03em;
}

.lobby-subtitle {
    color: var(--mist);
    font-size: 15px;
    font-weight: 600;
    margin-top: 6px;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.room-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    border-bottom: 5px solid var(--border);
    padding: 24px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.room-card:hover {
    border-color: var(--green-300);
    border-bottom-color: var(--green-400);
    transform: translateY(-3px);
    border-bottom-width: 6px;
}

.room-card:active {
    transform: translateY(1px);
    border-bottom-width: 2px;
}

.room-card-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.room-card-desc {
    font-size: 13px;
    color: var(--mist);
    font-weight: 500;
    margin-bottom: 16px;
    line-height: 1.5;
    min-height: 40px;
}

.room-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--mist);
    font-weight: 600;
    flex-wrap: wrap;
}

.room-meta-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--snow);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    border: 1px solid var(--border);
    letter-spacing: -0.01em;
}

.room-meta-badge.online { color: var(--green-600); background: var(--green-50); border-color: var(--green-200); }

.room-creator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 11px;
    color: var(--mist);
    font-weight: 600;
}

.room-creator img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
    color: var(--mist);
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    background: var(--green-50);
    border-radius: 20px;
    border-bottom: 4px solid var(--green-200);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.empty-state-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--green-400);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--ash);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.empty-state-text { font-size: 13px; font-weight: 500; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,26,46,.3);
    backdrop-filter: blur(6px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.15s ease;
}

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

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border);
    border-bottom: 5px solid var(--border);
    width: 100%;
    max-width: 440px;
    padding: 36px;
    animation: modalIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to { opacity: 1; transform: none; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--ghost);
    border-bottom: 3px solid var(--border);
    background: var(--snow);
    cursor: pointer;
    font-family: var(--font-pixel);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--ash);
}

.modal-close:hover { background: var(--border); transform: translateY(-1px); }
.modal-close:active { transform: translateY(1px); border-bottom-width: 1px; }

.room-settings-note {
    margin-top: -4px;
}

.room-settings-textarea {
    min-height: 96px;
    resize: vertical;
}

.room-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.room-settings-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-self: center;
    min-height: 48px;
}

.room-settings-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 999px;
    background: var(--green-50);
    border: 1px solid var(--green-200);
    color: var(--green-700);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.chat-layout {
    height: calc(100vh - 72px);
    display: flex;
    overflow: hidden;
}

.chat-sidebar {
    width: 300px;
    border-right: 2px solid var(--border);
    background: var(--white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.chat-sidebar-header {
    padding: 16px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 8px 16px;
}

.chat-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-sidebar-section + .chat-sidebar-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.chat-sidebar-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.sidebar-section-count {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    color: var(--mist);
}

.sidebar-title {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--ash);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-rooms,
.sidebar-people {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-room-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 13px;
    color: var(--ash);
    text-decoration: none;
    border: 2px solid transparent;
    border-bottom: 3px solid transparent;
}

.sidebar-room-item:hover {
    background: var(--green-50);
    color: var(--green-700);
    border-color: var(--green-100);
    border-bottom-color: var(--green-200);
    transform: translateY(-1px);
}

.sidebar-room-item.active {
    background: var(--green-100);
    color: var(--green-700);
    border-color: var(--green-200);
    border-bottom-color: var(--green-300);
}

.sidebar-room-dot {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--green-500);
    border-bottom: 3px solid var(--green-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-pixel);
    font-size: 11px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.sidebar-room-info { flex: 1; min-width: 0; }
.sidebar-room-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; }
.sidebar-room-count { font-size: 10px; color: var(--mist); font-weight: 500; }

.sidebar-people-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 4px;
}

.sidebar-group-label {
    padding: 0 8px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    color: var(--mist);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-empty {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--snow);
    color: var(--mist);
    font-size: 12px;
    font-weight: 600;
    border: 1px dashed var(--border);
}

.sidebar-person-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.sidebar-person-item:hover {
    background: var(--green-50);
    border-color: var(--green-100);
    border-bottom-color: var(--green-200);
}

.sidebar-person-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.sidebar-person-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.sidebar-person-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.sidebar-person-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-person-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.sidebar-person-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-person-meta {
    font-size: 10px;
    color: var(--mist);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-friend-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--green-100);
    color: var(--green-700);
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar-person-btn {
    flex-shrink: 0;
}

.sidebar-person-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.presence-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--white);
    background: var(--green-500);
    box-shadow: 0 0 0 1px rgba(26,26,46,.08);
}

.presence-dot.dnd {
    background: var(--error);
}

.presence-dot.dnd::before {
    content: '';
    position: absolute;
    left: 2px;
    right: 2px;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    border-radius: 999px;
    background: white;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.chat-header {
    padding: 14px 24px;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.chat-header-info { flex: 1; }

.chat-header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chat-room-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.chat-room-desc {
    font-size: 12px;
    color: var(--mist);
    font-weight: 500;
    margin-top: 2px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scroll-behavior: smooth;
}

.message-group {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.message-group.mine { flex-direction: row-reverse; }

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-end;
    border: 2px solid var(--border);
}

.message-avatar:hover { transform: scale(1.1) translateY(-2px); border-color: var(--green-400); }

.message-content { max-width: 65%; }
.message-group.mine .message-content { align-items: flex-end; display: flex; flex-direction: column; }

.message-bubble-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.message-group.mine .message-bubble-stack {
    align-items: flex-end;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
    font-size: 11px;
}

.message-username {
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    font-size: 12px;
}

.message-username:hover { color: var(--green-600); }
.message-username.role-admin:hover { color: #9b2c2c !important; }

.message-time { color: var(--mist); font-weight: 500; font-size: 10px; }

.message-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    word-break: break-word;
    display: inline-block;
    animation: bubbleIn 0.15s ease;
    border: 2px solid transparent;
}

.message-bubble-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.message-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateY(2px);
    transition: var(--transition);
}

.message-group:hover .message-actions,
.message-group.editing .message-actions {
    opacity: 1;
    transform: none;
}

.message-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    border-bottom: 3px solid var(--border);
    background: var(--white);
    color: var(--ash);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.message-action-btn:hover {
    color: var(--green-700);
    border-color: var(--green-200);
    border-bottom-color: var(--green-300);
    transform: translateY(-1px);
}

.message-action-btn svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes bubbleIn {
    from { opacity: 0; transform: scale(0.95) translateY(4px); }
    to { opacity: 1; transform: none; }
}

.message-group:not(.mine) .message-bubble {
    background: var(--white);
    color: var(--ink);
    border-color: var(--border);
    border-bottom: 3px solid var(--border);
    border-bottom-left-radius: 4px;
}

.message-group.mine .message-bubble {
    background: var(--green-500);
    color: var(--white);
    border-bottom: 3px solid var(--green-700);
    border-bottom-right-radius: 4px;
}

.message-group.mine .message-action-btn {
    background: rgba(255,255,255,.9);
}

.message-status-note {
    font-size: 10px;
    color: var(--mist);
    font-weight: 700;
    margin-top: -2px;
}

.message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--ash);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.reaction-pill:hover {
    border-color: var(--green-200);
    color: var(--green-700);
}

.reaction-pill.active {
    background: var(--green-100);
    border-color: var(--green-300);
    color: var(--green-700);
}

.message-reaction-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 3px solid var(--border);
}

.reaction-picker-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--snow);
    cursor: pointer;
    font-size: 17px;
    transition: var(--transition);
}

.reaction-picker-btn:hover {
    transform: translateY(-1px);
    border-color: var(--green-300);
    background: var(--green-50);
}

.message-edit-box {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    background: var(--white);
    border: 2px solid var(--green-200);
    border-bottom: 4px solid var(--green-300);
}

.message-group.mine .message-edit-box {
    background: #f8fffb;
}

.message-edit-textarea {
    width: 100%;
    min-height: 84px;
    resize: vertical;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink);
    outline: none;
}

.message-edit-textarea:focus {
    border-color: var(--green-300);
}

.message-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.consecutive .message-bubble { margin-top: 2px; }
.consecutive.mine .message-bubble { border-bottom-right-radius: 4px; border-top-right-radius: 4px; }
.consecutive:not(.mine) .message-bubble { border-bottom-left-radius: 4px; border-top-left-radius: 4px; }

.system-message {
    text-align: center;
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--mist);
    font-weight: 600;
    padding: 8px 0;
    letter-spacing: -0.01em;
}

.chat-input-area {
    padding: 12px 24px 16px;
    background: var(--white);
    border-top: 2px solid var(--border);
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    transition: var(--transition);
}

.chat-input-wrapper:focus-within {
    border-color: var(--green-400);
    border-bottom-color: var(--green-500);
    background: var(--white);
}

.chat-textarea {
    flex: 1;
    border: none;
    background: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    resize: none;
    outline: none;
    max-height: 100px;
    min-height: 20px;
    line-height: 1.5;
}

.chat-textarea::placeholder { color: var(--mist); font-weight: 400; }

.chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    border-bottom: 3px solid var(--green-700);
    background: var(--green-500);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-send-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chat-send-btn:hover {
    background: var(--green-400);
    transform: translateY(-2px);
    border-bottom-width: 4px;
}

.chat-send-btn:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
}

.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.search-action-stack {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chat-char-count {
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--mist);
    font-weight: 600;
    text-align: right;
    margin-top: 4px;
    letter-spacing: -0.01em;
}

.chat-char-count.danger { color: var(--error); }

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 3px solid var(--border);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    margin-left: 42px;
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--mist);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.typing-dot {
    width: 5px;
    height: 5px;
    background: var(--green-400);
    border-radius: 50%;
    animation: typingBounce 1s ease infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; }
}

.chat-no-room {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--mist);
    text-align: center;
}

.chat-no-room-icon {
    width: 72px;
    height: 72px;
    background: var(--green-50);
    border-radius: 20px;
    border-bottom: 4px solid var(--green-200);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: iconFloat 2s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.chat-no-room-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--green-400);
    fill: none;
    stroke-width: 2;
}

.chat-no-room-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--ash);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.chat-no-room-text { font-size: 13px; font-weight: 500; line-height: 1.6; }

.dm-inbox-page {
    min-height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    background:
        radial-gradient(circle at top left, rgba(34,211,238,.08), transparent 28%),
        radial-gradient(circle at bottom right, rgba(176,137,255,.12), transparent 30%),
        var(--bg);
}

.dm-directory {
    border-right: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.78));
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    padding: 18px;
    gap: 14px;
}

:root[data-theme='dark'] .dm-directory {
    background: linear-gradient(180deg, rgba(28,22,42,.95), rgba(20,16,32,.86));
}

.dm-directory-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.dm-directory-eyebrow {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green-500);
    margin-bottom: 6px;
}

.dm-directory-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.dm-directory-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: var(--shadow-sm);
}

.dm-directory-search:focus-within {
    border-color: var(--green-300);
    border-bottom-color: var(--green-400);
}

.dm-directory-search svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--mist);
    stroke-width: 2;
    flex-shrink: 0;
}

.dm-filter-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    color: var(--ink);
    font-family: var(--font);
}

.dm-filter-input::placeholder {
    color: var(--mist);
}

.dm-directory-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(155,109,255,.1);
    color: var(--ash);
    font-size: 12px;
    font-weight: 700;
    width: fit-content;
}

.dm-directory-meta svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.dm-conversation-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 2px;
}

.dm-conversation-card {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 2px solid transparent;
    border-bottom: 4px solid transparent;
    background: rgba(255,255,255,.62);
    border-radius: 22px;
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
    color: inherit;
    font: inherit;
    outline: none;
}

:root[data-theme='dark'] .dm-conversation-card {
    background: rgba(42,31,64,.62);
}

.dm-conversation-card:hover {
    transform: translateY(-1px);
    border-color: rgba(176,137,255,.2);
    border-bottom-color: rgba(176,137,255,.32);
    box-shadow: var(--shadow-sm);
}

.dm-conversation-card.active {
    background: linear-gradient(135deg, rgba(155,109,255,.16), rgba(34,211,238,.12));
    border-color: rgba(176,137,255,.34);
    border-bottom-color: rgba(176,137,255,.52);
    box-shadow: var(--shadow-md);
}

.dm-conversation-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.dm-conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.5);
}

.dm-conversation-copy {
    min-width: 0;
    flex: 1;
}

.dm-conversation-topline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.dm-conversation-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-conversation-time {
    font-size: 11px;
    font-weight: 700;
    color: var(--mist);
    flex-shrink: 0;
}

.dm-conversation-subline {
    font-size: 11px;
    font-weight: 700;
    color: var(--green-500);
    margin-bottom: 6px;
}

.dm-conversation-preview {
    font-size: 12px;
    line-height: 1.45;
    color: var(--ash);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dm-conversation-empty {
    padding: 24px 16px;
    border-radius: 18px;
    border: 1px dashed var(--border);
    background: rgba(255,255,255,.45);
    color: var(--mist);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

:root[data-theme='dark'] .dm-conversation-empty {
    background: rgba(42,31,64,.4);
}

.dm-thread-shell {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.dm-thread-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,.68);
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
}

:root[data-theme='dark'] .dm-thread-panel {
    background: rgba(27,21,41,.78);
    border-color: rgba(255,255,255,.06);
}

.dm-thread-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    color: var(--mist);
}

.dm-thread-empty-icon {
    width: 88px;
    height: 88px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(155,109,255,.18), rgba(34,211,238,.16));
    color: var(--green-600);
    margin-bottom: 18px;
    box-shadow: var(--shadow-md);
}

.dm-thread-empty-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.dm-thread-empty-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: -0.04em;
}

.dm-thread-empty-text {
    max-width: 340px;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 600;
}

.profile-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 24px;
}

.profile-hero {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border);
    border-bottom: 5px solid var(--border);
    overflow: hidden;
    margin-bottom: 20px;
}

.profile-banner {
    height: 120px;
    background: linear-gradient(135deg, var(--green-500) 0%, var(--green-400) 50%, var(--green-300) 100%);
    position: relative;
    overflow: hidden;
}

.profile-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 4px,
        rgba(255,255,255,.04) 4px,
        rgba(255,255,255,.04) 8px
    );
}

.profile-banner-glow {
    position: absolute;
    width: 180px;
    height: 180px;
    top: -50px;
    right: 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.36), rgba(255,255,255,0));
    filter: blur(10px);
    animation: profileGlowFloat 4.2s ease-in-out infinite;
}

@keyframes profileGlowFloat {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(8px) translateX(-8px); }
}

.profile-banner-badge {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 1;
    padding: 7px 12px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    color: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.profile-info {
    padding: 0 28px 28px;
    position: relative;
}

.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-top: -44px;
    margin-bottom: 12px;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
}

.profile-avatar-presence {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--white);
    background: var(--green-500);
    box-shadow: var(--shadow-sm);
}

.profile-avatar-presence.dnd {
    background: var(--error);
}

.profile-avatar-presence.dnd::before {
    content: '';
    position: absolute;
    left: 4px;
    right: 4px;
    top: 50%;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 999px;
    background: white;
}

.profile-avatar-edit {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--green-500);
    color: white;
    border: 2px solid white;
    border-bottom: 3px solid var(--green-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.profile-avatar-edit:hover { transform: translateY(-2px); }
.profile-avatar-edit:active { transform: translateY(1px); border-bottom-width: 1px; }

.profile-avatar-edit svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-username {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--mist);
    letter-spacing: 0.03em;
    text-transform: lowercase;
    margin-bottom: 6px;
}

.profile-display-name {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.03em;
}

.profile-pronouns {
    margin-bottom: 0;
}

.profile-bio {
    font-size: 14px;
    color: var(--ash);
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 12px;
}

.profile-topline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--mist);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.profile-mini-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--green-400);
}

.profile-status {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--green-50), #f7fff9);
    border: 1px solid var(--green-200);
    color: var(--green-700);
    font-size: 13px;
    font-weight: 700;
}

.profile-presence-row {
    margin-bottom: 12px;
}

.profile-presence-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.profile-presence-chip.online {
    background: var(--green-50);
    border-color: var(--green-200);
    color: var(--green-700);
}

.profile-presence-chip.dnd {
    background: #fff5f5;
    border-color: #fed7d7;
    color: var(--error-dark);
}

.profile-presence-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    position: relative;
}

.profile-presence-dot.dnd::before {
    content: '';
    position: absolute;
    left: 1px;
    right: 1px;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    border-radius: 999px;
    background: white;
}

.profile-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-style-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    background: var(--green-100);
    color: var(--green-700);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-join {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--mist);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.profile-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.profile-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    padding: 24px;
    margin-bottom: 16px;
}

.profile-section-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.skeleton {
    background: linear-gradient(90deg, var(--ghost) 25%, var(--snow) 50%, var(--ghost) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer { to { background-position: -200% 0; } }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ghost); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border); }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-bottom: 2px solid transparent;
}

.badge-green { background: var(--green-100); color: var(--green-700); border-bottom-color: var(--green-300); }
.badge-online { background: var(--green-100); color: var(--green-600); border-bottom-color: var(--green-300); }

.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.3s ease; }

.mobile-sidebar-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-bottom: 3px solid var(--border);
    background: var(--snow);
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--green-700);
}

.mobile-sidebar-toggle:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
}

.mobile-sidebar-toggle svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

@media (max-width: 768px) {
    .auth-card { padding: 28px 20px; }
    .auth-two-col { grid-template-columns: 1fr; gap: 0; }
    .lobby-page { padding: 20px 16px; }
    .rooms-grid { grid-template-columns: 1fr; }
    .room-settings-grid { grid-template-columns: 1fr; }
    .dm-inbox-page {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 72px);
    }
    .dm-directory {
        display: none;
        position: fixed;
        inset: 72px 0 0 0;
        z-index: 70;
        border-right: none;
    }
    .dm-directory.open {
        display: flex;
    }
    .dm-thread-shell {
        padding: 0;
    }
    .dm-thread-panel {
        border-radius: 0;
        box-shadow: none;
        border: none;
        background: transparent;
        backdrop-filter: none;
    }
    .chat-sidebar { display: none; }
    .chat-sidebar.open {
        display: flex;
        position: fixed;
        inset: 72px 0 0 0;
        z-index: 50;
        width: 100%;
    }
    .navbar { padding: 0 16px; }
    .navbar-logo-frame { width: 132px; height: 38px; }
    .navbar-nav { gap: 2px; }
    .nav-link { padding: 8px 10px; }
    .navbar-logo-badge { display: none; }
    .chat-messages { padding: 16px; }
    .chat-input-area { padding: 10px 16px 14px; }
    .message-content { max-width: 78%; }
    .message-actions { opacity: 1; transform: none; }
    .chat-header {
        padding: 12px 16px;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .chat-header-meta {
        width: 100%;
        justify-content: flex-start;
        margin-left: 48px;
    }
    .chat-input-wrapper {
        padding: 10px 12px;
        gap: 8px;
    }
    .chat-textarea {
        font-size: 16px;
    }
    .sidebar-person-item {
        flex-wrap: wrap;
    }
    .sidebar-person-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .search-action-stack {
        justify-content: flex-start;
    }
    .profile-page { padding: 20px 16px; }
    .profile-info { padding: 0 20px 24px; }
    .profile-display-name { font-size: 26px; }
    .mobile-sidebar-toggle { display: flex; }
    .lobby-tabs { gap: 0; overflow-x: auto; }
    .lobby-tab { font-size: 11px; padding: 10px 14px; }
    .search-bar-wrap { margin: 0 0 16px; }
    .friend-request-card { flex-direction: column; align-items: flex-start; }
    .friend-request-actions { margin-top: 10px; }
    .navbar-inner {
        gap: 10px;
    }
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .nav-link-icon span:last-child {
        display: none;
    }
}

/* ============================================
   LOBBY TABS
   ============================================ */

.lobby-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px;
    position: relative;
}

.lobby-tab {
    flex: 1;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    color: var(--mist);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    border-bottom: 3px solid transparent;
    background: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: -0.01em;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.lobby-tab svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.lobby-tab:hover {
    color: var(--green-600);
    background: var(--green-50);
}

.lobby-tab.active {
    color: var(--green-700);
    background: var(--green-100);
    border-color: var(--green-200);
    border-bottom-color: var(--green-300);
    transform: translateY(-1px);
}

.lobby-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--green-500);
    border-radius: 3px 3px 0 0;
    animation: tabIndicatorSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tabIndicatorSlide {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.lobby-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--green-500);
    color: white;
    font-size: 10px;
    font-weight: 800;
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.lobby-tab-content {
    animation: tabContentFade 0.35s ease;
}

@keyframes tabContentFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ============================================
   SEARCH BAR
   ============================================ */

.search-bar-wrap {
    margin: 0 0 24px;
    position: relative;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar:focus-within {
    border-color: var(--green-400);
    border-bottom-color: var(--green-500);
    box-shadow: 0 4px 20px rgba(61,154,104,.12);
    transform: translateY(-2px);
}

.search-bar svg {
    width: 16px;
    height: 16px;
    stroke: var(--mist);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: var(--transition);
}

.search-bar:focus-within svg {
    stroke: var(--green-500);
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    outline: none;
}

.search-input::placeholder {
    color: var(--mist);
    font-weight: 400;
}

.search-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--green-200);
    border-top-color: var(--green-500);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.search-results {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    animation: searchResultSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
    cursor: pointer;
}

.search-result-item:nth-child(1) { animation-delay: 0ms; }
.search-result-item:nth-child(2) { animation-delay: 50ms; }
.search-result-item:nth-child(3) { animation-delay: 100ms; }
.search-result-item:nth-child(4) { animation-delay: 150ms; }
.search-result-item:nth-child(5) { animation-delay: 200ms; }

@keyframes searchResultSlideIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

.search-result-item:hover {
    border-color: var(--green-300);
    border-bottom-color: var(--green-400);
    transform: translateY(-2px);
}

.search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.search-result-username {
    font-size: 12px;
    color: var(--mist);
    font-weight: 500;
}

.search-result-points {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fbbf24;
    color: #92400e;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 800;
    margin-left: 6px;
}

.search-result-action {
    flex-shrink: 0;
}

/* ============================================
   POSTS FEED
   ============================================ */

.posts-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-create-form {
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
}

.post-create-form:focus-within {
    border-color: var(--green-300);
    border-bottom-color: var(--green-400);
    box-shadow: 0 4px 20px rgba(61,154,104,.08);
}

.post-create-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.post-create-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.post-create-prompt {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--mist);
}

.post-title-input {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    outline: none;
    margin-bottom: 10px;
    transition: var(--transition);
}

.post-title-input:focus {
    border-color: var(--green-400);
}

.post-title-input::placeholder { color: var(--mist); font-weight: 500; }

.post-content-input {
    width: 100%;
    min-height: 80px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink);
    outline: none;
    resize: vertical;
    transition: var(--transition);
}

.post-content-input:focus {
    border-color: var(--green-400);
}

.post-content-input::placeholder { color: var(--mist); }

.post-create-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.post-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.2s ease;
    animation: postSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.post-card:nth-child(2) { animation-delay: 60ms; }
.post-card:nth-child(3) { animation-delay: 120ms; }
.post-card:nth-child(4) { animation-delay: 180ms; }
.post-card:nth-child(5) { animation-delay: 240ms; }

@keyframes postSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

.post-card:hover {
    border-color: var(--green-200);
    border-bottom-color: var(--green-300);
    transform: translateY(-2px);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.post-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.post-author-avatar:hover {
    border-color: var(--green-400);
    transform: scale(1.08);
}

.post-author-info { flex: 1; min-width: 0; }

.post-author-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: var(--ink);
    cursor: pointer;
}

.post-author-name:hover { color: var(--green-600); }

.post-author-meta {
    font-size: 11px;
    color: var(--mist);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.post-title.victory-title {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-content {
    font-size: 14px;
    color: var(--ash);
    line-height: 1.6;
    font-weight: 500;
}

.post-victory-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fbbf24;
    color: #92400e;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 10px;
    animation: victoryShine 2s ease infinite;
}

@keyframes victoryShine {
    0%, 100% { box-shadow: 0 0 0 rgba(251,191,36,0); }
    50% { box-shadow: 0 0 20px rgba(251,191,36,.3); }
}

/* ============================================
   FRIEND REQUESTS
   ============================================ */

.friends-section {
    margin-bottom: 24px;
}

.friends-section-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--ash);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.friends-section-title .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 11px;
    font-weight: 800;
}

.friend-request-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: all 0.2s ease;
    animation: friendRequestSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.friend-request-card.incoming {
    border-left: 4px solid var(--green-400);
    animation: pulseGlow 3s ease infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(61,154,104,0); }
    50% { box-shadow: 0 0 16px rgba(61,154,104,.12); }
}

@keyframes friendRequestSlide {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: none; }
}

.friend-request-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.friend-request-info {
    flex: 1;
    min-width: 0;
}

.friend-request-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: var(--ink);
}

.friend-request-sub {
    font-size: 12px;
    color: var(--mist);
    font-weight: 500;
}

.friend-request-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.friend-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.friend-card:hover {
    border-color: var(--green-300);
    border-bottom-color: var(--green-400);
    transform: translateY(-2px);
}

.friend-card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.friend-card-info { flex: 1; min-width: 0; }

.friend-card-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
}

.friend-card-meta {
    font-size: 11px;
    color: var(--mist);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.friend-card-points {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fbbf24;
    color: #92400e;
    font-size: 10px;
    font-weight: 800;
}

/* ============================================
   ROOM MODE BADGES
   ============================================ */

.room-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.room-mode-badge.battle {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fca5a5;
    color: #b91c1c;
    animation: battlePulse 2s ease infinite;
}

@keyframes battlePulse {
    0%, 100% { box-shadow: 0 0 0 rgba(185,28,28,0); }
    50% { box-shadow: 0 0 12px rgba(185,28,28,.15); }
}

.room-mode-badge.spectate {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.room-mode-badge.free_roast {
    background: var(--green-50);
    border: 1px solid var(--green-200);
    color: var(--green-700);
}

.room-access-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
}

.room-access-badge svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.room-access-badge.private {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
}

.room-access-badge.public {
    background: var(--green-50);
    border: 1px solid var(--green-200);
    color: var(--green-600);
}

.room-card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* ============================================
   BATTLE MODE UI
   ============================================ */

.battle-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(185,28,28,.06), rgba(239,68,68,.04));
    border-bottom: 2px solid rgba(185,28,28,.1);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: #b91c1c;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.battle-team-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 800;
}

.battle-team-label.team_a {
    background: #fee2e2;
    color: #b91c1c;
}

.battle-team-label.team_b {
    background: #dbeafe;
    color: #1e40af;
}

.battle-vs {
    font-size: 16px;
    font-weight: 900;
    color: var(--ash);
    animation: vsGlow 1.5s ease infinite;
}

@keyframes vsGlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.battle-winner-btn {
    animation: winnerButtonPulse 2s ease infinite;
}

@keyframes winnerButtonPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(185,28,28,.2); }
    50% { box-shadow: 0 0 20px 4px rgba(185,28,28,.15); }
}

.battle-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(8px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.battle-result-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border);
    border-bottom: 6px solid var(--border);
    padding: 48px 40px;
    text-align: center;
    max-width: 400px;
    animation: battleResultPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes battleResultPop {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.battle-result-trophy {
    font-size: 64px;
    margin-bottom: 16px;
    animation: trophyBounce 0.8s ease infinite alternate;
}

@keyframes trophyBounce {
    from { transform: translateY(0) rotate(-5deg); }
    to { transform: translateY(-10px) rotate(5deg); }
}

.battle-result-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.battle-result-sub {
    font-size: 14px;
    color: var(--ash);
    font-weight: 500;
}

/* ============================================
   SPECTATE MODE UI
   ============================================ */

.spectate-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(30,64,175,.06), rgba(59,130,246,.04));
    border-bottom: 2px solid rgba(30,64,175,.1);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.spectate-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(30,64,175,.06), rgba(59,130,246,.03));
    border: 1px solid rgba(30,64,175,.12);
    border-radius: var(--radius-md);
    margin: 8px 24px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: #1e40af;
}

.spectate-input-blocked {
    pointer-events: none;
    opacity: 0.5;
    position: relative;
}

.spectate-input-blocked::after {
    content: 'spectators can only watch';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--mist);
}

/* ============================================
   ROOM CREATION MODAL EXTRAS
   ============================================ */

.room-mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.room-mode-option {
    padding: 14px 10px;
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: var(--font-display);
}

.room-mode-option:hover {
    border-color: var(--green-300);
    transform: translateY(-2px);
}

.room-mode-option.active {
    border-color: var(--green-400);
    border-bottom-color: var(--green-500);
    background: var(--green-50);
}

.room-mode-option.active.battle {
    border-color: #fca5a5;
    border-bottom-color: #ef4444;
    background: #fef2f2;
}

.room-mode-option.active.spectate {
    border-color: #93c5fd;
    border-bottom-color: #3b82f6;
    background: #eff6ff;
}

.room-mode-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.room-mode-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
}

.room-mode-desc {
    font-size: 9px;
    color: var(--mist);
    font-weight: 500;
    margin-top: 2px;
}

.room-access-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.room-access-option {
    padding: 14px 12px;
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: var(--font-display);
}

.room-access-option:hover {
    border-color: var(--green-300);
    transform: translateY(-1px);
}

.room-access-option.active {
    border-color: var(--green-400);
    border-bottom-color: var(--green-500);
    background: var(--green-50);
}

.room-access-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.room-access-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
}

.room-access-desc {
    font-size: 9px;
    color: var(--mist);
    font-weight: 500;
    margin-top: 2px;
}

/* ============================================
   ENHANCED REACTION PICKER
   ============================================ */

.message-reaction-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 3px solid var(--border);
}

.reaction-picker-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--snow);
    cursor: pointer;
    font-size: 17px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-picker-btn:hover {
    transform: translateY(-3px) scale(1.2);
    border-color: var(--green-300);
    background: var(--green-50);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.reaction-picker-btn:active {
    transform: scale(0.9);
}

/* ============================================
   PRIVATE ROOM JOIN
   ============================================ */

.private-room-gate {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    animation: gateAppear 0.4s ease;
}

@keyframes gateAppear {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: none; }
}

.private-room-lock {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #fbbf24;
    border-bottom: 5px solid #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: lockBounce 1.5s ease-in-out infinite;
}

@keyframes lockBounce {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-8px) rotate(-3deg); }
}

.private-room-lock svg {
    width: 32px;
    height: 32px;
    stroke: #92400e;
    fill: none;
    stroke-width: 2;
}

.private-room-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
}

.private-room-text {
    font-size: 14px;
    color: var(--mist);
    font-weight: 500;
    margin-bottom: 20px;
}

.request-pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    background: var(--green-50);
    border: 2px solid var(--green-200);
    color: var(--green-700);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    animation: pendingPulse 2s ease infinite;
}

@keyframes pendingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(61,154,104,.15); }
    50% { box-shadow: 0 0 16px 4px rgba(61,154,104,.1); }
}



/* ============================================
   POINTS DISPLAY
   ============================================ */

.points-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fbbf24;
    color: #92400e;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
}

.points-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
}

/* ============================================
   ENHANCED ROOM CARD
   ============================================ */

.room-card {
    animation: roomCardIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.room-card:nth-child(1) { animation-delay: 0ms; }
.room-card:nth-child(2) { animation-delay: 60ms; }
.room-card:nth-child(3) { animation-delay: 120ms; }
.room-card:nth-child(4) { animation-delay: 180ms; }
.room-card:nth-child(5) { animation-delay: 240ms; }
.room-card:nth-child(6) { animation-delay: 300ms; }

@keyframes roomCardIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

/* shake animation for errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.shake { animation: shake 0.4s ease; }

/* ============= NAVBAR SEARCH ============= */
.navbar-search-wrap {
    position: relative;
    flex: 1;
    max-width: 360px;
    margin: 0 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 22px;
    padding: 6px 14px;
    transition: all 0.25s ease;
    flex: 1;
    min-width: 0;
}
.navbar-search:focus-within {
    background: rgba(255,255,255,0.14);
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px rgba(74,222,128,0.15);
}
.navbar-search svg {
    width: 16px;
    height: 16px;
    stroke: var(--mist);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}
.navbar-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    width: 100%;
}
.navbar-search-input::placeholder {
    color: var(--mist);
    opacity: 0.7;
}
.navbar-search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    max-height: 340px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    animation: dropdownSlide 0.2s ease;
}
@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.navbar-friend-badge {
    position: relative;
}
.navbar-friend-badge .lobby-tab-badge {
    position: absolute;
    top: -8px;
    right: -8px;
}

/* ============= POST REACTIONS ============= */
.post-reactions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-wrap: wrap;
}
.post-reactions-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.post-reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}
.post-reaction-pill:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
    transform: scale(1.08);
}
.post-reaction-pill.active {
    background: rgba(74,222,128,0.15);
    border-color: var(--green-400);
}
.post-reaction-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--mist);
}
.post-reaction-pill.active .post-reaction-count {
    color: var(--green-400);
}
.post-emoji-picker-wrap {
    position: relative;
    margin-left: auto;
}
.post-add-reaction-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px dashed rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    color: var(--mist);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.post-add-reaction-btn:hover {
    background: rgba(74,222,128,0.12);
    border-color: var(--green-400);
    color: var(--green-400);
    transform: rotate(90deg);
}
.post-emoji-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    width: 220px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px) scale(0.95);
    transition: all 0.2s ease;
}
.post-emoji-picker.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}
.post-emoji-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.post-emoji-btn:hover {
    background: rgba(74,222,128,0.15);
    transform: scale(1.25);
}

/* small button variants */
.btn-xs {
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 8px;
    font-weight: 700;
}
.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.12);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.14);
}
.badge-green {
    background: rgba(74,222,128,0.15);
    color: var(--green-400);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .navbar-search-wrap { display: none; }
}

/* ============================================
   GIPHY PICKER & INLINE GIF MESSAGES
   ============================================ */

.chat-gif-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--ash);
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}

.chat-gif-btn:hover {
    background: var(--green-50);
    border-color: var(--green-300);
    color: var(--green-600);
}

.gif-picker-panel {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(100% - 6px);
    max-height: min(380px, 55vh);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 -8px 32px rgba(0,0,0,.12);
    z-index: 60;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gif-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--snow);
}

.gif-picker-tabs {
    display: flex;
    gap: 4px;
}

.gif-picker-tab {
    padding: 5px 14px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mist);
    cursor: pointer;
    transition: var(--transition);
}

.gif-picker-tab.active {
    background: var(--green-500);
    border-color: var(--green-500);
    color: var(--white);
}

.gif-picker-tab:hover:not(.active) {
    border-color: var(--green-300);
    color: var(--green-600);
}

.gif-picker-close {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--ghost);
    color: var(--ash);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.gif-picker-close:hover {
    background: var(--error);
    color: var(--white);
}

.gif-picker-search {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.gif-search-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: var(--snow);
    font-family: var(--font);
    font-size: 13px;
    color: var(--ink);
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.gif-search-input:focus {
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px rgba(131,58,180,.08);
}

.gif-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: 260px;
}

.gif-picker-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    aspect-ratio: 1;
    background: var(--ghost);
    transition: transform 0.15s ease;
}

.gif-picker-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    z-index: 2;
}

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

.gif-picker-loading,
.gif-picker-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--mist);
    font-size: 13px;
    font-weight: 600;
}

.gif-picker-powered {
    padding: 6px 12px;
    text-align: center;
    font-size: 10px;
    color: var(--mist);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-top: 1px solid var(--border);
    background: var(--snow);
}

.message-gif {
    max-width: 280px;
    max-height: 220px;
    border-radius: 10px;
    display: block;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.message-gif:hover {
    transform: scale(1.02);
}

.message-bubble:has(.message-gif) {
    padding: 4px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.chat-composer-shell {
    position: relative;
    flex-shrink: 0;
    z-index: 20;
}

.chat-input-area {
    position: relative;
}

/* ============================================
   COLORFUL VIBES BACKGROUND SYSTEM
   Floating text words, Instagram gradient waves,
   multicolor blob accents. Clean UI on top.
   ============================================ */

/* --- Floating Background Text Container --- */
.vibes-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.vibes-word {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0;
    pointer-events: none;
    user-select: none;
    will-change: transform, opacity;
    animation: vibesFloat var(--vibe-dur, 14s) var(--vibe-delay, 0s) ease-in-out infinite;
    color: var(--vibe-color, var(--accent-cyan));
    font-size: var(--vibe-size, 28px);
    left: var(--vibe-x, 10%);
    top: var(--vibe-y, 20%);
    transform: rotate(var(--vibe-rot, -8deg));
}

@keyframes vibesFloat {
    0%   { opacity: 0; transform: rotate(var(--vibe-rot, -8deg)) translateY(30px) scale(0.8); }
    12%  { opacity: var(--vibe-opacity, 0.16); transform: rotate(var(--vibe-rot, -8deg)) translateY(0) scale(1); }
    50%  { opacity: var(--vibe-opacity, 0.16); transform: rotate(var(--vibe-rot, -8deg)) translateY(-15px) scale(1.04); }
    88%  { opacity: var(--vibe-opacity, 0.16); transform: rotate(var(--vibe-rot, -8deg)) translateY(5px) scale(0.98); }
    100% { opacity: 0; transform: rotate(var(--vibe-rot, -8deg)) translateY(30px) scale(0.8); }
}

/* --- Instagram Gradient Wave --- */
.vibes-wave {
    position: fixed;
    bottom: 0;
    left: -10%;
    right: -10%;
    height: 45%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.22;
    background: linear-gradient(
        135deg,
        #833ab4 0%,
        #fd1d1d 25%,
        #fcb045 50%,
        #f77737 75%,
        #c13584 100%
    );
    background-size: 300% 300%;
    animation: igWaveShift 12s ease-in-out infinite;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23fff' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,181.3C960,203,1056,213,1152,197.3C1248,181,1344,139,1392,117.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23fff' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,181.3C960,203,1056,213,1152,197.3C1248,181,1344,139,1392,117.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    will-change: background-position;
}

@keyframes igWaveShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Second wave, upper, different angle --- */
.vibes-wave-2 {
    position: fixed;
    top: 0;
    left: -10%;
    right: -10%;
    height: 35%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.16;
    background: linear-gradient(
        225deg,
        #405de6 0%,
        #5851db 20%,
        #833ab4 40%,
        #c13584 60%,
        #e1306c 80%,
        #fd1d1d 100%
    );
    background-size: 300% 300%;
    animation: igWaveShift2 16s ease-in-out infinite;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23fff' d='M0,96L48,112C96,128,192,160,288,170.7C384,181,480,171,576,144C672,117,768,75,864,74.7C960,75,1056,117,1152,133.3C1248,149,1344,139,1392,133.3L1440,128L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23fff' d='M0,96L48,112C96,128,192,160,288,170.7C384,181,480,171,576,144C672,117,768,75,864,74.7C960,75,1056,117,1152,133.3C1248,149,1344,139,1392,133.3L1440,128L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    will-change: background-position;
}

@keyframes igWaveShift2 {
    0%   { background-position: 100% 50%; }
    50%  { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* --- Floating Color Blobs --- */
.vibes-blob {
    position: fixed;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    pointer-events: none;
    z-index: 0;
    will-change: transform, border-radius;
    filter: blur(80px);
}

.vibes-blob-1 {
    top: -80px;
    right: -60px;
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, rgba(131,58,180,.25), rgba(253,29,29,.18));
    animation: blobMorph1 14s ease-in-out infinite;
}

.vibes-blob-2 {
    bottom: -100px;
    left: -80px;
    width: 400px;
    height: 400px;
    background: linear-gradient(225deg, rgba(252,176,69,.22), rgba(247,119,55,.18));
    animation: blobMorph2 18s ease-in-out infinite;
}

.vibes-blob-3 {
    top: 40%;
    left: 60%;
    width: 250px;
    height: 250px;
    background: linear-gradient(180deg, rgba(64,93,230,.18), rgba(193,53,132,.14));
    animation: blobMorph3 20s ease-in-out infinite;
}

@keyframes blobMorph1 {
    0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: translate(0,0) rotate(0deg); }
    33%  { border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%; transform: translate(25px,15px) rotate(5deg); }
    66%  { border-radius: 70% 30% 50% 50% / 40% 70% 30% 60%; transform: translate(-15px,30px) rotate(-3deg); }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: translate(0,0) rotate(0deg); }
}

@keyframes blobMorph2 {
    0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translate(0,0) rotate(0deg); }
    50%  { border-radius: 40% 60% 70% 30% / 30% 70% 40% 60%; transform: translate(35px,-25px) rotate(6deg); }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translate(0,0) rotate(0deg); }
}

@keyframes blobMorph3 {
    0%   { border-radius: 40% 60% 60% 40% / 50% 50% 50% 50%; transform: translate(0,0) rotate(0deg); }
    33%  { border-radius: 60% 40% 40% 60% / 40% 60% 40% 60%; transform: translate(-20px,20px) rotate(-4deg); }
    66%  { border-radius: 50% 50% 60% 40% / 60% 40% 60% 40%; transform: translate(15px,-10px) rotate(3deg); }
    100% { border-radius: 40% 60% 60% 40% / 50% 50% 50% 50%; transform: translate(0,0) rotate(0deg); }
}

/* --- Ensure page content sits above backgrounds --- */
#app {
    position: relative;
    z-index: 1;
}

/* --- Subtle chromatic aberration on hover (titles only) --- */
.lobby-title,
.auth-title,
.profile-display-name,
.chat-room-name {
    transition: text-shadow 0.2s ease;
}

.lobby-title:hover,
.auth-title:hover,
.profile-display-name:hover {
    text-shadow:
        -1.5px 0 0 rgba(131,58,180,.3),
         1.5px 0 0 rgba(253,29,29,.25);
}




/* --- Active Nav Link: Multicolor underline --- */
.nav-link.active {
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, #833ab4, #fd1d1d, #fcb045);
    border-radius: 3px;
    animation: underlineDraw 0.4s ease forwards;
}

@keyframes underlineDraw {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* --- Active Tab Multicolor Gradient Bar --- */
.lobby-tab.active::after {
    background: linear-gradient(90deg, #833ab4, var(--green-500), #fcb045) !important;
}

/* --- Post Card Hover: Subtle Color Border Shift --- */
.post-card:hover {
    border-color: rgba(131,58,180,.15) !important;
    border-bottom-color: rgba(253,29,29,.18) !important;
    box-shadow:
        -2px 0 0 rgba(131,58,180,.05),
         2px 0 0 rgba(253,29,29,.05),
        0 8px 24px rgba(0,0,0,.06);
}

/* --- Room Card Hover: Multicolor Border Glow --- */
.room-card:hover {
    border-color: rgba(253,29,29,.12) !important;
    border-bottom-color: rgba(131,58,180,.18) !important;
    box-shadow:
        -1px 0 0 rgba(131,58,180,.06),
         1px 0 0 rgba(253,29,29,.06),
        0 6px 20px rgba(0,0,0,.06);
}

/* --- Auth page: Instagram gradient accents in background --- */
.auth-page {
    background-image:
        radial-gradient(circle at 15% 85%, rgba(131,58,180,.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(253,29,29,.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(252,176,69,.03) 0%, transparent 40%);
}

/* --- Profile Banner: Gradient with color pop --- */
.profile-banner {
    background: linear-gradient(
        135deg,
        var(--green-500) 0%,
        var(--green-400) 40%,
        var(--green-300) 70%,
        rgba(131,58,180,.25) 100%
    ) !important;
}

/* --- Battle VS Text: color split --- */
.battle-vs {
    text-shadow:
        -2px 0 0 rgba(131,58,180,.4),
         2px 0 0 rgba(253,29,29,.4);
    letter-spacing: 0.1em;
}

/* --- Scrollbar: subtle gradient --- */
::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        var(--ghost) 0%,
        rgba(131,58,180,.1) 50%,
        rgba(253,29,29,.08) 100%
    ) !important;
}

/* --- Ink Drip Loader Animation (kept) --- */
.loader-ink-drips {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    pointer-events: none;
    overflow: hidden;
}

.ink-drip {
    position: absolute;
    left: var(--drip-x, 50%);
    top: -10px;
    width: 6px;
    height: 6px;
    background: var(--green-500);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: inkDripFall 1.8s var(--drip-delay, 0s) ease-in infinite;
    opacity: 0.6;
}

.ink-drip::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, var(--green-500));
    transform: translateX(-50%);
    opacity: 0.4;
}

@keyframes inkDripFall {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 0.6; }
    60% { transform: translateY(50px) scale(1, 1.3); opacity: 0.6; }
    80% { transform: translateY(55px) scale(1.8, 0.4); opacity: 0.3; }
    100% { transform: translateY(55px) scale(2.5, 0.1); opacity: 0; }
}

/* --- Page Transition Glitch (subtle, no filter) --- */
#app.page-glitch {
    animation: pageGlitch 0.2s ease forwards;
}

@keyframes pageGlitch {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-2px, 1px); }
    50%  { transform: translate(1px, -1px); }
    75%  { transform: translate(-1px, 0px); }
    100% { transform: translate(0, 0); }
}

/* --- Reduced Motion: Respect Accessibility --- */
@media (prefers-reduced-motion: reduce) {
    .vibes-word,
    .vibes-wave,
    .vibes-wave-2,
    .vibes-blob {
        animation: none !important;
        opacity: 0.03 !important;
    }

    #app.page-glitch {
        animation: none !important;
    }

    .ink-drip {
        display: none;
    }
}

/* ===========================================
   NOTIFICATION BELL
   =========================================== */
.notification-bell-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--mist);
    padding: 6px;
    border-radius: var(--radius-full);
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell-btn:hover {
    color: var(--green-600);
    background: var(--green-50);
}

.notification-bell-btn.has-notifications {
    animation: bellWiggle 1s ease-in-out;
}

@keyframes bellWiggle {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(12deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(6deg); }
    80% { transform: rotate(-4deg); }
}

.notification-bell-btn svg {
    fill: none;
    stroke: currentColor;
}

.notification-bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    background: #e53e3e;
    color: white;
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--white);
    line-height: 1;
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.notif-header {
    padding: 14px 16px 8px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--ash);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}

.notif-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--mist);
    font-size: 13px;
    font-weight: 600;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ghost);
    transition: var(--transition);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--snow);
}

.notif-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.notif-info {
    flex: 1;
    min-width: 0;
}

.notif-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-sub {
    font-size: 11px;
    color: var(--mist);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* ===========================================
   INVITE BUTTON
   =========================================== */
.navbar-invite-btn {
    background: var(--green-100);
    border: 2px solid var(--green-300);
    border-radius: var(--radius-full);
    color: var(--green-600);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-left: 6px;
    flex-shrink: 0;
}

.navbar-invite-btn:hover {
    background: var(--green-200);
    border-color: var(--green-400);
    color: var(--green-700);
    transform: translateY(-1px);
}

.navbar-invite-btn:active {
    transform: translateY(1px);
}

.navbar-invite-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.navbar-invite-btn svg {
    fill: none;
    stroke: currentColor;
}

/* ===========================================
   @MENTION TAG
   =========================================== */
.mention-tag {
    color: var(--green-500);
    font-weight: 700;
    cursor: pointer;
    background: var(--green-50);
    padding: 1px 5px;
    border-radius: 6px;
    border: 1px solid var(--green-200);
    transition: var(--transition);
    font-size: 0.95em;
}

.mention-tag:hover {
    background: var(--green-100);
    border-color: var(--green-400);
    color: var(--green-700);
}

/* ===========================================
   SHARE POST TO ROOM
   =========================================== */
.post-share-btn {
    background: none;
    border: none;
    color: var(--mist);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-full);
    transition: var(--transition);
    margin-left: auto;
    flex-shrink: 0;
}

.post-share-btn:hover {
    color: var(--green-500);
    background: var(--green-50);
}

.post-share-btn svg {
    fill: none;
    stroke: currentColor;
    display: block;
}

.share-room-list {
    max-height: 300px;
    overflow-y: auto;
}

.share-room-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--ghost);
}

.share-room-item:last-child {
    border-bottom: none;
}

.share-room-item:hover {
    background: var(--green-50);
}

.share-room-dot {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--green-100);
    color: var(--green-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.share-room-info {
    flex: 1;
    min-width: 0;
}

.share-room-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-room-meta {
    font-size: 11px;
    color: var(--mist);
    font-weight: 600;
}

/* ===========================================
   SHARED POST CARD (in chat messages)
   =========================================== */
.shared-post-card {
    background: var(--green-50);
    border: 1.5px solid var(--green-200);
    border-left: 3px solid var(--green-400);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ash);
}

/* ===========================================
   COMPACT MODAL VARIANT
   =========================================== */
.modal-compact .form-group {
    margin-bottom: 14px;
}

.modal-compact .form-label {
    font-size: 11px;
}

.modal-compact .form-control {
    padding: 9px 13px;
    font-size: 13px;
}

.modal-compact .room-mode-selector,
.modal-compact .room-access-selector {
    gap: 8px;
}

.modal-compact .room-mode-option,
.modal-compact .room-access-option {
    padding: 10px 8px;
}

.modal-compact .room-mode-icon,
.modal-compact .room-access-icon {
    font-size: 18px;
}

.modal-compact .room-mode-label,
.modal-compact .room-access-label {
    font-size: 11px;
}

.modal-compact .room-mode-desc,
.modal-compact .room-access-desc {
    font-size: 9px;
}

.modal-compact .room-settings-grid {
    gap: 10px;
}

.modal-compact .room-settings-textarea {
    min-height: 50px;
}

.modal-compact .modal-header {
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.modal-compact .modal-title {
    font-size: 16px;
}

/* ===========================================
   GIF MESSAGE STYLING FIX
   =========================================== */
.message-gif {
    max-width: 280px;
    max-height: 240px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: block;
    object-fit: contain;
}

@media (max-width: 768px) {
    .notification-dropdown {
        width: 280px;
        right: -40px;
    }

    .navbar-invite-btn {
        padding: 5px;
    }

    .gif-picker-panel {
        left: 8px;
        right: 8px;
        bottom: calc(100% - 2px);
        max-height: min(320px, 50vh);
    }
}

/* ===========================================
   @ MENTION AUTOCOMPLETE DROPDOWN
   =========================================== */
.mention-autocomplete {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: var(--white);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 150;
    animation: dropdownSlide 0.15s ease;
}

.mention-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--ghost);
}

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

.mention-option:hover,
.mention-option.selected {
    background: var(--green-50);
}

.mention-option.selected {
    border-left: 3px solid var(--green-400);
}

.mention-option-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border);
    flex-shrink: 0;
}

.mention-option-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.mention-option-name {
    font-weight: 700;
    font-size: 12px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-option-handle {
    font-size: 11px;
    color: var(--green-500);
    font-weight: 600;
}

/* ===========================================
   NOTIFICATION TYPE ICONS
   =========================================== */
.notif-type-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

.notif-mention {
    background: linear-gradient(135deg, var(--green-100), var(--green-200));
    color: var(--green-700);
}

.notif-friend {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.notif-post {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #be185d;
}

.notif-system {
    background: var(--ghost);
    color: var(--ash);
}

.notif-item.notif-unread {
    background: var(--green-50);
    border-left: 3px solid var(--green-400);
}

.notif-read-all-btn {
    background: none;
    border: none;
    color: var(--green-500);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-left: 8px;
}

.notif-read-all-btn:hover {
    background: var(--green-100);
    color: var(--green-700);
}

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