/* ========================================
   DIE COOLIES CHAT — ETCHAT_GREEN DESIGN SYSTEM
   ======================================== */

:root {
    --accent-1: #349658;
    --accent-2: #277042;
    --accent-hover: #349658;
    --accent-blue: #2F6F2E;
    --bg-deep: #eaf7ea;
    --bg-surface: #f1ffee;
    --bg-content: #ddffdd;
    --bg-light: #f3ffe3;
    --bg-online: #f1ffee;
    --border: #88aa88;
    --border-strong: #6c9a6c;
    --border-color: #88aa88;
    --text-primary: #1F4F1E;
    --text-secondary: #2F6F2E;
    --text-muted: #557755;
    --gradient-main: linear-gradient(135deg, #349658, #277042);
    --shadow-glow: 0 4px 20px rgba(52, 150, 88, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* Legacy compat */
    --cam-bg: #122111;
    --panel-border: #88aa88;
    --panel-bg: rgba(241, 255, 238, 0.95);
    --primary-color: #2F6F2E;
    --text-main: #1F4F1E;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, 'Inter', sans-serif;
    background-color: var(--bg-deep);
    background-image: url('bg1.png');
    background-repeat: repeat;
    color: var(--text-primary);
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

.cookie-consent-banner[hidden],
.cookie-consent-options[hidden],
.cookie-settings-fab[hidden],
#cookie-consent-save[hidden] {
    display: none;
}

.cookie-consent-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 20000;
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    width: min(760px, calc(100vw - 2rem));
    max-height: min(80vh, 620px);
    padding: 1.25rem;
    overflow-y: auto;
    border: 1px solid #88aa88;
    border-radius: 14px;
    color: #1F4F1E;
    background: #f7fff2;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.cookie-consent-copy {
    flex: 1;
    min-width: 0;
}

.cookie-consent-copy h2 {
    margin-bottom: 0.45rem;
    font-size: 1.1rem;
}

.cookie-consent-copy p {
    font-size: 0.88rem;
    line-height: 1.5;
}

.cookie-inline-link {
    padding: 0;
    border: 0;
    color: #1d5c2b;
    background: transparent;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.cookie-consent-options {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px solid #c6dbc3;
}

.cookie-consent-options label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.86rem;
    font-weight: 650;
}

.cookie-consent-options input {
    margin-top: 0.2rem;
    accent-color: #277042;
}

.cookie-consent-options label span {
    font-weight: 400;
}

.cookie-consent-actions {
    display: flex;
    flex: 0 0 170px;
    flex-direction: column;
    gap: 0.5rem;
}

.cookie-consent-actions button {
    width: 100%;
    min-height: 40px;
}

.cookie-settings-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1100;
    padding: 0.5rem 0.75rem;
    border: 1px solid #88aa88;
    border-radius: 999px;
    color: #1F4F1E;
    background: #f7fff2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    font-size: 0.78rem;
    cursor: pointer;
}

.cookie-settings-link {
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.external-media-placeholder {
    padding: 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.45;
}

.consent-media-placeholder {
    padding: 0.75rem;
    border: 1px dashed currentColor;
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Radio-Panel wurde entfernt */

@media (max-width: 650px) {
    .cookie-consent-banner {
        right: 0.5rem;
        bottom: 0.5rem;
        align-items: stretch;
        flex-direction: column;
        gap: 0.8rem;
        width: calc(100vw - 1rem);
        max-height: 88vh;
        padding: 1rem;
    }

    .cookie-consent-actions {
        flex-basis: auto;
    }

    .cookie-settings-fab {
        right: 0.5rem;
        bottom: 0.5rem;
    }
}

/* ----------------------------------------
   SUBTLE BACKGROUND ACCENT
   ---------------------------------------- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 15% 8%, rgba(52, 150, 88, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 55% 50% at 85% 92%, rgba(47, 111, 46, 0.08) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   AUTH SCREEN — SPLIT LAYOUT
   ======================================== */
#auth-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: stretch;
    z-index: 10;
    overflow: hidden;
    background-color: #f3f6f3;
    background-image:
        radial-gradient(ellipse at 18% 18%, rgba(52, 150, 88, 0.09), transparent 42%),
        radial-gradient(ellipse at 78% 82%, rgba(47, 111, 46, 0.07), transparent 45%),
        linear-gradient(135deg, #f5f7f4, #eaf1eb);
}

/* Floating Top Navbar */
.auth-navbar {
    position: absolute;
    top: 1.5rem;
    left: 3rem;
    right: 3rem;
    height: 64px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(47, 111, 46, 0.18);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem 0 1.2rem;
    z-index: 20;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(31, 79, 30, 0.09);
}

.auth-nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-badge-b1 {
    background: linear-gradient(135deg, #349658, #277042);
    color: #fff;
    font-weight: 900;
    font-style: italic;
    font-size: 1.15rem;
    padding: 3px 8px;
    border-radius: 8px;
    letter-spacing: -1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(52, 150, 88, 0.35);
    font-family: 'Outfit', 'Inter', sans-serif;
    line-height: 1;
}

.logo-badge-b1 span {
    opacity: 0.85;
}

.logo-badge-b1.big {
    font-size: 2.2rem;
    padding: 6px 14px;
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(52, 150, 88, 0.4);
}

.auth-nav-logo .logo-text,
.auth-logo-big {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 900;
    background: linear-gradient(135deg, #2F6F2E, #1F4F1E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    line-height: 1.25;
    padding-bottom: 0.12em;
    overflow: visible;
}

.auth-nav-logo .logo-text {
    font-size: 1.4rem;
    display: inline-block;
}

.auth-nav-logo .logo-text span,
.auth-logo-big span,
.auth-logo-small span {
    opacity: 0.6;
}

.auth-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    color: #465b4a;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 0.92rem;
}

.nav-link:hover {
    color: #1F4F1E;
    background: rgba(136, 170, 136, 0.2);
}

.nav-link.active {
    color: #1F4F1E;
    background: #d7f3d1;
    border: 1px solid #88aa88;
}

.nav-btn-reg {
    border: 2px solid #88aa88;
    color: #ffffff;
    background: linear-gradient(135deg, #349658, #277042);
    border-radius: 20px;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 3px 12px rgba(52, 150, 88, 0.3);
}

.nav-btn-reg:hover {
    background: linear-gradient(135deg, #277042, #349658);
    box-shadow: 0 5px 18px rgba(52, 150, 88, 0.45);
    transform: translateY(-1px);
}

/* Animated Particles */
.auth-bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: particleFloat linear infinite;
}

.p1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #349658 0%, transparent 70%);
    top: -120px;
    left: -120px;
    animation-duration: 22s;
}

.p2 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, #2F6F2E 0%, transparent 70%);
    bottom: -80px;
    right: -80px;
    animation-duration: 28s;
    animation-delay: -5s;
}

.p3 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, #88aa88 0%, transparent 70%);
    top: 45%;
    left: 32%;
    animation-duration: 19s;
    animation-delay: -11s;
}

.p4 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #349658 0%, transparent 70%);
    bottom: 22%;
    left: -60px;
    animation-duration: 24s;
    animation-delay: -3s;
}

.p5 {
    width: 190px;
    height: 190px;
    background: radial-gradient(circle, #88aa88 0%, transparent 70%);
    top: 12%;
    right: 18%;
    animation-duration: 16s;
    animation-delay: -9s;
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    33% {
        transform: translateY(-35px) rotate(120deg) scale(1.05);
    }

    66% {
        transform: translateY(25px) rotate(240deg) scale(0.95);
    }
}

/* Left Promo Panel */
.auth-promo {
    flex: 1.35;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem 3.5rem 3rem 4rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.promo-watermark-b1 {
    position: absolute;
    right: -30px;
    top: 48%;
    transform: translateY(-50%) rotate(-10deg) skewX(-10deg);
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 28rem;
    font-weight: 900;
    line-height: 0.8;
    color: transparent;
    -webkit-text-stroke: 2px rgba(47, 111, 46, 0.12);
    text-shadow: 0 0 45px rgba(52, 150, 88, 0.08);
    pointer-events: none;
    z-index: 0;
    user-select: none;
    letter-spacing: -12px;
}

.auth-promo-inner {
    max-width: 580px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.auth-logo-big-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1.5rem;
}

.auth-logo-big {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    font-weight: 900;
    line-height: 1.25;
    padding-bottom: 0.12em;
    overflow: visible;
    letter-spacing: -2px;
    display: inline-block;
}

.auth-promo-headline {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    font-weight: 800;
    line-height: 1.08;
    color: #1F4F1E;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.auth-promo-headline span {
    color: #349658;
}

.auth-promo-sub {
    border-left: 3px solid #349658;
    padding-left: 1.25rem;
    color: #465b4a;
    font-size: 1.12rem;
    line-height: 1.6;
    margin: 1.5rem 0 1rem 0;
    max-width: 520px;
}

.auth-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 2.8rem;
    max-width: 640px;
}

.auth-feature-card {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(47, 111, 46, 0.17);
    border-radius: 14px;
    padding: 16px 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 5px 18px rgba(31, 79, 30, 0.07);
}

.auth-feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 150, 88, 0.55);
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(31, 79, 30, 0.12);
}

