/* ============================================================
   PhantomTalk v3.0 - Obsidian Black Edition
   Premium dark theme · Glassmorphism · refined typography
   Code unchanged - only visual layer rewritten
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    /* Obsidian Black Palette - tiefer, edler Schwarz-Ton */
    --bg-void: #050505;
    --bg-deep: #0a0a0c;
    --bg-base: #0f0f12;
    --bg-elevated: #16161a;
    --bg-card: rgba(20, 20, 24, 0.6);
    --bg-card-solid: #14141a;
    --bg-input: rgba(0, 0, 0, 0.4);
    --bg-hover: rgba(255, 255, 255, 0.04);

    /* Crimson accents - feiner, edler */
    --crimson-darkest: #2a060c;
    --crimson-dark: #4a0a14;
    --crimson: #8b0a2a;
    --crimson-bright: #dc143c;
    --crimson-glow: #ff1f4d;
    --crimson-hot: #ff3d6e;
    --crimson-pale: #ff8da3;

    /* Neutrale Text-Farben */
    --text-primary: #f5f5f7;
    --text-secondary: #a8a8b3;
    --text-muted: #6b6b75;
    --text-faint: #424248;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.1);
    --border-bright: rgba(255, 61, 110, 0.5);
    --border-crimson: rgba(220, 20, 60, 0.3);

    /* Shadows - edler, tiefer */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.7), 0 8px 16px rgba(0, 0, 0, 0.4);
    --shadow-glow-crimson: 0 0 32px rgba(220, 20, 60, 0.25), 0 0 60px rgba(220, 20, 60, 0.1);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.04);

    /* Radien */
    --r-xs: 4px;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --r-2xl: 28px;
    --r-full: 9999px;

    /* Transitions */
    --t-fast: 0.12s cubic-bezier(0.4, 0, 0.2, 1);
    --t-med: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --t-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-void);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
    font-feature-settings: 'ss01', 'cv11';
}

/* Tiefer, edler Hintergrund mit subtilen Schatten-Verläufen */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(220, 20, 60, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 100% 100%, rgba(139, 10, 42, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 100% 50% at 0% 50%, rgba(40, 6, 12, 0.4) 0%, transparent 70%),
        linear-gradient(180deg, var(--bg-void) 0%, var(--bg-deep) 100%);
    z-index: -3;
}

/* Background Layer Stack */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    will-change: transform;
}

#bg-base { z-index: -10; display: none; } /* Canvas übernimmt */
#bg-canvas { z-index: -9; }
#bg-orbs {
    z-index: -8;
    background:
        radial-gradient(circle 500px at 15% 25%, rgba(220, 20, 60, 0.06) 0%, transparent 70%),
        radial-gradient(circle 600px at 85% 75%, rgba(139, 10, 42, 0.08) 0%, transparent 70%),
        radial-gradient(circle 400px at 60% 50%, rgba(255, 31, 77, 0.04) 0%, transparent 70%);
    animation: orbDrift 40s ease-in-out infinite alternate;
}

@keyframes orbDrift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-4%, 3%) scale(1.08); }
    100% { transform: translate(3%, -4%) scale(0.96); }
}

/* ===== GLOBAL NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2rem;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo .bracket {
    color: var(--crimson-hot);
    text-shadow: 0 0 12px rgba(255, 61, 110, 0.6);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.45rem 0.9rem;
    border-radius: var(--r-md);
    transition: all var(--t-fast);
}

.nav-links a:hover {
    color: var(--crimson-hot);
    background: var(--bg-hover);
}

.nav-links .nav-cta {
    background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-bright) 100%);
    color: #fff !important;
    font-weight: 600;
    padding: 0.45rem 1.2rem;
    margin-left: 0.5rem;
    box-shadow: 0 0 16px rgba(220, 20, 60, 0.3);
}

.nav-links .nav-cta:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 0 28px rgba(220, 20, 60, 0.5);
}

@media (max-width: 600px) {
    .navbar { padding: 0.7rem 1rem; }
    .nav-links a:not(.nav-cta) { display: none; }
}

#bg-vignette {
    z-index: -7;
    background: radial-gradient(ellipse at center, transparent 25%, rgba(0, 0, 0, 0.75) 100%);
}

#bg-scanlines {
    z-index: -6;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 2px,
        rgba(255, 255, 255, 0.008) 2px,
        rgba(255, 255, 255, 0.008) 4px
    );
    mix-blend-mode: overlay;
}

#bg-noise {
    z-index: -5;
    opacity: 0.025;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='1'/></svg>");
    mix-blend-mode: overlay;
    animation: noiseShift 0.4s steps(4) infinite;
}

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

#bg-flicker {
    z-index: -4;
    background: radial-gradient(ellipse at center, rgba(220, 20, 60, 0.018) 0%, transparent 60%);
    animation: flicker 6s ease-in-out infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 0.6; }
    33%      { opacity: 1; }
    66%      { opacity: 0.8; }
}

.bg-pulse { display: none; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
    padding-top: 4.5rem;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   HEADER - Premium Cards
   ============================================================ */