.fc-icon {
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.fc-title {
    font-weight: 700;
    color: #1F4F1E;
    font-size: 0.92rem;
    margin-bottom: 4px;
    font-family: 'Outfit', sans-serif;
}

.fc-desc {
    color: #59665a;
    font-size: 0.78rem;
    line-height: 1.35;
}

.auth-promo-footer {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.auth-promo-live {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(47, 111, 46, 0.2);
    border-radius: 100px;
    padding: 0.6rem 1.3rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f4f1e;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #349658;
    animation: livePulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes livePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(52, 150, 88, 0.6);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(52, 150, 88, 0);
        transform: scale(1.2);
    }
}

.auth-online-avatars {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-stack {
    display: flex;
    align-items: center;
}

.av-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #88aa88;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-left: -10px;
    box-shadow: 0 2px 8px rgba(47, 111, 46, 0.15);
}

.av-circle:first-child {
    margin-left: 0;
}

.online-count {
    color: #2F6F2E;
    font-size: 0.92rem;
    font-weight: 600;
}

/* Right Form Panel */
.auth-form-wrapper {
    flex: 1;
    width: 100%;
    max-width: 480px;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6.5rem 3rem 2.5rem 1.5rem;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    overflow-y: auto;
}

.auth-card {
    width: 100%;
    background: rgba(241, 255, 238, 0.96);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 2px solid #88aa88;
    border-radius: 20px;
    padding: 2.75rem 2.25rem;
    box-shadow: 0 20px 50px rgba(47, 111, 46, 0.2);
    animation: cardSlideUp 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card-header {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-logo-small {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #2F6F2E, #1F4F1E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    line-height: 1.25;
    padding-bottom: 0.1em;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-form-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #1F4F1E;
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

.auth-form-sub {
    font-size: 0.92rem;
    color: #2F6F2E;
    margin-bottom: 1.75rem;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.auth-input-field {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 1.1rem;
    font-size: 1.05rem;
    line-height: 1;
    pointer-events: none;
    z-index: 1;
}

.auth-input-field input {
    width: 100%;
    padding: 0.95rem 1rem 0.95rem 3rem;
    background: #f3ffe3;
    border: 1px solid #88aa88;
    border-radius: 12px;
    color: #1F4F1E;
    font-size: 0.98rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
}

.auth-input-field input:focus {
    border-color: #2F6F2E;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 150, 88, 0.2);
}

.auth-input-field input::placeholder {
    color: #88aa88;
}

.auth-btn-primary {
    width: 100%;
    padding: 1.05rem 1.5rem;
    background: linear-gradient(135deg, #349658 0%, #277042 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.02rem;
    font-weight: 700;
    font-family: 'Outfit', 'Inter', sans-serif;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(52, 150, 88, 0.35);
    margin-top: 0.5rem;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #277042 0%, #349658 100%);
    box-shadow: 0 10px 28px rgba(52, 150, 88, 0.45);
}

.auth-btn-primary:active {
    transform: translateY(0);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.4rem 0;
    color: #557755;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #88aa88;
}

.auth-guest-row {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.auth-guest-row input {
    flex: 1;
    padding: 0.85rem 1rem;
    background: #f3ffe3;
    border: 1px solid #88aa88;
    border-radius: 12px;
    color: #1F4F1E;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
}

.auth-guest-row input:focus {
    border-color: #2F6F2E;
    background: #ffffff;
}

.auth-guest-row input::placeholder {
    color: #88aa88;
}

.auth-btn-ghost {
    white-space: nowrap;
    padding: 0.85rem 1.2rem;
    background: #ddffdd;
    border: 1px solid #88aa88;
    color: #1F4F1E;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-btn-ghost:hover {
    background: #f3ffe3;
    border-color: #349658;
}

.auth-switch-link {
    margin-top: 1.6rem;
    text-align: center;
    font-size: 0.9rem;
    color: #2F6F2E;
    cursor: pointer;
}

.auth-switch-link span {
    background: linear-gradient(135deg, #349658, #277042);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    transition: opacity 0.2s;
}

.auth-switch-link:hover span {
    opacity: 0.8;
}

.auth-error-msg {
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    min-height: 1.4em;
    margin-top: 0.75rem;
}

.auth-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin-top: 2.2rem;
    font-size: 0.78rem;
    color: #557755;
}

.auth-legal-links span {
    cursor: pointer;
    transition: color 0.2s;
}

.auth-legal-links span:not(.auth-legal-dot):hover {
    color: #1F4F1E;
}

.auth-legal-dot {
    pointer-events: none;
}

/* Responsive adjustments for auth screen */
@media (max-width: 1100px) {
    .auth-navbar {
        left: 1.5rem;
        right: 1.5rem;
    }

    .auth-nav-links {
        display: none;
    }

    .auth-promo {
        padding: 6.5rem 2rem 2rem 2rem;
    }

    .auth-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .promo-watermark-b1 {
        font-size: 18rem;
        right: -10px;
    }
}

@media (max-width: 850px) {
    #auth-screen {
        flex-direction: column;
        overflow-y: auto;
    }

    .auth-promo {
        flex: none;
        width: 100%;
        padding: 6rem 1.5rem 2rem 1.5rem;
    }

    .auth-form-wrapper {
        max-width: 100%;
        padding: 1rem 1.5rem 3rem 1.5rem;
    }

    .promo-watermark-b1 {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-navbar {
        left: 0.75rem;
        right: 0.75rem;
        padding: 0.6rem 1rem;
    }

    .auth-nav-logo .logo-text {
        display: none;
    }

    .auth-nav-action {
        display: none;
    }

    /* hide register btn on very small */
    .auth-promo {
        display: none;
    }

    /* hide promo block, keep it clean */
    .auth-form-wrapper {
        padding: 0.5rem 0.75rem 3rem 0.75rem;
        padding-top: 4.5rem;
    }

    .auth-card {
        padding: 1.5rem 1rem;
    }

    .auth-form-title {
        font-size: 1.3rem;
    }
}

/* ========================================
   MAIN CHAT INTERFACE
   ======================================== */
#chat-interface {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden;
    background-color: #eaf7ea;
    background-image: url('bg1.png');
    background-repeat: repeat;
}

/* Chat Header */
#settings-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 230px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem;
    background: linear-gradient(160deg, #fbfff4, #e6fbd9);
    border: 1px solid #88aa88;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(31, 79, 30, 0.28);
    z-index: 200;
    animation: settings-pop 0.15s ease-out;
}

@keyframes settings-pop {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

#settings-menu[hidden] {
    display: none;
}

#settings-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 14px;
    width: 10px;
    height: 10px;
    background: #fbfff4;
    border-left: 1px solid #88aa88;
    border-top: 1px solid #88aa88;
    transform: rotate(45deg);
}

#settings-menu .settings-status-box {
    border: 1px solid #88aa88;
    border-radius: 9px;
    padding: 6px 6px 6px;
    background: rgba(255, 255, 255, 0.55);
}

#settings-menu .settings-status-box select {
    background: transparent;
    padding: 6px 6px;
}

#settings-menu .settings-status-box input[type="color"] {
    display: block;
    width: 100%;
    height: 36px;
    margin-top: 4px;
    padding: 3px;
    border: 1px solid #88aa88;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}

#settings-menu .settings-format-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#settings-menu .settings-format-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 6px;
    color: #1F4F1E;
    cursor: pointer;
    font-size: 0.9rem;
}

#settings-menu .settings-format-option input {
    margin: 0;
    accent-color: #2F6F2E;
}

#settings-menu .settings-label {
    padding: 2px 6px 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2F6F2E;
}