header {
    text-align: center;
    padding: 1.75rem 1.5rem 1.25rem;
    margin-bottom: 1.25rem;
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-md), var(--shadow-inset);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 61, 110, 0.4) 50%, transparent 100%);
}

h1 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    text-transform: lowercase;
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, #ffffff 0%, #ff8da3 50%, #dc143c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(255, 61, 110, 0.3));
}

.logo-bracket {
    color: var(--crimson-bright);
    -webkit-text-fill-color: var(--crimson-bright);
    opacity: 0.4;
    font-weight: 300;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.status-bar {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border-subtle);
}

.phantom-id, .room-info {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.35rem 0.8rem;
    background: var(--bg-input);
    border-radius: var(--r-full);
    border: 1px solid var(--border-subtle);
    transition: all var(--t-fast);
    font-size: 0.78rem;
}

.phantom-id:hover, .room-info:hover {
    border-color: var(--border);
    background: var(--bg-hover);
}

.phantom-id strong, .room-info strong {
    color: var(--crimson-hot);
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 61, 110, 0.4);
    margin-left: 0.2rem;
}

/* ============================================================
   BUTTONS - refined premium feel
   ============================================================ */
.ghost-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.4rem 0.9rem;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--r-full);
    transition: all var(--t-fast);
    backdrop-filter: blur(10px);
    letter-spacing: 0.01em;
}

.ghost-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-bright);
    color: var(--crimson-hot);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 61, 110, 0.15);
}

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

.primary-btn {
    background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-bright) 50%, var(--crimson-glow) 100%);
    border: none;
    color: #fff;
    padding: 0.55rem 1.4rem;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--r-full);
    box-shadow: 0 4px 14px rgba(220, 20, 60, 0.4), var(--shadow-inset);
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--t-fast);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255, 31, 77, 0.5), var(--shadow-inset);
}

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

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

/* ============================================================
   ROOM BADGE + PRIVATE ACTIONS
   ============================================================ */
.room-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--crimson-glow) 0%, var(--crimson-bright) 100%);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    margin-left: 0.4rem;
    border-radius: var(--r-full);
    letter-spacing: 0.14em;
    text-shadow: none;
    box-shadow: 0 0 12px rgba(255, 31, 77, 0.5);
    vertical-align: middle;
    text-transform: uppercase;
}

.private-actions {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    margin-left: 0.5rem;
}

/* ============================================================
   SECURITY BADGE (MIL-SPEC Indicator)
   ============================================================ */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    background: linear-gradient(135deg, rgba(0, 200, 100, 0.12) 0%, rgba(0, 150, 80, 0.06) 100%);
    border: 1px solid rgba(0, 200, 100, 0.3);
    border-radius: var(--r-full);
    color: #5dd97a;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: help;
    transition: all var(--t-fast);
    backdrop-filter: blur(10px);
}

.security-badge:hover {
    background: linear-gradient(135deg, rgba(0, 200, 100, 0.2) 0%, rgba(0, 150, 80, 0.12) 100%);
    border-color: rgba(0, 200, 100, 0.5);
    box-shadow: 0 0 12px rgba(0, 200, 100, 0.3);
}

.security-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5dd97a;
    box-shadow: 0 0 8px #5dd97a;
    animation: security-pulse 2s ease-in-out infinite;
}

@keyframes security-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #5dd97a; }
    50% { opacity: 0.5; box-shadow: 0 0 14px #5dd97a; }
}

/* ============================================================
   EMERGENCY BUTTON
   ============================================================ */
.emergency-btn {
    background: rgba(20, 6, 10, 0.85);
    border: 1px solid var(--crimson-glow);
    color: var(--crimson-hot);
    padding: 0.4rem 0.9rem;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--r-full);
    animation: emergency-pulse 2.5s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