#settings-menu select,
#settings-menu .secondary-btn {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    padding: 9px 12px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.55);
    color: #1F4F1E;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

#settings-menu select:hover,
#settings-menu .secondary-btn:hover {
    background: #d7f3d1;
    border-color: #88aa88;
}

#settings-menu .secondary-btn:active {
    transform: scale(0.98);
}

#settings-menu .secondary-btn.hidden {
    display: none;
}

/* Radio-Player in der Header-Leiste (wie im alten Chat) */
.radio-header-announcement {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.25;
}

.radio-header-track {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1F4F1E;
    font-size: 0.82rem;
}

/* Radio-Panel wurde entfernt - Player ist direkt in der Header-Leiste */
#radio-header-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#radio-header-player #radio-play-btn {
    padding: 0.4rem 0.7rem;
    font-size: 1rem;
}
#radio-header-player #radio-title-display {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}
#radio-header-player #radio-volume {
    width: 70px;
    accent-color: #81F7F3;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.2rem;
    background: linear-gradient(135deg, #f3ffe3, #ddffdd);
    border-bottom: 2px solid #88aa88;
    flex-shrink: 0;
    gap: 0.75rem;
    z-index: 20;
    color: #1F4F1E;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: nowrap;
}

/* ========================================
   BUTTONS
   ======================================== */
button {
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
    padding: 0.6rem 1.1rem;
    font-size: 0.875rem;
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 3px 12px rgba(52, 150, 88, 0.3);
}

button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #277042, #349658);
    box-shadow: 0 5px 18px rgba(52, 150, 88, 0.45);
}

button:active {
    transform: translateY(0) !important;
}

.secondary-btn {
    background: #f3ffe3 !important;
    border: 1px solid #88aa88 !important;
    color: #1F4F1E !important;
    box-shadow: none !important;
}

.secondary-btn:hover,
.icon-btn:hover {
    background: linear-gradient(135deg, #88aa88 0%, #f3ffe3 100%) !important;
    border-color: #349658 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.secondary-btn:hover *,
.icon-btn:hover * {
    color: inherit;
}

.primary-btn {
    background: linear-gradient(135deg, #349658, #277042) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 3px 14px rgba(52, 150, 88, 0.35) !important;
}

.primary-btn:hover {
    box-shadow: 0 6px 22px rgba(52, 150, 88, 0.5) !important;
    transform: translateY(-1px);
}

.danger-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.3) !important;
}

.danger-btn:hover {
    box-shadow: 0 5px 18px rgba(239, 68, 68, 0.5) !important;
    transform: translateY(-1px);
}

.icon-btn {
    padding: 0.5rem 0.65rem !important;
    font-size: 1rem !important;
    background: #f3ffe3 !important;
    border: 1px solid #88aa88 !important;
    color: #1F4F1E !important;
    box-shadow: none !important;
    border-radius: var(--radius-sm) !important;
    line-height: 1;
}

.icon-btn:hover {
    border-color: #349658 !important;
    transform: translateY(-1px) !important;
}

/* ========================================
   INPUTS
   ======================================== */
input,
select,
textarea {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, 'Inter', sans-serif;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

input:not(.auth-input-field input):not(.auth-guest-row input) {
    padding: 0.7rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid #88aa88;
    background: #f3ffe3;
    font-size: 0.9rem;
    color: #1F4F1E;
}

input:not(.auth-input-field input):not(.auth-guest-row input):focus {
    border-color: #2F6F2E;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 150, 88, 0.15);
}

input::placeholder {
    color: #88aa88;
}

select {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid #88aa88;
    background: #f3ffe3;
    font-size: 0.85rem;
    cursor: pointer;
    color: #1F4F1E;
}

textarea {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid #88aa88;
    background: #f3ffe3;
    font-size: 0.9rem;
    resize: vertical;
    width: 100%;
    color: #1F4F1E;
}

textarea:focus {
    border-color: #2F6F2E;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 150, 88, 0.15);
}

textarea::placeholder {
    color: #88aa88;
}

/* ========================================
   GLASS PANEL
   ======================================== */
.glass-panel {
    background: rgba(241, 255, 238, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid #88aa88;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(47, 111, 46, 0.18);
    color: #1F4F1E;
}

/* ========================================
   CHAT LAYOUT
   ======================================== */
.chat-main {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

/* Rooms Sidebar */
.rooms-area {
    flex: 0 0 210px;
    width: 210px;
    display: flex;
    flex-direction: column;
    background: rgba(243, 255, 227, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 2px solid #88aa88;
    padding: 1rem 0.85rem;
    gap: 0.35rem;
    overflow: hidden;
}

.rooms-area h3 {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2F6F2E;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #88aa88;
    margin: 0 0 0.35rem 0;
}

#rooms-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    flex: 1;
}

#rooms-list::-webkit-scrollbar {
    width: 3px;
}

#rooms-list::-webkit-scrollbar-thumb {
    background: rgba(136, 170, 136, 0.4);
    border-radius: 3px;
}

#rooms-list li {
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2F6F2E;
    background: #f3ffe3;
    border: 1px solid #88aa88;
    margin-bottom: 2px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#rooms-list li:hover {
    background: linear-gradient(135deg, #88aa88 0%, #f3ffe3 100%);
    color: #ffffff;
}

#rooms-list li.active {
    background: #d7f3d1;
    color: #1F4F1E;
    font-weight: 700;
    border: 2px solid #349658;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background-color: #f1ffee;
    border-right: 2px solid #88aa88;
    box-shadow: inset 0 0 50px rgba(47, 111, 46, 0.05);
}

.chat-watermark-b1 {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%) rotate(-8deg) skewX(-8deg);
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: clamp(12rem, 25vw, 26rem);
    font-weight: 900;
    line-height: 0.8;
    color: transparent;
    -webkit-text-stroke: 2px rgba(47, 111, 46, 0.12);
    text-shadow: 0 0 50px rgba(52, 150, 88, 0.08);
    pointer-events: none;
    z-index: 0;
    user-select: none;
    letter-spacing: -10px;
}

/* Saisonale Themes: ruhige, statische Deko ohne Animation */
.chat-area { position: relative; }