@keyframes emergency-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(255, 31, 77, 0.3); border-color: rgba(255, 31, 77, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 31, 77, 0.8), 0 0 36px rgba(255, 31, 77, 0.3); border-color: var(--crimson-hot); }
}

.emergency-btn:hover {
    background: var(--crimson-glow);
    color: #fff;
    box-shadow: 0 0 28px var(--crimson-glow), 0 4px 16px rgba(255, 31, 77, 0.5);
}

/* ============================================================
   ROOM SWITCHER
   ============================================================ */
.room-switcher {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.room-switcher .ghost-btn {
    white-space: nowrap;
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
}

/* ============================================================
   CREATE ROOM MODAL
   ============================================================ */
.create-pw-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-bright);
    border-radius: var(--r-sm);
    padding: 0.65rem 0.75rem;
    margin: 0.75rem 0;
}

.create-pw-box code {
    flex: 1;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.95rem;
    color: var(--crimson-hot);
    word-break: break-all;
    user-select: all;
}

.room-switcher input {
    flex: 1;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.7rem 1.1rem;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: all var(--t-fast);
    border-radius: var(--r-md);
}

.room-switcher input:focus {
    border-color: var(--border-bright);
    box-shadow: 0 0 0 3px rgba(255, 61, 110, 0.12);
    background: rgba(20, 20, 24, 0.8);
}

.room-switcher input::placeholder {
    color: var(--text-muted);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 1rem;
    flex: 1;
    min-height: 400px;
}

.chat-area {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg), var(--shadow-inset);
    border-radius: var(--r-xl);
    overflow: hidden;
}

/* ============================================================
   MESSAGES - modern chat bubbles
   ============================================================ */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    max-height: 58vh;
    scroll-behavior: smooth;
}

.messages::-webkit-scrollbar {
    width: 6px;
}
.messages::-webkit-scrollbar-track {
    background: transparent;
}
.messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}
.messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 61, 110, 0.3);
}

.msg {
    padding: 0.7rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.025);
    border-left: 2px solid var(--crimson);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    animation: msgIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    word-wrap: break-word;
    transition: all var(--t-fast);
}

.msg:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--crimson-bright);
}

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

.msg-self {
    border-left-color: var(--crimson-hot);
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.15) 0%, rgba(255, 31, 77, 0.08) 100%);
    margin-left: 2rem;
}

.msg-other {
    border-left-color: var(--crimson);
    margin-right: 2rem;
}

.msg-system {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.78rem;
    text-align: center;
    padding: 0.5rem 0.75rem;
    margin: 0.75rem 0;
    position: relative;
}

.msg-system::before,
.msg-system::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-faint), transparent);
    vertical-align: middle;
    margin: 0 0.75rem;
}

.msg-time {
    display: inline-block;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    margin-right: 0.6rem;
    min-width: 55px;
    font-variant-numeric: tabular-nums;
    opacity: 0.7;
}

.msg-author {
    display: inline-block;
    color: var(--crimson-pale);
    font-weight: 600;
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

.msg-self .msg-author {
    color: var(--crimson-hot);
    text-shadow: 0 0 8px rgba(255, 61, 110, 0.3);
}

.msg-text {
    color: var(--text-primary);
    font-size: 0.92rem;
}

.msg-system .msg-text {
    color: var(--text-muted);
}

/* ============================================================
   MESSAGE FORM
   ============================================================ */
.msg-form {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.msg-form input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.75rem 1.1rem;
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: all var(--t-fast);
    border-radius: var(--r-md);
}

.msg-form input:focus {
    border-color: var(--border-bright);
    box-shadow: 0 0 0 3px rgba(255, 61, 110, 0.12);
    background: rgba(0, 0, 0, 0.5);
}

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

.msg-form input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md), var(--shadow-inset);
    border-radius: var(--r-xl);
    padding: 1.1rem;
    max-height: 58vh;
    overflow-y: auto;
}

.sidebar h3 {
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar h3::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--crimson-glow);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--crimson-glow);
    animation: blink 1.5s ease-in-out infinite;
}

.online-meta {
    display: flex;
    flex-direction: column;
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.online-meta #online-count {
    color: var(--crimson-hot);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Space Grotesk', sans-serif;
}

.online-hint {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-style: italic;
    margin-top: 2px;
}

.online-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.online-list li {
    padding: 0.5rem 0.6rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: var(--r-sm);
    transition: all var(--t-fast);
}