.season-decor-layer {
    position: absolute;
    inset: 0 0 78px 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.season-decor-layer .sd { position: absolute; }
.season-decor-layer .sd svg { display: block; width: 100%; height: auto; }
.season-decor-layer .sd svg[height] { height: 100%; }

.season-decor-text {
    position: absolute;
    top: 46px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    padding: 2px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 800;
    color: #b02a73;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Alle Bewegungen bleiben am Platz – nichts wandert über den Bildschirm */
.sd-spider {
    transform: translateY(-210px);
    animation: sd-spider-drop var(--dur, 26s) ease-in-out infinite;
}
@keyframes sd-spider-drop {
    0%, 6% { transform: translateY(-320px); }
    28%, 38% { transform: translateY(-210px); }
    54%, 66% { transform: translateY(-110px); }
    82% { transform: translateY(-230px); }
    100% { transform: translateY(-320px); }
}

.sd-bob { animation: sd-bob 5s ease-in-out infinite alternate; }
@keyframes sd-bob { from { transform: translateY(0); } to { transform: translateY(-9px); } }

.sd-sway { transform-origin: 50% 0; animation: sd-sway 6s ease-in-out infinite alternate; }
@keyframes sd-sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

.sd-flicker { animation: sd-flicker 3.2s ease-in-out infinite; }
@keyframes sd-flicker { 0%, 100% { opacity: 1; } 45% { opacity: 0.75; } 60% { opacity: 0.95; } }

.sd-twinkle-a { animation: sd-twinkle 2.4s ease-in-out infinite alternate; }
.sd-twinkle-b { animation: sd-twinkle 2.4s ease-in-out infinite alternate-reverse; }
@keyframes sd-twinkle { from { opacity: 1; } to { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
    .season-decor-layer .sd,
    .season-decor-layer .sd * { animation: none !important; }
}

html[data-season="halloween"] { --accent-1: #e8730c; --accent-2: #6b2fa0; }
html[data-season="halloween"] .chat-area { border-right-color: #c9702a; }

html[data-season="xmas"] { --accent-1: #c8242d; --accent-2: #2f7a3b; }
html[data-season="xmas"] .chat-area { border-right-color: #b3262d; }

html[data-season="birthday"] { --accent-1: #e8478f; --accent-2: #f2b705; }
html[data-season="birthday"] .chat-area { border-right-color: #d6489b; }

html[data-season="easter"] { --accent-1: #7bbf5a; --accent-2: #f4a6c8; }
html[data-season="easter"] .chat-area { border-right-color: #8fbf4a; }

/* Saison-Deko auf Buttons (reines CSS, Emoji statt externer Bilder) */
html[data-season] .header-actions > button,
html[data-season] #settings-btn,
html[data-season] #rooms-list li { position: relative; }

html[data-season] .header-actions > button::after,
html[data-season] #settings-btn::after,
html[data-season] #rooms-list li::after {
    position: absolute;
    pointer-events: none;
    line-height: 1;
}

html[data-season] .header-actions > button::after,
html[data-season] #settings-btn::after {
    top: -7px;
    right: -3px;
    font-size: 15px;
    transform: rotate(12deg);
}

html[data-season] #rooms-list li::after {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    opacity: 0.85;
}

html[data-season="halloween"] .header-actions > button::after,
html[data-season="halloween"] #settings-btn::after { content: "🕸️"; }
html[data-season="halloween"] .header-actions > button:nth-of-type(even)::after { content: "🎃"; }
html[data-season="halloween"] .header-actions > #logout-btn::after { content: "🦇"; }
html[data-season="halloween"] #rooms-list li::after { content: "🕷️"; }
html[data-season="halloween"] #rooms-list li:nth-child(3n)::after { content: "🎃"; }
html[data-season="halloween"] #rooms-list li:nth-child(4n)::after { content: "🦇"; }
html[data-season="halloween"] #rooms-list li.active::after { content: "👻"; }

html[data-season="xmas"] .header-actions > button::after,
html[data-season="xmas"] #settings-btn::after { content: "🎅"; font-size: 16px; top: -9px; right: -5px; }
html[data-season="xmas"] .header-actions > button:nth-of-type(even)::after { content: "❄️"; }
html[data-season="xmas"] #rooms-list li::after { content: "❄️"; }
html[data-season="xmas"] #rooms-list li:nth-child(3n)::after { content: "⭐"; }
html[data-season="xmas"] #rooms-list li.active::after { content: "🎄"; }

html[data-season="birthday"] .header-actions > button::after,
html[data-season="birthday"] #settings-btn::after { content: "🎉"; }
html[data-season="birthday"] .header-actions > button:nth-of-type(even)::after { content: "🎈"; }
html[data-season="birthday"] #rooms-list li::after { content: "🎈"; }
html[data-season="birthday"] #rooms-list li:nth-child(3n)::after { content: "🎁"; }
html[data-season="birthday"] #rooms-list li.active::after { content: "🎂"; }

html[data-season="easter"] .header-actions > button::after,
html[data-season="easter"] #settings-btn::after { content: "🐣"; }
html[data-season="easter"] .header-actions > button:nth-of-type(even)::after { content: "🌷"; }
html[data-season="easter"] #rooms-list li::after { content: "🥚"; }
html[data-season="easter"] #rooms-list li:nth-child(3n)::after { content: "🌷"; }
html[data-season="easter"] #rooms-list li.active::after { content: "🐰"; }

/* Senden-Button: kleiner Akzent je Saison */
html[data-season] #send-btn { position: relative; }
html[data-season] #send-btn::after {
    position: absolute;
    top: -9px;
    right: -4px;
    font-size: 15px;
    pointer-events: none;
    transform: rotate(12deg);
}
html[data-season="halloween"] #send-btn::after { content: "🕷️"; }
html[data-season="xmas"] #send-btn::after { content: "🎅"; }
html[data-season="birthday"] #send-btn::after { content: "🎉"; }
html[data-season="easter"] #send-btn::after { content: "🐣"; }

/* Laptops/Notebooks: Deko am unteren Rand stört – ausblenden */
@media (max-width: 1700px), (max-height: 900px) {
    .season-decor-layer .sd[style*="bottom:"] { display: none; }
}

@media (max-width: 700px) {
    .season-decor-layer { display: none; }
}

/* Messages */
.chat-messages {
    flex: 1;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    scroll-behavior: smooth;
    background-color: #f1ffee;
    background-image: url('lo.png');
    background-repeat: no-repeat;
    background-position: bottom right;
}

.youtube-video-open {
    margin: 4px 0;
    padding: 6px 10px;
    border: 1px solid #88aa88;
    border-radius: 6px;
    background: #e5f5df;
    color: #1F4F1E;
    font: inherit;
    font-weight: 600;
}

.youtube-video-open:hover {
    background: #d7f3d1;
}

.youtube-floating-player {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 12000;
    width: min(360px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid #557755;
    border-radius: 10px;
    background: #142014;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.youtube-floating-player-header {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 8px 4px 12px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}

.youtube-floating-player.dragging iframe {
    pointer-events: none;
}

.youtube-floating-player-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
}

.youtube-floating-player-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.youtube-floating-player iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000;
}

/* Links unter der Eingabe (wie im alten Chat) */
.chat-footer-nav {
    flex-shrink: 0;
    background: #f1ffee;
    border-top: 1px solid #88aa88;
    padding: 6px 12px;
    text-align: center;
    font-size: 12px;
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.chat-footer-nav a {
    color: #1F4F1E;
    font-weight: 600;
    text-decoration: none;
}

.chat-footer-nav a:hover {
    text-decoration: underline;
}

/* Infoboxen und Fußzeile in Schwarz */
#left-sidebox,
#left-sidebox *,
#right-sidebox,
#right-sidebox *,
.sidebar-legal,
.sidebar-legal * {
    color: #000000 !important;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(136, 170, 136, 0.4);
    border-radius: 4px;
}

/* Nachrichten - kein Bubble, wie im alten ET-Chat */
.message {
    padding: 1px 2px;
    border-radius: 0;
    background: transparent;
    max-width: 100%;
    align-self: flex-start;
    animation: msgSlide 0.15s ease-out;
    border: none;
    box-shadow: none;
    transition: none;
    position: relative;
    color: #000000;
    font-family: Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
}

.message:hover {
    background: rgba(215, 243, 209, 0.3);
}

@keyframes msgSlide {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Die .meta und .text werden inline gerendert */
.message .meta {
    display: inline;
    font-size: 14px;
    color: #000000;
    margin-bottom: 0;
    gap: 0;
}

.message .meta .time {
    color: #000000;
    font-size: 14px;
}

.message .meta .user {
    font-weight: bold;
    color: inherit; /* Übernimmt die user-color vom JS */
    font-size: 14px;
}

.message .text {
    display: inline;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    color: #000000;
}

/* Eigene Nachricht: leicht abgesetzt aber kein Bubble */
.message.my-message {
    background: transparent !important;
    border: none !important;
    align-self: flex-start !important;
}

/* System-Nachrichten: kursiv, gedeckt */
.message.system {
    align-self: flex-start;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #555555;
    font-size: 13px;
    font-style: italic;
    max-width: 100%;
    padding: 1px 2px;
    width: 100%;
}

/* Erwähnungen: leichter gelber Hintergrund wie alter Chat */
.message.mentioned {
    background: rgba(255, 255, 180, 0.6) !important;
    border: none !important;
    box-shadow: none !important;
    color: #000000 !important;
    animation: none !important;
}

/* Flüstern/Whisper: grüner Hintergrund wie privat_ausg_an */
.message.whisper {
    background: rgba(215, 243, 209, 0.6) !important;
    border: none !important;
    color: #000000 !important;
}

/* Chat Input */
.chat-input-area {
    display: flex;
    padding: 0.8rem 1rem;
    gap: 0.5rem;
    background: #f1ffee;
    border-top: 2px solid #88aa88;
    flex-shrink: 0;
    align-items: flex-end;
}

.chat-input-area input,
.chat-input-area textarea {
    flex: 1;
    min-height: 42px;
    padding: 0.65rem 0.9rem;
    line-height: 1.4;
    background: #ffffff;
    border: 1px solid #88aa88;
    border-radius: var(--radius-md);
    color: #1F4F1E;
    font-size: 0.9rem;
}

.chat-input-area input:focus,
.chat-input-area textarea:focus {
    border-color: #2F6F2E;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 150, 88, 0.2);
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    padding: 4px 14px;
    font-size: 0.78rem;
    color: #557755;
    font-style: italic;
    background: #eaf7ea;
    border-bottom: 1px solid #88aa88;
    flex-shrink: 0;
}

/* User List */
.user-list-area {
    flex: 0 0 340px;
    width: 340px;
    display: flex;
    flex-direction: column;
    background: rgba(241, 255, 238, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 2px solid #88aa88;
    padding: 1rem 0.85rem;
    overflow: hidden;
}

.user-list-area h3 {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2F6F2E;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #88aa88;
    margin: 0 0 0.5rem 0;
}

#users-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#users-list::-webkit-scrollbar {
    width: 3px;
}

#users-list::-webkit-scrollbar-thumb {
    background: rgba(136, 170, 136, 0.4);
    border-radius: 3px;
}

.user-list-item {
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.84rem;
    transition: var(--transition);
    color: #1F4F1E;
}

.user-list-item:hover {
    background: #d7f3d1;
    color: #1F4F1E;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #349658;
    flex-shrink: 0;
}

/* Room Banner + Pinned */
.room-banner {
    display: flex;
}

/* ========================================
   FLOATING CAMS
   ======================================== */
.cam-box {
    position: absolute;
    width: 300px;
    height: 225px;
    min-width: 200px;
    min-height: 150px;
    max-width: 90vw;
    max-height: 90vh;
    background: #0e1e0d;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid #88aa88;
    box-shadow: 0 15px 40px rgba(47, 111, 46, 0.25);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    resize: both;
}

.cam-box::after {
    content: "◢";
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    z-index: 25;
}

#my-cam-box::after {
    display: none;
}

.cam-header {
    height: 36px;
    background: linear-gradient(135deg, #277042, #349658);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #88aa88;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    cursor: grab;
    user-select: none;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 20;
    color: #ffffff;
}

.cam-header:active {
    cursor: grabbing;
}

.cam-close-btn {
    background: rgba(239, 68, 68, 0.85);
    border: none;
    color: white;
    font-size: 1rem;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.cam-close-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.cam-video-area {
    flex: 1;
    position: relative;
    background: #000;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cam-controls {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.4rem;
    z-index: 20;
}

.cam-action-btn {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    font-size: 1.1rem !important;
    border-radius: 8px !important;
    background: rgba(39, 112, 66, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid #88aa88 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(47, 111, 46, 0.3) !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cam-action-btn:hover {
    background: #349658 !important;
    transform: scale(1.1) !important;
}

.cam-action-btn.off {
    background: rgba(239, 68, 68, 0.85) !important;
}

.cam-viewer-badge {
    position: absolute;
    top: 38px;
    left: 8px;
    background: rgba(39, 112, 66, 0.9);
    backdrop-filter: blur(6px);
    border: 1px solid #88aa88;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    color: #ffffff;
    font-weight: 600;
    z-index: 12;
    cursor: pointer;
}

.viewer-list {
    position: absolute;
    top: 64px;
    left: 8px;
    right: 8px;
    max-height: 110px;
    overflow-y: auto;
    background: rgba(241, 255, 238, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid #88aa88;
    border-radius: 8px;
    padding: 6px;
    font-size: 0.72rem;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 20;
}

.viewer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 6px;
    background: #f3ffe3;
    border-radius: 4px;
    color: #1F4F1E;
}

.kick-viewer-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.68rem;
    font-weight: 600;
}

.kick-viewer-btn:hover {
    background: #ef4444;
    color: #fff;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
    text-align: left;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Chat Smilies */
.chat-smilie {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.15s;
    position: relative;
}

.chat-smilie:hover {
    transform: scale(2.5);
    z-index: 50;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.chat-user-mention {
    cursor: pointer;
    transition: opacity 0.15s;
}

.chat-user-mention:hover {
    text-decoration: underline;
    opacity: 0.85;
}

.smilie-pick-item {
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s, transform 0.15s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.smilie-pick-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulseLive {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Context Menu */
.user-context-menu {
    position: fixed;
    background: rgba(241, 255, 238, 0.98) !important;
    backdrop-filter: blur(28px) !important;
    border: 2px solid #88aa88 !important;
    border-radius: var(--radius-md) !important;
    padding: 6px !important;
    z-index: 9999 !important;
    box-shadow: 0 15px 35px rgba(47, 111, 46, 0.25) !important;
    min-width: 190px !important;
    max-width: 240px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, 'Inter', sans-serif !important;
    animation: ctxFadeIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ctxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-4px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ctx-user-header {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #2F6F2E !important;
    padding: 6px 10px 4px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ctx-divider {
    height: 1px !important;
    background: #88aa88 !important;
    margin: 4px 0 !important;
}

.ctx-menu-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.context-menu-btn {
    background: transparent !important;
    border: none !important;
    color: #1F4F1E !important;
    text-align: left !important;
    width: 100% !important;
    padding: 7px 10px !important;
    border-radius: 6px !important;
    font-size: 0.83rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: background 0.12s !important;
    line-height: 1.3 !important;
}

.context-menu-btn:hover {
    background: #d7f3d1 !important;
    color: #1F4F1E !important;
    transform: none !important;
}

.context-menu-btn.danger-ctx:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #dc2626 !important;
}

.ctx-icon {
    font-size: 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
}

.mobile-toggle-btn {
    display: none !important;
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */
@media (max-width: 768px) {

    /* Auth: Stack on mobile */
    #auth-screen {
        flex-direction: column;
        overflow-y: auto;
    }

    .auth-promo {
        display: none;
    }

    .auth-form-wrapper {
        width: 100%;
        max-width: 100%;
        min-height: 100%;
        padding: 1.5rem 1rem;
        padding-top: 5rem;
        align-items: flex-start;
    }

    .auth-card {
        width: 100%;
        padding: 2rem 1.5rem;
    }

    /* Guest login row: stack vertically on mobile */
    .auth-guest-row {
        flex-direction: column;
    }

    .auth-guest-row input {
        width: 100%;
    }

    .auth-btn-ghost {
        width: 100%;
        justify-content: center;
    }

    /* SEO Section mobile fixes */
    #seo-section {
        padding: 2rem 1rem !important;
    }

    #seo-section .glass-panel {
        padding: 1.5rem 1rem !important;
    }

    #seo-section h1 {
        font-size: 1.5rem !important;
    }

    #seo-section h2 {
        font-size: 1.2rem !important;
    }

    #seo-section h3 {
        font-size: 1rem !important;
    }

    #seo-section p {
        font-size: 0.9rem !important;
    }

    /* SEO grid: stack on mobile */
    #seo-section > div[style*="grid"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Chat: Mobile */
    .mobile-toggle-btn {
        display: inline-flex !important;
    }

    #chat-interface {
        height: 100%;
        width: 100%;
    }

    /* ===== HEADER MOBILE FIX ===== */
    .chat-header {
        padding: 0.4rem 0.5rem;
        flex-wrap: wrap;
        gap: 0.3rem;
        overflow: visible;
    }

    .header-user-info {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

    .header-actions {
        flex: 0 0 auto;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.25rem !important;
    }

    /* Hide many header buttons on mobile, keep essentials */
    .chat-header .secondary-btn:not(#mobile-rooms-btn):not(#mobile-users-btn):not(#mobile-menu-btn):not(#settings-btn):not(#toggle-sound-btn):not(#start-my-cam-btn) {
        display: none !important;
    }

    .chat-header #settings-menu .secondary-btn:not(.hidden) {
        display: block !important;
    }

    .chat-header #settings-menu select#my-status-select {
        display: block !important;
    }

    /* Make cam button compact on mobile */
    #start-my-cam-btn {
        font-size: 0.8rem !important;
        padding: 5px 10px !important;
        white-space: nowrap;
    }

    /* Logout button compact */
    #logout-btn {
        font-size: 0.8rem !important;
        padding: 5px 10px !important;
    }

    /* Mobile toggle buttons small */
    .mobile-toggle-btn {
        font-size: 1rem !important;
        padding: 5px 8px !important;
        min-width: auto !important;
    }

    .chat-main {
        flex-direction: row;
        overflow: hidden;
        position: relative;
    }

    .chat-area {
        width: 100%;
        min-width: 100%;
    }

    /* Chat input area - prevent overflow */
    .chat-input-area {
        padding: 0.5rem 0.5rem;
        gap: 0.4rem;
    }

    .chat-input-area #chat-input {
        min-width: 0;
        flex: 1;
        font-size: 0.9rem;
    }

    .chat-input-area #send-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Smilie Picker mobile */
    #smilie-picker-popover {
        width: 95vw !important;
        height: 60vh !important;
        left: 2.5vw !important;
        bottom: 70px !important;
    }

    #pm-smilie-picker-popover {
        width: 95vw !important;
        height: 60vh !important;
    }

    /* Offcanvas sidebars */
    .rooms-area,
    .user-list-area {
        position: absolute;
        top: 0;
        bottom: 0;
        z-index: 100;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 260px;
        max-width: 82vw;
        border-radius: 0;
        flex: none;
        background: rgba(6, 9, 15, 0.98);
        backdrop-filter: blur(28px);
        border: none;
    }

    .rooms-area {
        left: 0;
        transform: translateX(-100%);
        border-right: 1px solid var(--border-strong);
    }

    .rooms-area.show {
        transform: translateX(0);
    }

    .user-list-area {
        right: 0;
        transform: translateX(100%);
        border-left: 1px solid var(--border-strong);
    }

    .user-list-area.show {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        z-index: 90;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.show {
        display: block;
    }

    #cams-container {
        pointer-events: none;
        z-index: 150;
    }

    .cam-box {
        width: 160px;
        height: auto;
        pointer-events: auto;
    }

    .cam-video-area video {
        height: 120px;
    }

    #my-cam-box {
        position: fixed !important;
        bottom: 70px !important;
        right: 10px !important;
        width: 140px !important;
        border-radius: 8px !important;
        z-index: 200 !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
    }

    /* PM windows on mobile: full-width */
    .pm-window-instance {
        width: 95vw !important;
        height: 65vh !important;
        top: 10vh !important;
        left: 2.5vw !important;
        right: auto !important;
    }

    /* Minimized on mobile: stays where it is, collapses to header bar */
    .pm-window-instance.pm-minimized {
        width: 240px !important;
        height: 74px !important;
    }

    /* Modals on mobile */
    .glass-panel[id$="-modal"] > div,
    div[id$="-modal"] > .glass-panel,
    div[id$="-modal"] > .modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
        padding: 1.5rem 1rem !important;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
        border-radius: var(--radius-lg);
    }

    .auth-form-title {
        font-size: 1.3rem;
    }

    .auth-btn-primary {
        font-size: 0.9rem;
    }

    .auth-form-wrapper {
        padding-top: 4.5rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Header: even more compact */
    .chat-header {
        padding: 0.3rem 0.4rem;
    }

    /* Make cam start button even smaller */
    #start-my-cam-btn {
        font-size: 0.7rem !important;
        padding: 4px 7px !important;
    }

    /* logout btn */
    #logout-btn {
        font-size: 0.7rem !important;
        padding: 4px 7px !important;
    }

    .mobile-toggle-btn {
        font-size: 0.9rem !important;
        padding: 4px 6px !important;
    }

    /* SEO section even more compact */
    #seo-section {
        padding: 1rem 0.5rem !important;
    }

    #seo-section h1 {
        font-size: 1.2rem !important;
    }
}