.online-list li:hover {
    background: var(--bg-hover);
}

.online-list li.online-self {
    color: var(--crimson-hot);
    font-weight: 600;
    background: rgba(255, 61, 110, 0.06);
    border: 1px solid var(--border-subtle);
}

.online-list li .dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--crimson-bright);
    box-shadow: 0 0 8px var(--crimson-bright);
    animation: blink 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.online-list li.online-self .dot {
    background: var(--crimson-hot);
    box-shadow: 0 0 10px var(--crimson-hot);
}

.online-list li .me {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.72rem;
    font-style: italic;
    margin-left: auto;
}

.online-list li.online-empty {
    color: var(--text-muted);
    font-style: italic;
    justify-content: center;
    padding: 1rem 0;
}

/* Aktive Räume in Sidebar */
.rooms-heading {
    margin-top: 1.25rem !important;
}

#rooms-list li {
    cursor: pointer;
}

#rooms-list li:hover {
    background: rgba(255, 61, 110, 0.1);
    color: var(--crimson-hot);
    border-color: var(--border-bright);
}

#rooms-list li .me {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* ============================================================
   HELP BUTTON + HELP MODAL
   ============================================================ */
.help-btn {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.4rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    transition: all var(--t-bounce);
    color: var(--text-secondary);
}

.help-btn:hover {
    background: var(--crimson-bright);
    color: #fff;
    transform: scale(1.1) rotate(20deg);
    box-shadow: 0 0 16px rgba(255, 61, 110, 0.6);
    border-color: var(--crimson-hot);
}

/* ============================================================
   CONTEXT MENU (Rechtsklick auf User)
   ============================================================ */
.context-menu {
    display: none;
    position: fixed;
    z-index: 2000;
    min-width: 180px;
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.98) 0%, rgba(10, 10, 12, 0.98) 100%);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(255, 61, 110, 0.15), var(--shadow-inset);
    padding: 0.4rem;
    animation: contextMenuIn 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes contextMenuIn {
    from { opacity: 0; transform: scale(0.92) translateY(-4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.context-menu.open {
    display: block;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: all var(--t-fast);
    text-align: left;
    letter-spacing: 0.01em;
}

.context-menu-item:hover {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.2) 0%, rgba(255, 31, 77, 0.1) 100%);
    color: var(--crimson-hot);
    box-shadow: var(--shadow-inset);
}

.context-menu-item:active {
    transform: scale(0.97);
}

/* Hint für Rechtsklick in Online-Liste */
.online-list li:not(.online-self):not(.online-empty) {
    cursor: context-menu;
}

.online-list li:not(.online-self):not(.online-empty):hover::after {
    content: '⋮';
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.5;
}

/* ============================================================
   FLOATING PM WINDOW
   ============================================================ */
.pm-window {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 360px;
    max-width: calc(100vw - 2rem);
    height: 480px;
    max-height: calc(100vh - 3rem);
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.97) 0%, rgba(10, 10, 12, 0.98) 100%);
    backdrop-filter: blur(60px) saturate(1.5);
    -webkit-backdrop-filter: blur(60px) saturate(1.5);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(255, 61, 110, 0.2), var(--shadow-inset);
    z-index: 900;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pmIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.pm-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 61, 110, 0.5) 50%, transparent 100%);
    z-index: 1;
}

.pm-header {
    padding: 0.9rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pm-title {
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pm-title #pm-target-name {
    color: var(--crimson-hot);
    text-shadow: 0 0 8px rgba(255, 61, 110, 0.4);
}

.pm-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
}

.pm-close-btn:hover {
    background: rgba(255, 61, 110, 0.2);
    color: var(--crimson-hot);
    transform: rotate(90deg);
}

.pm-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

.pm-messages::-webkit-scrollbar {
    width: 5px;
}
.pm-messages::-webkit-scrollbar-track {
    background: transparent;
}
.pm-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}
.pm-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 61, 110, 0.3);
}

.pm-empty {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.85rem;
}

.pm-msg {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    background: rgba(255, 255, 255, 0.025);
    border-left: 2px solid var(--crimson);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    animation: pmMsgIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    word-wrap: break-word;
    transition: background var(--t-fast);
    font-size: 0.85rem;
}

.pm-msg:hover {
    background: rgba(255, 255, 255, 0.05);
}

@keyframes pmMsgIn {
    from { opacity: 0; transform: translateX(-6px); }
    to { opacity: 1; transform: translateX(0); }
}