/* Tablet: show smaller promo */
@media (min-width: 769px) and (max-width: 1100px) {
    .auth-promo {
        padding: 2rem;
    }

    .auth-logo-big {
        font-size: 2.5rem;
    }

    .auth-promo-headline {
        font-size: 1.9rem;
    }

    .auth-promo-sub {
        font-size: 0.9rem;
    }
}


/* Layout Container (Fixed full window height/width without jumping) */
.admin-body {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    height: 100vh !important;
    width: 100vw !important;
    background: #eaf7ea url('bg1.png') repeat !important;
    color: #1F4F1E !important;
    font-family: Verdana, sans-serif !important;
}

.admin-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: transparent;
}

/* Admin Sidebar */
.admin-sidebar {
    width: 270px;
    min-width: 270px;
    background: rgba(243, 255, 227, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 2px solid #88aa88;
    padding: 1.8rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    z-index: 10;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.admin-brand h1 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2F6F2E, #1F4F1E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.admin-brand .version-tag {
    font-size: 0.7rem;
    background: rgba(47, 111, 46, 0.15);
    color: #2F6F2E;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    border: 1px solid #88aa88;
    font-weight: 600;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #2F6F2E;
    text-align: left;
    padding: 0.85rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: none;
    margin-bottom: 0;
}

.tab-btn:hover {
    background: #d7f3d1;
    color: #1F4F1E;
    border-color: #88aa88;
    transform: translateX(3px);
}

.tab-btn.active {
    background: #d7f3d1;
    color: #1F4F1E;
    border: 1px solid #88aa88;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(47, 111, 46, 0.2);
}

/* Main Content Wrapper - Fixes Width Jumping */
.admin-main {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Top Header & Stats Cards */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.admin-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1F4F1E;
    letter-spacing: -0.5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

.stat-card {
    background: rgba(241, 255, 238, 0.95);
    backdrop-filter: blur(12px);
    border: 2px solid #88aa88;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #349658;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(52, 150, 88, 0.2), rgba(39, 112, 66, 0.2));
    border: 1px solid #88aa88;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #2F6F2E;
}

.stat-info .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1F4F1E;
    line-height: 1.2;
}

.stat-info .stat-label {
    font-size: 0.825rem;
    color: #2F6F2E;
    font-weight: 600;
}

/* Tab Containers */
.tab-content {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
    flex: 1;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: flex;
}

/* Modern Glass Table Styling - Adapted to etchat_green */
.glass-table-container {
    background: rgba(241, 255, 238, 0.95);
    backdrop-filter: blur(16px);
    border: 2px solid #88aa88;
    border-radius: 16px;
    padding: 1.25rem;
    overflow-x: auto;
    width: 100%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.glass-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #1F4F1E;
}

.glass-table th {
    background: #d7f3d1;
    padding: 1rem 1.2rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1F4F1E;
    border-bottom: 2px solid #88aa88;
    text-align: left;
}

.glass-table th:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.glass-table th:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.glass-table td {
    padding: 1rem 1.2rem;
    vertical-align: middle;
    border-bottom: 1px solid #88aa88;
    font-size: 0.925rem;
    text-align: left;
    color: #1F4F1E;
}

.glass-table tbody tr:nth-child(even) {
    background: #efffe3;
}

.glass-table tbody tr:nth-child(odd) {
    background: #d0ddd0;
}

.glass-table tr {
    transition: background 0.2s ease;
}

.glass-table tbody tr:hover {
    background: #c3e6bf;
}

/* Modern Toggle Switch Component */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d0ddd0;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
    border: 1px solid #88aa88;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background: linear-gradient(135deg, #349658, #277042);
    border-color: #277042;
}

input:checked+.slider:before {
    transform: translateX(20px);
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Custom Table Controls */
.glass-table input[type="text"],
.glass-table input[type="number"],
.glass-table select {
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    border: 1px solid #88aa88;
    background: #f3ffe3;
    color: #1F4F1E;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
    width: 60px;
    text-align: center;
}

.glass-table input[type="text"] {
    width: 120px;
    text-align: left;
}

/* Remove Arrows from Number Inputs */
.glass-table input[type="number"]::-webkit-outer-spin-button,
.glass-table input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.glass-table input[type="number"] {
    -moz-appearance: textfield;
}

.glass-table input[type="text"]:focus,
.glass-table input[type="number"]:focus,
.glass-table select:focus {
    border-color: #349658;
}

.glass-table input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    width: 38px;
    height: 38px;
    padding: 0 !important;
    margin: 0;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    overflow: hidden;
}

.glass-table input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    margin: 0;
}

.glass-table input[type="color"]::-webkit-color-swatch {
    border: 1px solid #88aa88;
    border-radius: 6px;
}

.glass-table input[type="color"]::-moz-color-swatch {
    border: 1px solid #88aa88;
    border-radius: 6px;
}

/* Status Badges */
.badge-status {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-status.success {
    background: rgba(47, 111, 46, 0.15);
    color: #2F6F2E;
    border: 1px solid #88aa88;
}

.badge-status.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #c53030;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-status.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #b7791f;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-status.info {
    background: rgba(52, 150, 88, 0.15);
    color: #277042;
    border: 1px solid #88aa88;
}

/* Action Buttons inside tables */
.btn-sm {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
}

/* Responsive Mobile Admin */
@media (max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        padding: 1rem;
        border-right: none;
        border-bottom: 2px solid #88aa88;
    }

    .admin-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 0.6rem 0.9rem;
    }

    .admin-main {
        padding: 1.25rem;
        height: auto;
        overflow-y: visible;
    }
}