.pm-msg-self {
    border-left-color: var(--crimson-hot);
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.15) 0%, rgba(255, 31, 77, 0.08) 100%);
    margin-left: 1.5rem;
}

.pm-msg-other {
    border-left-color: var(--crimson);
    margin-right: 1.5rem;
}

.pm-msg-system {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.75rem;
    text-align: center;
    padding: 0.4rem 0.5rem;
    margin: 0.5rem 0;
}

.pm-msg-time {
    display: inline-block;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    margin-right: 0.5rem;
    opacity: 0.7;
}

.pm-msg-author {
    display: inline-block;
    color: var(--crimson-pale);
    font-weight: 600;
    margin-right: 0.4rem;
    font-size: 0.8rem;
}

.pm-msg-self .pm-msg-author {
    color: var(--crimson-hot);
}

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

.pm-msg-system .pm-msg-text {
    color: var(--text-muted);
}

.pm-form {
    display: flex;
    gap: 0.4rem;
    padding: 0.85rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.pm-form input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.6rem 0.9rem;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: all var(--t-fast);
    border-radius: var(--r-sm);
}

.pm-form input:focus {
    border-color: var(--border-bright);
    box-shadow: 0 0 0 3px rgba(255, 61, 110, 0.12);
}

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

.pm-form .primary-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

@media (max-width: 600px) {
    .pm-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 70vh;
        max-height: 70vh;
        border-radius: var(--r-xl) var(--r-xl) 0 0;
    }
}

.modal-help-content {
    max-width: 580px;
    max-height: 85vh;
    overflow-y: auto;
    text-align: left;
    padding: 1.75rem 2.25rem;
}

.modal-help-content h2 {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #ff8da3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.help-section {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-left: 2px solid var(--crimson);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    transition: all var(--t-fast);
}

.help-section:hover {
    border-left-color: var(--crimson-hot);
    background: rgba(0, 0, 0, 0.5);
    transform: translateX(2px);
}

.help-section h3 {
    color: var(--crimson-hot);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.help-section p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.55;
    margin-bottom: 0.4rem;
}

.help-section p:last-child {
    margin-bottom: 0;
}

.help-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

.help-section code {
    background: rgba(220, 20, 60, 0.18);
    color: var(--crimson-pale);
    padding: 2px 8px;
    border-radius: var(--r-xs);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    border: 1px solid var(--border-crimson);
}

.modal-help-content .modal-actions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

/* ============================================================
   MODALS - refined premium
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
    animation: modalBgIn 0.25s ease;
}

@keyframes modalBgIn {
    from { opacity: 0; backdrop-filter: blur(0); }
    to { opacity: 1; backdrop-filter: blur(12px); }
}

.modal-content {
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.95) 0%, rgba(10, 10, 12, 0.98) 100%);
    backdrop-filter: blur(60px) saturate(1.5);
    -webkit-backdrop-filter: blur(60px) saturate(1.5);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(255, 61, 110, 0.15), var(--shadow-inset);
    padding: 2rem 2.25rem;
    max-width: 440px;
    width: 90%;
    text-align: center;
    border-radius: var(--r-2xl);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content h2 {
    color: var(--crimson-hot);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    text-shadow: 0 0 20px rgba(255, 61, 110, 0.4);
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.55;
    font-size: 0.92rem;
}

.modal-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-warn {
    color: var(--crimson-bright) !important;
    font-size: 0.82rem !important;
    font-style: italic;
    margin-top: 0.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.modal-actions button {
    min-width: 140px;
    padding: 0.65rem 1.2rem;
}

.rename-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.8rem 1.1rem;
    font-family: inherit;
    font-size: 1rem;
    margin-top: 0.75rem;
    text-align: center;
    outline: none;
    border-radius: var(--r-md);
    transition: all var(--t-fast);
    font-weight: 500;
}

.rename-input:focus {
    border-color: var(--border-bright);
    box-shadow: 0 0 0 3px rgba(255, 61, 110, 0.12);
    background: rgba(0, 0, 0, 0.5);
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-container {
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    display: flex;
}

.login-box {
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.9) 0%, rgba(10, 10, 12, 0.95) 100%);
    backdrop-filter: blur(60px) saturate(1.5);
    -webkit-backdrop-filter: blur(60px) saturate(1.5);
    border: 1px solid var(--border);
    padding: 2.75rem;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(255, 61, 110, 0.1), var(--shadow-inset);
    border-radius: var(--r-2xl);
    animation: loginIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 61, 110, 0.6) 50%, transparent 100%);
}

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

.login-box h2 {
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #ff8da3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-hint {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.login-form input {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.9rem 1.2rem;
    font-family: inherit;
    font-size: 1.05rem;
    outline: none;
    transition: all var(--t-fast);
    text-align: center;
    border-radius: var(--r-md);
    font-weight: 500;
}

.login-form input:focus {
    border-color: var(--border-bright);
    box-shadow: 0 0 0 3px rgba(255, 61, 110, 0.12);
    background: rgba(0, 0, 0, 0.5);
}

.login-actions {
    display: flex;
    gap: 0.5rem;
}

.login-actions .ghost-btn {
    flex: 1;
    padding: 0.7rem;
    text-align: center;
    border-radius: var(--r-md);
}

.login-actions .primary-btn {
    flex: 2;
    padding: 0.7rem 1.4rem;
    border-radius: var(--r-md);
}

.login-rules {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.7;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

/* ============================================================
   KONTAKT MODAL
   ============================================================ */
.contact-email-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--crimson);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    margin: 1rem 0;
    transition: all var(--t-fast);
}

.contact-email-box:hover {
    border-left-color: var(--crimson-hot);
    background: rgba(0, 0, 0, 0.5);
    transform: translateX(2px);
}

.contact-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.contact-email {
    flex: 1;
    color: var(--crimson-hot);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    text-shadow: 0 0 8px rgba(255, 61, 110, 0.3);
    transition: all var(--t-fast);
    word-break: break-all;
}

.contact-email:hover {
    text-shadow: 0 0 12px rgba(255, 61, 110, 0.6);
    color: var(--crimson-glow);
}

#copy-email-btn {
    flex-shrink: 0;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
}

@media (max-width: 600px) {
    .contact-email-box {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.85rem 1rem;
    }
    .contact-email {
        text-align: center;
    }
    #copy-email-btn {
        width: 100%;
    }
}

/* ============================================================
   LEGAL CHECKBOXES (Consent vor dem Chatten)
   ============================================================ */
.legal-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 1.25rem 0;
}

.legal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--crimson);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    cursor: pointer;
    transition: all var(--t-fast);
    position: relative;
}

.legal-checkbox:hover {
    background: rgba(0, 0, 0, 0.5);
    border-left-color: var(--crimson-hot);
    transform: translateX(2px);
}

.legal-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.legal-checkmark {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: var(--r-xs);
    background: var(--bg-input);
    transition: all var(--t-fast);
    position: relative;
    margin-top: 1px;
}

.legal-checkbox:hover .legal-checkmark {
    border-color: var(--crimson);
}

.legal-checkbox input[type="checkbox"]:checked + .legal-checkmark {
    background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-bright) 100%);
    border-color: var(--crimson-glow);
    box-shadow: 0 0 12px rgba(255, 31, 77, 0.5);
}

.legal-checkbox input[type="checkbox"]:checked + .legal-checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkmarkIn 0.2s ease;
}

@keyframes checkmarkIn {
    from { opacity: 0; transform: rotate(45deg) scale(0); }
    to { opacity: 1; transform: rotate(45deg) scale(1); }
}

.legal-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    user-select: none;
}

.legal-label a {
    color: var(--crimson-hot);
    text-decoration: underline;
    font-weight: 600;
}

.legal-label a:hover {
    text-shadow: 0 0 8px rgba(255, 61, 110, 0.5);
}

.legal-label strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Accept-Button disabled State */
#legal-accept:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: linear-gradient(135deg, var(--text-faint) 0%, var(--text-muted) 100%);
    box-shadow: none;
    transform: none;
}

#legal-accept:disabled:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 600px) {
    .legal-checkbox {
        padding: 0.7rem 0.8rem;
    }
    .legal-label {
        font-size: 0.8rem;
    }
}

/* ============================================================
   DSGVO CONSENT BANNER
   ============================================================ */
.dsgvo-banner {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: calc(100% - 2rem);
    max-width: 800px;
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.98) 0%, rgba(10, 10, 12, 0.98) 100%);
    backdrop-filter: blur(60px) saturate(1.5);
    -webkit-backdrop-filter: blur(60px) saturate(1.5);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(255, 61, 110, 0.15), var(--shadow-inset);
    padding: 1.25rem 1.5rem;
    z-index: 1100;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.dsgvo-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 61, 110, 0.6) 50%, transparent 100%);
}