.message.whisper {
    background: #d7f3d1 !important;
    border: 1px solid #88aa88 !important;
    color: #1F4F1E !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.whisper-reply-btn {
    margin-top: 6px;
    padding: 4px 9px;
    border: 1px solid #88aa88;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.7);
    color: #1F4F1E;
    cursor: pointer;
    font: inherit;
}

.whisper-reply-btn:hover {
    background: #ffffff;
}

.smilie-pick-item {
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.smilie-pick-item:hover {
    background: #d7f3d1;
}

.picker-smilie-img {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.picker-emoji {
    font-size: 1.3rem;
}

@media (min-width: 768px) and (pointer: fine) {
    .picker-smilie-img {
        max-width: 64px;
        max-height: 64px;
    }

    .picker-emoji {
        font-size: 2.6rem;
    }
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #efffe3;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #88aa88;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #349658;
}

.smilie-category-tab {
    padding: 6px 10px;
    border-radius: 6px;
    background: #f3ffe3;
    color: #1F4F1E;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid #88aa88;
}

.smilie-category-tab:hover {
    background: #d7f3d1;
    color: #1F4F1E;
}

.smilie-category-tab.active {
    background: linear-gradient(135deg, #349658, #277042);
    color: #ffffff;
    border-color: #277042;
}

/* Pagination Controls */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(241, 255, 238, 0.95);
    backdrop-filter: blur(12px);
    border: 2px solid #88aa88;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-select,
.filter-select {
    background: #f3ffe3;
    border: 1px solid #88aa88;
    color: #1F4F1E;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: 0.2s;
}

.pagination-select:hover,
.filter-select:hover {
    border-color: #349658;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #d7f3d1;
    border-radius: 8px;
    padding: 0.25rem;
    border: 1px solid #88aa88;
}

.page-btn {
    background: transparent;
    border: none;
    color: #1F4F1E;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: #88aa88;
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.page-info {
    color: #1F4F1E;
    font-size: 0.85rem;
    padding: 0 0.5rem;
    font-weight: 600;
}

/* PM Dock - no longer used for positioning, kept as empty container */
#pm-dock {
    display: none;
}

.pm-window-instance {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border: 2px solid #88aa88 !important;
    background: #f1ffee !important;
    border-radius: 12px;
    transition: height 0.2s ease;
    width: 440px;
    height: 540px;
    position: fixed;
    color: #1F4F1E;
}

/* Minimized: stays in place, collapses to just the header bar */
.pm-window-instance.pm-minimized {
    height: 44px !important;
    overflow: hidden;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Hide everything below the header when minimized */
.pm-window-instance.pm-minimized .pm-content-area,
.pm-window-instance.pm-minimized .pm-cam-area {
    display: none !important;
}

/* Header stays as the drag handle when minimized */
.pm-window-instance.pm-minimized .pm-header {
    cursor: grab;
    border-radius: 12px;
}

.pm-window-instance .pm-header {
    background: #f3ffe3 !important;
    border-bottom: 2px solid #88aa88 !important;
    color: #1F4F1E !important;
}

.pm-window-instance .pm-content-area {
    background-color: #f1ffee !important;
    background-image: url('lo.png') !important;
    background-repeat: no-repeat !important;
    background-position: bottom right !important;
    color: #1F4F1E !important;
}

.pm-window-instance .pm-messages-list {
    background: transparent !important;
}

.pm-window-instance .pm-chat-input {
    background-color: #f3ffe3 !important;
    border: 1px solid #88aa88 !important;
    color: #1F4F1E !important;
}

.pm-window-instance .pm-header {
    padding: 0.55rem 0.75rem !important;
    gap: 8px;
}
.pm-window-instance .pm-header > div:first-child {
    min-width: 0;
    flex: 1;
    white-space: nowrap;
}
.pm-window-instance .pm-header > div:first-child span:last-child {
    white-space: nowrap;
    flex-shrink: 0;
}
.pm-window-instance .pm-target-username {
    overflow: hidden;
    text-overflow: ellipsis;
}
.pm-window-instance .pm-header > div:last-child {
    flex-shrink: 0;
}
.pm-window-instance .pm-cam-btn {
    white-space: nowrap;
    border-radius: 8px !important;
    box-shadow: none !important;
}
.pm-window-instance .pm-minimize-btn,
.pm-window-instance .pm-close-btn {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d7f3d1 !important;
    border: 1px solid #88aa88 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: #1F4F1E !important;
    line-height: 1;
}
.pm-window-instance .pm-minimize-btn:hover { background: #bfe6b6 !important; }
.pm-window-instance .pm-close-btn:hover { background: #c53030 !important; color: #fff !important; }
.pm-window-instance .pm-emoji-btn,
.pm-window-instance .pm-upload-btn {
    background: #d7f3d1 !important;
    border: 1px solid #88aa88 !important;
    box-shadow: none !important;
    color: #1F4F1E !important;
}
.pm-window-instance .pm-chat-input::placeholder { color: #5f8a5e; }
.pm-window-instance .pm-send-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

#pm-smilie-picker-popover {
    background: #f1ffee !important;
    border: 2px solid #88aa88 !important;
    color: #1F4F1E !important;
}

#pm-smilie-picker-popover .pm-smilie-drag-handle {
    background: #f3ffe3 !important;
    border-bottom: 2px solid #88aa88 !important;
    color: #1F4F1E !important;
}
/* Rechtliche Modals: lesbare Farben auf hellem Panel */
#impressum-modal h3, #datenschutz-modal h3, #agb-modal h3 { color: #1F4F1E !important; }
#impressum-modal .glass-panel > div, #datenschutz-modal .glass-panel > div, #agb-modal .glass-panel > div { color: #000000 !important; }
#impressum-modal h4, #datenschutz-modal h4, #agb-modal h4 { color: #2F6F2E !important; }
#impressum-modal button, #datenschutz-modal button, #agb-modal button { color: #1F4F1E !important; }
#impressum-modal a, #datenschutz-modal a, #agb-modal a { color: #2F6F2E !important; }

/* Admin: Dark-Theme-Inline-Farben auf das helle grüne Theme umlegen */
.admin-main [style*="#f8fafc"]:not(button):not(.badge-status),
.admin-main [style*="#e2e8f0"]:not(button):not(.badge-status),
.admin-main [style*="#fff;"]:not(button):not(.badge-status) { color: #1F4F1E !important; }
.admin-main [style*="#cbd5e1"]:not(button):not(.badge-status) { color: #1F4F1E !important; }
.admin-main [style*="#94a3b8"]:not(button):not(.badge-status) { color: #557755 !important; }
.admin-main [style*="#64748b"]:not(.badge-status) { color: #557755 !important; }
.admin-main .pagination-info, .admin-main .pagination-bar span { color: #1F4F1E !important; }
.admin-main table td, .admin-main table td strong { color: #000000; }
.admin-main table td strong[style] { color: #000000 !important; }

.admin-main input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.admin-main textarea,
.admin-main select {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #88aa88 !important;
}
.admin-main input::placeholder, .admin-main textarea::placeholder { color: #6b8a6b !important; }

.admin-main code[style] {
    background: #e3f3e0 !important;
    color: #9a3d00 !important;
    border: 1px solid #b7d3b4;
}
.admin-main .badge-status[style*="#64748b"] {
    color: #557755 !important;
    background: #e3f3e0 !important;
}
.admin-main [style*="rgba(255,255,255,0.05)"]:not(button),
.admin-main [style*="rgba(255,255,255,0.1)"]:not(button) { border-color: #b7d3b4 !important; }
.admin-main div[style*="background: rgba(0,0,0,0.3)"],
.admin-main div[style*="background:rgba(0,0,0,0.3)"],
.admin-main div[style*="background: rgba(0,0,0,0.4)"],
.admin-main div[style*="background:rgba(0,0,0,0.4)"] { background: #eaf7ea !important; }

/* Größere Usernamen in der Userliste */
#users-list .user-name-text { font-size: 1.05rem; }
#users-list .user-list-item { padding: 0.5rem 0.6rem; }

/* Einheitliche Chat-Schriftgröße (15px), vom Leser per A-/A+ individuell änderbar */
:root { --chat-font-size: 15px; }
.chat-messages .message,
.chat-messages .message .meta,
.chat-messages .message .time,
.chat-messages .message .user,
.chat-messages .message .text,
.chat-messages .message.system,
.chat-messages .message .text * { font-size: var(--chat-font-size) !important; }
.font-size-btn { font-weight: 700; font-size: 0.85rem; min-width: 38px; }

/* Profil-Modal: Farben passend zum hellen Theme */
#my-profile-modal h3 { color: #1F4F1E !important; }
#my-profile-modal button[onclick] { color: #1F4F1E !important; }
#my-profile-modal select,
#my-profile-modal input[type="text"],
#my-profile-modal textarea {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #88aa88 !important;
}
#my-profile-modal label { color: #1F4F1E !important; }

/* Modals auf hellem Panel: durchgehend lesbare Farben (Chat + Admin) */
div[id$="-modal"]:not(#admin-cam-modal):not(#image-zoom-modal) .glass-panel :is(h1,h2,h3,h4) { color: #1F4F1E !important; text-shadow: none !important; }
div[id$="-modal"]:not(#admin-cam-modal):not(#image-zoom-modal) .glass-panel :is(label,p,span,small,li,div):not(button *):not(.primary-btn):not(.secondary-btn):not(.danger-btn) { color: #2F6F2E; }
div[id$="-modal"]:not(#admin-cam-modal):not(#image-zoom-modal) .glass-panel :is(label,small) { color: #2F6F2E !important; text-shadow: none !important; }
div[id$="-modal"]:not(#admin-cam-modal):not(#image-zoom-modal) .glass-panel :is(input,select,textarea) { background: #f3ffe3 !important; color: #1F4F1E !important; border: 1px solid #88aa88 !important; }
div[id$="-modal"]:not(#admin-cam-modal):not(#image-zoom-modal) .glass-panel select option { background: #f3ffe3; color: #1F4F1E; }
div[id$="-modal"]:not(#admin-cam-modal):not(#image-zoom-modal) .glass-panel ::placeholder { color: #6f9a6e; }
div[id$="-modal"]:not(#admin-cam-modal):not(#image-zoom-modal) .glass-panel :is([style*="#94a3b8"],[style*="#cbd5e1"],[style*="#f8fafc"],[style*="#e2e8f0"]):not(button):not(.primary-btn):not(.secondary-btn) { color: #2F6F2E !important; }

#my-profile-scroll .form-group { margin-bottom: 0.6rem; }
#my-profile-scroll textarea { min-height: 60px; }

.advent-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2500;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(10, 24, 17, 0.78);
    backdrop-filter: blur(8px);
}

.advent-panel {
    width: min(620px, 100%);
    max-height: min(90vh, 760px);
    overflow-y: auto;
    padding: clamp(1rem, 4vw, 2rem);
    border: 1px solid rgba(52, 150, 88, 0.4);
    border-radius: 18px;
    background-image:
        linear-gradient(rgba(244, 255, 240, 0.82), rgba(244, 255, 240, 0.88)),
        url('/advent-background.jpg');
    background-position: center;
    background-size: cover;
    color: #1f4f1e;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.advent-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.advent-header h2 {
    margin: 0;
    color: #1f4f1e;
    font-family: 'Outfit', sans-serif;
}

.advent-header p {
    margin: 0.35rem 0 0;
    color: #557755;
}

.advent-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.55rem;
}

.advent-door {
    min-height: clamp(44px, 9vw, 68px);
    border: 1px solid #b87832;
    border-radius: 10px;
    background: linear-gradient(145deg, #b93632, #8d211f);
    color: #fff8df;
    font: 800 clamp(1rem, 3vw, 1.35rem) 'Outfit', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    box-shadow: 0 3px 7px rgba(75, 25, 16, 0.18);
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.advent-door:hover:not(:disabled),
.advent-door:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.12);
    outline: 2px solid #d6aa52;
    outline-offset: 2px;
}

.advent-door.is-locked {
    background: linear-gradient(145deg, #9ba99c, #758579);
    border-color: #738276;
    color: #f3f5ef;
}

.advent-door.is-opened {
    background: linear-gradient(145deg, #d7a84c, #a87325);
    border-color: #98671f;
}

.advent-door:disabled {
    cursor: wait;
    opacity: 0.75;
}

.advent-content {
    min-height: 190px;
    padding: 1rem;
    border: 1px solid #d8c391;
    border-radius: 12px;
    background: rgba(255, 253, 245, 0.95);
    color: #273d2b;
    line-height: 1.6;
}

.advent-content h3 {
    margin: 0 0 0.75rem;
    color: #9d3029;
}

.advent-content img {
    max-width: 100%;
    height: auto;
}

.advent-content iframe {
    display: block;
    max-width: 100%;
    margin: 0.5rem auto;
    border: 0;
    border-radius: 8px;
}

.advent-content #advent-calendar-back {
    margin-top: 1rem;
}

.advent-status {
    min-height: 1.25rem;
    margin: 0.75rem 0 0;
    color: #8d302a;
}

.advent-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 1rem;
}

.advent-admin-door {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.16);
}

.advent-admin-door label {
    color: #f8fafc;
    font-weight: 700;
}

.advent-admin-door textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 0.7rem;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font: 0.85rem/1.5 monospace;
}

@media (max-width: 480px) {
    .advent-grid {
        gap: 0.35rem;
    }

    .advent-door {
        border-radius: 7px;
    }
}
@media (max-height: 800px) { #my-profile-modal .glass-panel { padding: 1rem 1.25rem !important; } }

/* Handy-Menü */
#mobile-menu-panel {
    position: fixed;
    top: 52px;
    right: 8px;
    z-index: 900;
    width: min(260px, calc(100vw - 16px));
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.6rem;
    background: #f3ffe3;
    border: 2px solid #88aa88;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#mobile-menu-panel[hidden] {
    display: none;
}

.mobile-menu-item,
.mobile-menu-status {
    min-height: 44px;
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #1F4F1E;
    background: #ffffff;
    border: 1px solid #88aa88;
    border-radius: 8px;
    cursor: pointer;
}

@media (max-width: 768px) {
    /* Kopfzeile: eine einzige schlanke Zeile */
    .chat-header {
        flex-wrap: nowrap !important;
        padding: 0.25rem 0.4rem !important;
        gap: 0.3rem !important;
        min-height: 0;
    }

    .header-user-info {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    .radio-header-announcement {
        min-width: 0;
        font-size: 0.68rem;
    }

    .radio-header-track {
        font-size: 0.7rem;
    }

    .radio-header-next-show {
        font-size: 0.64rem;
    }

    .header-actions {
        flex: 1 1 auto !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end;
        min-width: 0;
    }

    .chat-header #logout-btn,
    .chat-header #start-my-cam-btn {
        display: none !important;
    }

    .chat-header .secondary-btn {
        font-size: 0.85rem !important;
        padding: 6px 10px !important;
        white-space: nowrap;
    }

    /* Raum- und Ankündigungsbanner: maximal zwei kleine Zeilen */
    #room-banner,
    #pinned-banner {
        padding: 3px 8px !important;
        font-size: 0.72rem !important;
        line-height: 1.25 !important;
        max-height: 2.7em;
        overflow: hidden;
    }

    /* Eingabezeile: eine Reihe, Textfeld bekommt den meisten Platz */
    .chat-input-area {
        flex-wrap: nowrap !important;
        align-items: center;
        gap: 0.3rem !important;
        padding: 0.35rem 0.4rem !important;
    }

    .chat-input-area .font-size-btn {
        display: none !important;
    }

    .chat-input-area .icon-btn {
        order: 0;
        flex: 0 0 auto;
        min-width: 38px;
        padding: 6px !important;
    }

    .chat-input-area #chat-input {
        order: 1;
        flex: 1 1 0;
        min-width: 0;
        min-height: 42px;
        font-size: 16px;
        padding: 0.4rem 0.6rem;
    }

    .chat-input-area #send-btn {
        order: 2;
        flex: 0 0 auto;
        min-height: 42px;
        padding: 0 0.8rem;
        font-size: 0.85rem;
    }

    .chat-footer-nav {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        white-space: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mobile-menu-danger {
        color: #b91c1c;
        border-color: #fca5a5;
    }

    #my-profile-modal .glass-panel {
        max-height: 92vh;
        max-height: 92dvh;
    }

    #my-profile-modal input,
    #my-profile-modal select,
    #my-profile-modal textarea {
        font-size: 16px;
    }
}