.dsgvo-banner-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dsgvo-banner-text strong {
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.dsgvo-banner-text p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
    margin-bottom: 0.4rem;
}

.dsgvo-banner-text a {
    color: var(--crimson-hot);
    text-decoration: underline;
}

.dsgvo-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dsgvo-banner-actions button {
    flex: 1;
    min-width: 140px;
}

@media (max-width: 600px) {
    .dsgvo-banner {
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(150%);
        width: 100%;
        max-width: 100%;
        border-radius: var(--r-xl) var(--r-xl) 0 0;
    }
    .dsgvo-banner.show {
        transform: translateY(0);
    }
    .dsgvo-banner-actions {
        flex-direction: column;
    }
    .dsgvo-banner-actions button {
        width: 100%;
    }
}

/* ============================================================
   FOOTER - premium badges
   ============================================================ */
footer {
    margin-top: 1.5rem;
    padding: 1.25rem 1rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm), var(--shadow-inset);
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1rem;
    margin-bottom: 0.85rem;
}

.footer-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-full);
    transition: all var(--t-fast);
}

.footer-cell:hover {
    border-color: var(--border-bright);
    color: var(--crimson-hot);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 61, 110, 0.15);
    background: var(--bg-hover);
}

.footer-icon {
    font-size: 0.9rem;
    filter: drop-shadow(0 0 4px rgba(255, 61, 110, 0.4));
}

.footer-label {
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
}

.footer-cell:hover .footer-label {
    color: var(--crimson-hot);
}

.warning {
    margin-top: 0.5rem;
    color: var(--crimson-bright);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    opacity: 0.85;
    font-style: italic;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
    .main-grid { grid-template-columns: 1fr; }
    .sidebar { max-height: 30vh; }
}

@media (max-width: 600px) {
    .container { padding: 1rem; }
    h1 { font-size: 1.85rem; }
    header { padding: 1.25rem 0.75rem 1rem; }
    .status-bar { font-size: 0.72rem; gap: 0.4rem; justify-content: center; }
    .phantom-id, .room-info, .ghost-btn, .emergency-btn { padding: 0.3rem 0.6rem; font-size: 0.7rem; }
    .msg-form { flex-direction: column; padding: 0.75rem; }
    .primary-btn { width: 100%; padding: 0.75rem; border-radius: var(--r-md); }
    .messages { max-height: 50vh; padding: 1rem; }
    .login-box { padding: 1.75rem 1.5rem; }
    .modal-content { padding: 1.5rem 1.25rem; }
    .modal-actions { flex-direction: column; }
    .modal-actions button { width: 100%; min-width: 0; }
    .footer-grid { gap: 0.4rem 0.5rem; }
    .footer-cell { padding: 0.25rem 0.55rem; }
    .footer-label { font-size: 0.68rem; }
}

/* ============================================================
   Toast Notification System
   Ersatz fuer alert() - nicht-blockierende Benachrichtigungen
   ============================================================ */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 380px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    background: rgba(20, 20, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--text-muted);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.45;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    cursor: default;
    word-break: break-word;
}

.toast.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-text {
    flex: 1;
    min-width: 0;
}

/* Varianten */
.toast.toast-info {
    border-left-color: var(--text-secondary);
}
.toast.toast-info .toast-icon {
    background: rgba(168, 168, 179, 0.2);
    color: var(--text-secondary);
}

.toast.toast-success {
    border-left-color: #00aa66;
}
.toast.toast-success .toast-icon {
    background: rgba(0, 170, 102, 0.2);
    color: #00cc77;
}

.toast.toast-error {
    border-left-color: var(--crimson-bright);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(220, 20, 60, 0.2);
}
.toast.toast-error .toast-icon {
    background: rgba(220, 20, 60, 0.25);
    color: var(--crimson-hot);
}

.toast.toast-warn {
    border-left-color: #d4a017;
}
.toast.toast-warn .toast-icon {
    background: rgba(212, 160, 23, 0.2);
    color: #f0b929;
}

/* Mobile Anpassung */
@media (max-width: 600px) {
    #toast-container {
        top: 0.6rem;
        right: 0.6rem;
        left: 0.6rem;
        max-width: none;
    }
    .toast {
        font-size: 0.8rem;
        padding: 0.7rem 0.85rem;
    }
}
