/* === Production App CSS Bundle === */

/* File: style.css */
:root {
    --bg-darkest: #111214;
    --bg-tertiary: #1e1f22;
    --bg-secondary: #2b2d31;
    --bg-primary: #313338;
    --bg-hover: #35373c;
    --bg-active: #3f4248;
    --blurple: #5865F2;
    --blurple-hover: #4752c4;
    --gold: #f59e0b;
    --gold-glow: rgba(245, 158, 11, 0.4);
    --green: #23a55a;
    --red: #f23f43;
    --purple: #9333ea;
    --text-primary: #f2f3f5;
    --text-secondary: #dbdee1;
    --text-muted: #949ba4;
    --border-color: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'gg sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-darkest);
    color: var(--text-secondary);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    user-select: none;
}

/* App Main Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* 1. Top Navbar: Strict 3-column Grid matching .main-workspace (240px 1fr 280px) */
.top-navbar {
    height: 52px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    align-items: center;
    padding: 0;
    z-index: 10;
    flex-shrink: 0;
}

.nav-left {
    width: 240px;
    height: 100%;
    padding: 0 14px;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--border-color);
    box-sizing: border-box;
    position: relative;
}

.nav-brand-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    min-width: 170px;
}

.room-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-icon {
    font-size: 16px;
    line-height: 1;
}

.room-title-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    cursor: pointer;
}

.edit-room-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.7;
    transition: opacity 0.15s;
    padding: 2px 4px;
}
.edit-room-btn:hover {
    opacity: 1;
}

/* Edit Room Name In-app Popover */
.edit-room-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 10px;
    width: 220px;
    z-index: 300;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* Top Center: Mini Music Player (Aligned with Stage left boundary at 240px) */
.nav-center {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
    justify-content: flex-start;
}

.digital-clock {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    padding-left: 1px;
}

.digital-clock .clock-sep {
    opacity: 0.35;
    font-size: 9px;
}

/* Top Right: Status */
.nav-actions {
    width: 280px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 16px;
    border-left: 1px solid var(--border-color);
    box-sizing: border-box;
}

.connection-status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(87, 242, 135, 0.1);
    border: 1px solid rgba(87, 242, 135, 0.2);
    padding: 3px 10px;
    border-radius: 12px;
}

.status-dot.online {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--green);
}

.status-text {
    font-size: 11px;
    color: var(--green);
    font-weight: 600;
}

/* 2. Main Body Grid: Three Column Layout (240px + 1fr + 280px) */
.main-workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    height: calc(100vh - 56px);
    overflow: hidden;
    background: var(--bg-primary);
    transition: grid-template-columns 0.2s ease;
}

.main-workspace.hide-right-sidebar {
    grid-template-columns: 240px 1fr !important;
}

.main-workspace.hide-right-sidebar .right-sidebar {
    display: none !important;
}

/* Left Sidebar (240px) */
.left-sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Upper Left: Message Board (Aligned with 50% Stage boundary) */
.sidebar-upper {
    height: 50%;
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

/* Lower Left: Online Characters (Aligned horizontally with 50% Chat boundary) */
.sidebar-lower {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 6px; /* 距离底部一个角色的间距 */
}

.sidebar-title-bar {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
}

.side-btn-sm {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}
.side-btn-sm:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Middle Center Workspace (Stage on top + Chat on bottom) */
.center-workspace {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
}

/* Bottom Chat Container (Takes 50% of Center) */
.chat-container {
    height: 50%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    position: relative;
}

/* Right Sidebar (280px Activities Column) */
.right-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    overflow-y: auto;
}

/* Messages Scroller */
.messages-scroller {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #202225 transparent;
}

/* Message Item */
.chat-msg {
    display: flex;
    gap: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.1s;
}

.chat-msg:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* System Behavior Notices (Special Colored Fonts) */
.chat-msg.system-notice {
    align-items: center;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.system-notice.behavior-enter {
    color: #fbbf24; /* Warm Gold for Homecoming */
    border-left: 3px solid #fbbf24;
}

.system-notice.behavior-leave {
    color: #94a3b8; /* Muted Slate for Going out */
    border-left: 3px solid #64748b;
}

.system-notice.behavior-shop {
    color: #f97316; /* Amber Orange for Snacks */
    border-left: 3px solid #f97316;
}

.system-notice.behavior-music {
    color: #38bdf8; /* Sky Blue for Music */
    border-left: 3px solid #0284c7;
}

.system-notice.behavior-toilet {
    color: #a855f7; /* Purple for Toilet */
    border-left: 3px solid #a855f7;
}

.system-notice.behavior-pet {
    color: #ec4899; /* Pink for Pet */
    border-left: 3px solid #ec4899;
}

.system-notice.behavior-plant {
    color: #4ade80; /* Emerald for Plant */
    border-left: 3px solid #22c55e;
}

/* ======================================================== */
/* 📰 复古报纸消息卡片 (Newspaper Message Card)               */
/* ======================================================== */
.chat-msg.newspaper-msg {
    padding: 0;
    margin: 6px 0;
    width: 100%;
}

.newspaper-card-body {
    background: linear-gradient(135deg, #fdfbf7 0%, #f4eee1 100%);
    border: 2px solid #8c7b69;
    border-radius: 8px;
    padding: 12px 14px;
    color: #2c251e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
    font-family: Georgia, 'Times New Roman', 'Songti SC', 'SimSun', serif;
    width: 100%;
    box-sizing: border-box;
}

.newspaper-header-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
}

.newspaper-brand-title {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #1a1612;
    text-transform: uppercase;
    border-bottom: 2px solid #1a1612;
    padding-bottom: 3px;
    display: inline-block;
}

.newspaper-sub-meta {
    font-size: 11px;
    color: #6b5c4d;
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 4px;
    font-weight: 600;
    font-family: system-ui, -apple-system, sans-serif;
}

.newspaper-double-divider {
    height: 4px;
    border-top: 1px solid #8c7b69;
    border-bottom: 1px solid #8c7b69;
    margin: 8px 0;
}

.newspaper-articles-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
    transition: all 0.3s ease;
}

.newspaper-articles-container.is-collapsed {
    display: none !important;
}

.newspaper-article-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed #b8a994;
    padding: 8px 10px;
    border-radius: 6px;
    font-family: system-ui, -apple-system, sans-serif;
}

.newspaper-article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.newspaper-article-tag {
    font-size: 11px;
    font-weight: 800;
    color: #b91c1c;
    background: #fee2e2;
    padding: 1px 6px;
    border-radius: 4px;
}

.newspaper-article-num {
    font-size: 10px;
    font-weight: 800;
    color: #78350f;
}

.newspaper-article-title {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.35;
}

.newspaper-article-snippet {
    font-size: 12px;
    color: #374151;
    line-height: 1.45;
    word-break: break-word;
}

.newspaper-footer-bar {
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid #d6c7b2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #6b5c4d;
    font-family: system-ui, -apple-system, sans-serif;
}

.newspaper-toggle-btn {
    background: #8c7b69;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.newspaper-toggle-btn:hover {
    background: #6b5c4d;
    transform: scale(1.04);
}

/* User Message */
.msg-avatar-ball {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.msg-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.msg-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.msg-author {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.msg-author.is-host::after {
    content: "👑 房主";
    font-size: 10px;
    margin-left: 6px;
    background: #f59e0b;
    color: #000;
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: 800;
}

.msg-time {
    font-size: 11px;
    color: var(--text-muted);
}

.msg-reward-tag {
    font-size: 11px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
}

.msg-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.45;
    word-break: break-word;
    user-select: text;
}

/* Voice Note Player Bubble */
.voice-bubble {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2b2d31;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    width: max-content;
    min-width: 130px;
    transition: background 0.15s, transform 0.1s;
}

.voice-bubble:hover {
    background: #35373c;
    transform: scale(1.02);
}

.voice-play-icon {
    font-size: 16px;
    color: var(--green);
}

.voice-wave {
    display: flex;
    align-items: center;
    gap: 3px;
}

.voice-bar {
    width: 3px;
    height: 12px;
    background: var(--text-muted);
    border-radius: 2px;
}
.voice-bubble.playing .voice-bar {
    background: var(--green);
    animation: waveBounce 0.6s ease-in-out infinite alternate;
}
.voice-bubble.playing .voice-bar:nth-child(2n) { animation-delay: 0.15s; }
.voice-bubble.playing .voice-bar:nth-child(3n) { animation-delay: 0.3s; }
.voice-bubble.playing .voice-bar:nth-child(4n) { animation-delay: 0.45s; }
.voice-bubble.playing .voice-bar:nth-child(5n) { animation-delay: 0.2s; }

@keyframes waveBounce {
    0% { height: 6px; }
    100% { height: 20px; }
}

.voice-duration {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Chat Input Bar with Push-to-Talk & Voice Recording */
.chat-controls-bar {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.chat-mode-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.voice-mode-toggles {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-pill {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s;
}

.mode-pill.active {
    background: var(--green);
    color: white;
}

/* Push to Talk Key Button */
.ptt-key-btn {
    background: #2b2d31;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ptt-key-btn.is-pressing {
    background: var(--green);
    border-color: var(--green);
    box-shadow: 0 0 10px var(--green);
    color: white;
}

/* Minimalist Outline Toolbar (Inspired by reference UI) */
.chat-toolbar-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 6px 6px 2px;
    position: relative;
}

.chat-tool-btn {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted, #94a3b8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.chat-tool-btn:hover {
    color: var(--text-primary, #ffffff);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.chat-tool-svg {
    display: block;
}

/* Input Form Row & Textarea Container */
.chat-input-row {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 4px 8px;
    gap: 8px;
    position: relative;
    margin: 0 -6px;
}

.chat-textarea-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.chat-input-row textarea,
#chat-text-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    padding: 6px 0;
    outline: none;
    resize: none;
    min-height: 24px;
    max-height: 100px;
    line-height: 1.45;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Frameless Linear Microphone Button */
.record-voice-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 4px !important;
    cursor: pointer;
    color: var(--text-muted, #94a3b8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s ease, transform 0.15s ease;
}

.record-voice-btn:hover {
    color: var(--primary-color, #5865f2);
    transform: scale(1.08);
}

.record-voice-btn.recording {
    color: #ef4444 !important;
    animation: voiceMicPulse 0.8s infinite alternate;
}

@keyframes voiceMicPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.18); opacity: 0.7; }
}

/* @ Mention Popover */
.at-mention-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    min-width: 220px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
    padding: 6px;
    z-index: 1000;
    animation: atPopoverSlideUp 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.at-mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

.at-mention-item.active,
.at-mention-item:hover {
    background: rgba(99, 102, 241, 0.3);
}

.at-mention-avatar {
    font-size: 18px;
    line-height: 1;
}

.at-mention-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.at-mention-title {
    font-size: 13px;
    font-weight: 600;
    color: #f8fafc;
}

.at-mention-sub {
    font-size: 11px;
    color: #94a3b8;
}

.at-mention-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: #6366f1;
    color: #ffffff;
}

.chat-char-counter {
    font-size: 11px;
    font-family: monospace, var(--font-main);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    user-select: none;
    transition: color 0.2s, background 0.2s, font-weight 0.2s;
}

.chat-char-counter.warning {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    font-weight: 600;
}

.chat-char-counter.limit {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.18);
    font-weight: 700;
}

.icon-action-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}

.icon-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.send-msg-btn {
    background: var(--blurple);
    color: white;
    border: none;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.send-msg-btn:hover {
    background: var(--blurple-hover);
}

/* Dedicated Voice Recording Button Style */
.record-voice-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.15s ease;
    user-select: none;
    flex-shrink: 0;
}
.record-voice-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}
.record-voice-btn.recording {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
    animation: pulseRecording 1s infinite alternate;
}
@keyframes pulseRecording {
    0% { transform: scale(0.96); }
    100% { transform: scale(1.04); }
}

/* Personal Inventory Bar (Collapsible with 10s auto downward slide animation) */
.personal-inventory-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0 10px;
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    border-color: transparent;
    overflow: hidden;
    transform: translateY(10px);
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease;
    pointer-events: none;
    position: relative;
}

.personal-inventory-bar.is-expanded {
    max-height: 52px;
    opacity: 1;
    padding: 4px 10px;
    margin-bottom: 6px;
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    pointer-events: auto;
}

.chat-tool-btn#toggle-inventory-btn.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.18);
}
.inventory-bar-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}
.inventory-slots-container {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
}
.inventory-slots-container::-webkit-scrollbar {
    display: none;
}
.inventory-empty-tip {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}
.inventory-slot-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-primary);
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
}
.inventory-slot-item:hover {
    background: rgba(88, 101, 242, 0.25);
    border-color: #5865f2;
    transform: translateY(-1px);
}
.inventory-item-count {
    background: #5865f2;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
    border-radius: 8px;
}

/* Use Item Inline Popover (Floats visibly directly above clicked inventory slot) */
.use-item-popover {
    position: absolute;
    top: auto !important;
    bottom: calc(100% + 8px) !important;
    left: 16px;
    width: 220px;
    z-index: 500;
    padding: 10px 12px;
    text-align: center;
    border-radius: 8px;
    background: rgba(22, 23, 27, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
}
.use-item-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.use-item-action-btn {
    background: var(--green);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.15s ease;
}
.use-item-action-btn:hover {
    background: #47d174;
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

/* Quick Funds Popover (Triggered by clicking nickname) */
.quick-funds-popover {
    position: absolute;
    bottom: 56px;
    left: 10px;
    width: 210px;
    z-index: 300;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.quick-funds-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
}
.funds-label {
    color: var(--text-muted);
}
.funds-val {
    color: #fbbf24;
    font-weight: 700;
}

/* Pure Emojis Popover (Directly above emoji trigger button, no text headers) */
.emoji-picker-popover.pure-emojis {
    position: absolute;
    bottom: 48px;
    left: 10px;
    background: rgba(22, 23, 27, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
    z-index: 250;
    width: 296px;
}
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    max-height: none;
    overflow: visible;
}
.emoji-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.1s, transform 0.1s;
}
.emoji-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.2);
}

/* Floating Coin Reward Animation */
.coin-float-notice {
    position: fixed;
    color: #fbbf24;
    font-size: 14px;
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 9999;
    animation: floatCoinUp 1.2s ease-out forwards;
}

@keyframes floatCoinUp {
    0% { transform: translateY(0) scale(0.8); opacity: 0; }
    20% { transform: translateY(-10px) scale(1.15); opacity: 1; }
    80% { transform: translateY(-30px) scale(1); opacity: 0.9; }
    100% { transform: translateY(-45px) scale(0.9); opacity: 0; }
}

/* History Messages Divider Banner */
.history-divider-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0 16px 0;
    position: relative;
    text-align: center;
}

.history-divider-banner::before,
.history-divider-banner::after {
    content: '';
    flex: 1;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.history-divider-banner span {
    padding: 4px 14px;
    background: rgba(30, 31, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin: 0 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Music Audio Wave Bars */
.music-wave-bars {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 16px;
    margin: 0 4px;
}
.wave-bar {
    width: 3px;
    height: 4px;
    background: #38bdf8;
    border-radius: 2px;
    transition: height 0.15s ease;
}
.nav-music-player:not(.is-paused) .wave-bar {
    animation: waveBarJump 0.75s ease-in-out infinite alternate;
}
.nav-music-player:not(.is-paused) .wave-bar:nth-child(1) { animation-delay: 0.1s; }
.nav-music-player:not(.is-paused) .wave-bar:nth-child(2) { animation-delay: 0.35s; }
.nav-music-player:not(.is-paused) .wave-bar:nth-child(3) { animation-delay: 0.2s; }
.nav-music-player:not(.is-paused) .wave-bar:nth-child(4) { animation-delay: 0.45s; }

@keyframes waveBarJump {
    0% { height: 4px; }
    50% { height: 16px; }
    100% { height: 6px; }
}

/* Floating Voice Recording HUD */
.voice-record-hud {
    position: absolute;
    bottom: 58px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 38, 38, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 7px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45);
    z-index: 150;
    animation: pulseGlow 1.2s infinite alternate;
}
.rec-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: blink 0.8s infinite alternate;
}
.rec-tip {
    font-size: 11px;
    opacity: 0.85;
}
@keyframes blink {
    0% { opacity: 0.25; }
    100% { opacity: 1; }
}
@keyframes pulseGlow {
    0% { transform: translateX(-50%) scale(0.97); }
    100% { transform: translateX(-50%) scale(1.02); }
}

/* Left Sidebar: Collapsible Online Section */
.collapsible-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.collapsible-header:hover {
    background: rgba(255, 255, 255, 0.05);
}
.collapse-chevron {
    transition: transform 0.2s ease;
    font-size: 12px;
}
.sidebar-lower.is-collapsed .collapse-chevron {
    transform: rotate(-90deg);
}
.sidebar-lower.is-collapsed .friends-list-wrap {
    display: none;
}

/* Left Sidebar: User Panel */
.sidebar-user-panel {
    height: 54px;
    background: var(--bg-darkest);
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border-color);
}
.exit-btn-left {
    font-size: 16px;
    padding: 6px;
    border-radius: 6px;
}
.mute-btn {
    font-size: 15px;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.mute-btn.is-muted {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.voice-sm-btn {
    font-size: 15px;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.voice-sm-btn:hover {
    background: var(--bg-hover);
    transform: scale(1.05);
}
.voice-sm-btn.is-vad {
    color: var(--green);
}
.voice-sm-btn.is-ptt {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
}
.current-user-info-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
}
.current-user-funds-subtext {
    font-size: 11px;
    color: #fbbf24;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

/* Right Sidebar Activity Box & Popover */
.activity-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px;
    position: relative;
}
.activity-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.activity-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}
.activity-icon {
    font-size: 16px;
}
.activity-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.activity-action-btn {
    background: var(--blurple);
    border: none;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.activity-action-btn:hover {
    background: var(--blurple-hover);
}
.activity-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Localized Frosted Glass Popovers */
.inline-glass-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 250;
    background: rgba(22, 23, 27, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
    animation: popoverFadeIn 0.18s ease-out;
}
@keyframes popoverFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.shop-popover {
    max-height: 380px;
    overflow-y: auto;
}
.popover-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.popover-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}
.popover-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
}
.popover-close-btn:hover {
    color: var(--text-primary);
}
.shop-balance-tag {
    font-size: 11px;
    color: #fbbf24;
    font-weight: 700;
    margin-bottom: 6px;
}
.popover-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.popover-action-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.popover-action-item:hover {
    background: var(--blurple);
}

/* Inline Note Popover Specifics */
#add-note-inline-popover textarea {
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 6px 8px;
    font-size: 12px;
    resize: none;
    outline: none;
}
.note-color-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
}
.note-color-swatches {
    display: flex;
    gap: 6px;
}
.note-color-swatches .color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}
.note-color-swatches .color-dot.active {
    border-color: white;
    transform: scale(1.15);
}
.popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.popover-btn {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    border: none;
}
.popover-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}
.popover-btn.confirm {
    background: var(--blurple);
    color: white;
    font-weight: 600;
}

/* Note Signature in Bottom Right */
.note-author-sign {
    position: absolute;
    bottom: 3px;
    right: 8px;
    font-size: 11px;
    font-weight: 600;
    font-style: italic;
    color: #475569;
}

/* Color Slider Bar in Settings */
.hue-color-slider {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    outline: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.hue-color-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    border: 2px solid #333;
}

/* ======================================================== */
/* Global Toast Notification System (取代浏览器原生 alert)  */
/* ======================================================== */
.global-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10000;
    pointer-events: none;
}

.toast-item {
    background: rgba(22, 23, 27, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastSlideDown 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.toast-item.success {
    border-color: rgba(35, 165, 90, 0.6);
    background: rgba(20, 35, 25, 0.94);
    color: #4ade80;
}

.toast-item.warning {
    border-color: rgba(245, 158, 11, 0.6);
    background: rgba(35, 30, 15, 0.94);
    color: #fbbf24;
}

.toast-item.error {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(38, 18, 18, 0.94);
    color: #f87171;
}

.toast-item.info {
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(18, 28, 38, 0.94);
    color: #38bdf8;
}

.toast-item.fade-out {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
}

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

/* Inline Note Deletion Confirm Bubble (撕下便签临近就地小弹窗) */
.note-delete-confirm-box {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #f1f5f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 10;
    animation: popoverFadeIn 0.15s ease-out;
}
.note-delete-confirm-box button {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.12s ease;
}
.note-delete-confirm-box .confirm-del-btn {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}
.note-delete-confirm-box .confirm-del-btn:hover {
    background: #dc2626;
}
.note-delete-confirm-box .cancel-del-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}
.note-delete-confirm-box .cancel-del-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ======================================================== */
/* 统一交互按钮UI风格与边框规范 (Unified Button Borders)      */
/* ======================================================== */
.activity-action-btn,
.nav-btn,
.send-msg-btn,
.buy-item-btn,
.popover-action-item,
.side-btn-sm,
.music-mini-btn,
.user-action-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.activity-action-btn:hover,
.nav-btn:hover,
.send-msg-btn:hover,
.buy-item-btn:hover,
.popover-action-item:hover,
.side-btn-sm:hover,
.music-mini-btn:hover {
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.activity-action-btn:active,
.nav-btn:active,
.send-msg-btn:active,
.buy-item-btn:active,
.music-mini-btn:active {
    transform: scale(0.97);
}

/* ======================================================== */
/* 🚂 互动大厅内侧逆时针匀速小火车系统 (6节车厢与凹槽设计)   */
/* ======================================================== */
.stage-train-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 150;
    overflow: hidden;
    border-radius: 12px;
}

.train-carriage {
    position: absolute;
    width: 62px;
    height: 48px;
    pointer-events: auto;
    transition: transform 0.05s linear;
    transform-origin: center center;
    user-select: none;
}

/* 车厢主体 */
.carriage-body {
    position: relative;
    width: 100%;
    height: 34px;
    margin-top: 14px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 火车头 (司机位) */
.train-carriage.is-locomotive .carriage-body {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border-color: #f87171;
}

/* 普通客厢 */
.train-carriage.is-passenger .carriage-body {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: #60a5fa;
}

/* 顶部半圆形凹槽 (空置时显示半圆形凹槽，支持点击切换/上车) */
.carriage-seat-cup {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 24px;
    border-radius: 0 0 20px 20px;
    background: rgba(15, 23, 42, 0.95);
    border: 2px dashed rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #94a3b8;
    z-index: 2;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s, color 0.15s;
}

.carriage-seat-cup:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: #60a5fa;
    border-style: solid;
    color: #ffffff;
    transform: translateX(-50%) scale(1.1);
}

/* 乘客登车后，角色球嵌入凹槽 */
.carriage-seated-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    border: 2px solid white;
    z-index: 5;
    animation: bounceSeated 0.4s ease-out;
}

@keyframes bounceSeated {
    0% { transform: translateX(-50%) scale(0.4) translateY(-10px); }
    70% { transform: translateX(-50%) scale(1.15) translateY(2px); }
    100% { transform: translateX(-50%) scale(1) translateY(0); }
}

/* 车轮 */
.carriage-wheels {
    position: absolute;
    bottom: -5px;
    left: 6px;
    right: 6px;
    display: flex;
    justify-content: space-between;
}
.wheel {
    width: 10px;
    height: 10px;
    background: #334155;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* 烟囱与白烟动效 */
.locomotive-chimney {
    position: absolute;
    top: -8px;
    right: 6px;
    width: 8px;
    height: 10px;
    background: #475569;
    border-radius: 2px;
}
.chimney-smoke {
    position: absolute;
    top: -12px;
    right: 4px;
    font-size: 14px;
    animation: smokePuff 1.2s infinite;
}
@keyframes smokePuff {
    0% { transform: translateY(0) scale(0.6); opacity: 0.8; }
    50% { transform: translateY(-8px) scale(1); opacity: 0.5; }
    100% { transform: translateY(-16px) scale(1.4); opacity: 0; }
}

/* 列车长司机控制面板 (左下角) */
.train-driver-panel {
    position: fixed;
    bottom: 58px;
    left: 12px;
    z-index: 520;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: popoverFadeIn 0.2s ease-out;
}
.driver-badge {
    font-size: 11px;
    font-weight: 700;
    color: #fbbf24;
    text-align: center;
}
.driver-actions-row {
    display: flex;
    gap: 8px;
}
.driver-action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.12s ease;
    user-select: none;
}
.driver-action-btn.horn-btn {
    background: #eab308;
    color: #0f172a;
    border-color: #ca8a04;
}
.driver-action-btn.horn-btn:hover {
    background: #facc15;
    transform: translateY(-1px);
}
.driver-action-btn.brake-btn {
    background: #ef4444;
    color: white;
    border-color: #dc2626;
}
.driver-action-btn.brake-btn:hover {
    background: #f87171;
    transform: translateY(-1px);
}

/* 激光笔激光动画 */
.laser-beam {
    position: absolute;
    height: 4px;
    background: linear-gradient(90deg, #ef4444, #f87171, #ffffff);
    box-shadow: 0 0 12px #ef4444, 0 0 24px #ef4444;
    transform-origin: 0% 50%;
    pointer-events: none;
    z-index: 180;
    border-radius: 2px;
    animation: laserPulse 1.2s ease-out forwards;
}
@keyframes laserPulse {
    0% { opacity: 0; transform: scaleY(0.5); }
    20% { opacity: 1; transform: scaleY(1.4); }
    80% { opacity: 0.9; transform: scaleY(1); }
    100% { opacity: 0; transform: scaleY(0.2); }
}

/* 神仙葫芦仙气动画 */
.gourd-mist {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.45) 0%, rgba(234, 179, 8, 0.3) 50%, transparent 70%);
    filter: blur(8px);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 170;
    animation: mistSwirl 2.5s ease-out forwards;
}
@keyframes mistSwirl {
    0% { transform: translate(-50%, -50%) scale(0.3) rotate(0deg); opacity: 0; }
    30% { transform: translate(-50%, -50%) scale(1.2) rotate(120deg); opacity: 0.9; }
    70% { transform: translate(-50%, -50%) scale(1.4) rotate(260deg); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.6) rotate(360deg); opacity: 0; }
}

/* ======================================================== */
/* Messages Top Bar (Category Filter)                      */
/* ======================================================== */
.messages-top-bar {
    height: 33px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 25;
    flex-shrink: 0;
}

.msg-filter-dropdown-wrapper {
    position: relative;
}

.msg-filter-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s, border-color 0.15s;
}
.msg-filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.msg-filter-dropdown-menu {
    position: absolute;
    top: 28px;
    left: 0;
    background: #1e1f22;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 100;
    min-width: 120px;
    padding: 4px 0;
    overflow: hidden;
}

.filter-option-item {
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.filter-option-item:hover {
    background: rgba(88, 101, 242, 0.2);
    color: #ffffff;
}
.filter-option-item.active {
    color: #5865F2;
    font-weight: 700;
    background: rgba(88, 101, 242, 0.12);
}

.filter-auto-reset-tag {
    font-size: 11px;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ======================================================== */
/* Voice Note Cancel Zone & Inline Recording Display        */
/* ======================================================== */
.voice-cancel-zone {
    position: absolute;
    top: -46px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #f87171;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 50;
    backdrop-filter: blur(8px);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    user-select: none;
}
.voice-cancel-zone.is-hover {
    background: #ef4444;
    border-color: #dc2626;
    color: #ffffff;
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

.voice-recording-inline-hud {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 6px;
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    animation: pulseRec 1.2s infinite;
    flex: 1;
}
.voice-recording-inline-hud .rec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
}
.voice-recording-inline-hud .rec-time {
    font-family: monospace;
    font-weight: 700;
}
.voice-recording-inline-hud .rec-tip {
    font-size: 11px;
    color: var(--text-muted);
}
@keyframes pulseRec {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ======================================================== */
/* Avatar Presets Chips                                    */
/* ======================================================== */
.avatar-preset-chip {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, background 0.15s;
    user-select: none;
}
.avatar-preset-chip:hover {
    transform: scale(1.15);
    background: rgba(88, 101, 242, 0.25);
}
.avatar-preset-chip.active {
    border-color: #5865F2;
    background: rgba(88, 101, 242, 0.35);
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(88, 101, 242, 0.6);
}





/* File: stage.css */
/* ======================================================== */
/* 50% Interactive Stage: Balls, Pac-Man, Inflation, Train   */
/* ======================================================== */

.stage-wrapper {
    height: 50%;
    background: #141517;
    border-bottom: 2px solid #202225;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* Stage Header Bar */
.stage-top-bar {
    height: 40px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.stage-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.stage-guide-tip {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.stage-quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stage-icon-btn {
    background: #2b2d31;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    transition: background 0.15s, transform 0.1s;
}

.stage-icon-btn:hover {
    background: #383a40;
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Stage Main Track (位于火车轨迹内侧安全区，绝不遮挡火车) */
.stage-main-area {
    position: absolute;
    top: 48px;
    bottom: 56px;
    left: 85px;
    right: 85px;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
    user-select: none;
    cursor: pointer;
    z-index: 5;
    scrollbar-width: thin;
    scrollbar-color: #383a40 transparent;
}

/* 交互区：竖向3个身位格，横向10个身位格，保持原角色球大小与充足间距 */
.stage-character-track {
    display: grid;
    grid-template-columns: repeat(10, minmax(105px, 1fr));
    grid-template-rows: repeat(3, minmax(95px, 1fr));
    gap: 20px;
    min-width: 100%;
    width: max-content;
    height: 100%;
    position: relative;
    padding: 10px 16px;
    align-items: center;
    justify-items: center;
}

/* 左下角“WASD移动”几个字闪动提示 */
.stage-wasd-tip {
    position: absolute;
    left: 14px;
    bottom: 10px;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(251, 191, 36, 0.6);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    animation: wasdBlink 0.6s infinite ease-in-out;
    transition: opacity 0.3s ease;
}

@keyframes wasdBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.35;
        transform: scale(0.96);
    }
}

/* Character Ball Item */
.character-ball-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), grid-column 0.25s ease, grid-row 0.25s ease;
    align-self: center;
    justify-self: center;
}

.character-ball-item:hover {
    transform: scale(1.06);
}

/* Circular Colored Avatar Sphere (恢复原角色球大小 85px) */
.avatar-sphere {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), inset 0 2px 5px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
    transition: width 0.3s ease, height 0.3s ease, transform 0.2s ease, border 0.2s;
    border: 3.5px solid transparent;
}

.sphere-name {
    font-size: 14px;
    font-weight: 800;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    text-align: center;
}

.sphere-funds {
    display: none !important;
}

.sphere-badge-host {
    display: none !important;
}

.sphere-label {
    display: none !important;
}

/* ======================================================== */
/* 动画1: 点击角色膨胀动画 (Click to Inflate)               */
/* ======================================================== */
.inflating .avatar-sphere {
    animation: characterInflate 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes characterInflate {
    0% { transform: scale(1); }
    30% { transform: scale(1.42); } /* 膨胀鼓起 */
    60% { transform: scale(0.88); } /* 回弹收缩 */
    85% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* ======================================================== */
/* 动画2: 吃豆人张嘴吞食动画 (Pac-Man Eat Animation)        */
/* ======================================================== */
.pacman-eating .avatar-sphere {
    animation: pacmanChomp 0.8s ease-in-out forwards;
}

@keyframes pacmanChomp {
    0% {
        clip-path: polygon(100% 74%, 50% 50%, 100% 26%, 100% 0%, 0% 0%, 0% 100%, 100% 100%);
    }
    30% {
        clip-path: polygon(100% 100%, 50% 50%, 100% 0%, 100% 0%, 0% 0%, 0% 100%, 100% 100%); /* 张大嘴 */
        transform: scale(1.15);
    }
    60% {
        clip-path: polygon(100% 50%, 50% 50%, 100% 50%, 100% 0%, 0% 0%, 0% 100%, 100% 100%); /* 闭嘴吞下 */
        transform: scale(1.22);
    }
    100% {
        clip-path: none;
        transform: scale(1.05); /* 身体微微变胖 */
    }
}

/* 飞行的食物图标 */
.flying-food {
    position: absolute;
    font-size: 28px;
    z-index: 10;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ======================================================== */
/* 动画3: 说话音波扩散 (Soundwave Ripples)                  */
/* ======================================================== */
.character-ball-item.is-speaking .avatar-sphere {
    border-color: var(--green) !important;
    box-shadow: 0 0 16px var(--green), 0 10px 20px rgba(0, 0, 0, 0.5) !important;
}

.character-ball-item.is-speaking::before,
.character-ball-item.is-speaking::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 85px;
    height: 85px;
    border-radius: 50%;
    border: 3px solid var(--green);
    z-index: 1;
    pointer-events: none;
    animation: soundwavePulse 1.3s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
}

.is-speaking::after {
    animation-delay: 0.65s;
}

@keyframes soundwavePulse {
    0% { transform: translateX(-50%) scale(1); opacity: 0.9; }
    50% { transform: translateX(-50%) scale(1.4); opacity: 0.45; }
    100% { transform: translateX(-50%) scale(1.8); opacity: 0; }
}

/* ======================================================== */
/* 生理状态: 膀胱满想上厕所气泡 (Bladder Indicator)         */
/* ======================================================== */
.pee-alert-badge {
    position: absolute;
    top: -24px;
    background: #f43f5e;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    animation: shakeAlert 0.4s infinite alternate;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.6);
}

@keyframes shakeAlert {
    0% { transform: rotate(-4deg); }
    100% { transform: rotate(4deg); }
}

/* ======================================================== */
/* 动画4: 头像跑火车巡游模式 (Train Parade Mode)            */
/* ======================================================== */
.stage-wrapper.train-mode {
    background: radial-gradient(circle at center, #261b47 0%, #111214 100%);
    border-bottom-color: #8b5cf6;
}

.train-track-line {
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 100%;
    height: 6px;
    background: repeating-linear-gradient(90deg, #64748b 0px, #64748b 12px, transparent 12px, transparent 20px);
    z-index: 0;
    display: none;
}
.train-mode .train-track-line {
    display: block;
}

.train-mode .character-ball-item {
    animation: trainBob 0.6s ease-in-out infinite alternate;
}
.train-mode .character-ball-item:nth-child(even) {
    animation-delay: 0.3s;
}

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

/* Train Locomotive Banner */
.train-banner {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #9333ea, #ec4899);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.5);
    z-index: 5;
    animation: bounceIn 0.4s ease;
}

@keyframes bounceIn {
    from { transform: translate(-50%, -20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* ======================================================== */
/* 🔮 Summoner Magic Circle Entity on Stage Track           */
/* ======================================================== */

.stage-magic-circle {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 96px;
    height: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
    z-index: 25;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.stage-magic-circle:hover {
    transform: translateY(-50%) scale(1.08);
    filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.85));
}

.magic-circle-core {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-rune-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}

.ring-outer {
    border: 2px dashed rgba(192, 132, 252, 0.7);
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.4), inset 0 0 10px rgba(168, 85, 247, 0.25);
    animation: runeRotate 14s linear infinite;
}

.ring-inner {
    inset: 6px;
    border: 1.5px dotted rgba(250, 204, 21, 0.6);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
    animation: runeRotateRev 9s linear infinite;
}

.circle-star-hex {
    position: absolute;
    font-size: 26px;
    color: rgba(216, 180, 254, 0.5);
    animation: starPulse 2.5s ease-in-out infinite alternate;
}

.circle-pedestal-rune {
    position: relative;
    font-size: 28px;
    filter: drop-shadow(0 0 12px #a855f7);
    z-index: 2;
    animation: floatRune 2s ease-in-out infinite alternate;
}

.magic-circle-label {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #e9d5ff;
    background: rgba(88, 28, 135, 0.8);
    border: 1px solid rgba(192, 132, 252, 0.5);
    padding: 1px 7px;
    border-radius: 10px;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(168, 85, 247, 0.8);
}

.circle-burst {
    animation: circleBurstAnim 1.4s cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes runeRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes runeRotateRev {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes starPulse {
    0% { transform: scale(0.85); opacity: 0.35; }
    100% { transform: scale(1.15); opacity: 0.85; }
}

@keyframes floatRune {
    0% { transform: translateY(0) scale(0.95); }
    100% { transform: translateY(-4px) scale(1.05); }
}

@keyframes circleBurstAnim {
    0% { transform: translateY(-50%) scale(1); filter: brightness(1); }
    30% { transform: translateY(-50%) scale(1.35); filter: brightness(2.5) drop-shadow(0 0 35px #c084fc); }
    100% { transform: translateY(-50%) scale(1); filter: brightness(1); }
}

/* ======================================================== */
/* 🐥 Follower Companions on Grid (小鸡/小鸭/小鬼/小怪/龙)     */
/* ======================================================== */

.summon-companion-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    pointer-events: auto;
    cursor: pointer;
    z-index: 8;
    user-select: none;
    transition: transform 0.2s ease;
}

.summon-companion-node:hover {
    transform: scale(1.1);
}

.summon-companion-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: companionHop 1.4s ease-in-out infinite;
}

.summon-companion-icon-body {
    font-size: 34px;
    line-height: 1;
    filter: drop-shadow(0 0 10px var(--species-glow, #facc15));
    transition: transform 0.2s ease;
}

.summon-companion-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    margin-top: 3px;
    white-space: nowrap;
    text-shadow: 0 0 8px currentColor;
}

.summon-companion-owner-tag {
    font-size: 9px;
    color: #94a3b8;
    margin-top: 1px;
    white-space: nowrap;
    background: rgba(15, 23, 42, 0.7);
    padding: 0 5px;
    border-radius: 4px;
}

/* 160ms 延迟跳跃尾随动画 */
.companion-hopping .summon-companion-avatar-wrap {
    animation: companionTrailingHop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

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

@keyframes companionTrailingHop {
    0% { transform: scale(0.85) translateY(0); }
    50% { transform: scale(1.25) translateY(-16px); }
    100% { transform: scale(1) translateY(0); }
}

/* 消散告别动画 */
.companion-vanishing {
    animation: companionFadeOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes companionFadeOut {
    0% { opacity: 1; transform: scale(1); filter: brightness(1.5); }
    100% { opacity: 0; transform: scale(0.2) translateY(-24px); filter: brightness(3) blur(4px); }
}

/* 炫耀发言气泡 */
.summon-companion-bubble-anchor {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 10;
    margin-bottom: 6px;
    white-space: nowrap;
}

.summon-quote-bubble {
    background: rgba(15, 23, 42, 0.94);
    border: 1.5px solid #a855f7;
    color: #fdf4ff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(168, 85, 247, 0.4);
    position: relative;
    max-width: 170px;
    text-align: center;
    white-space: normal;
    line-height: 1.35;
}

.summon-quote-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #a855f7 transparent transparent transparent;
}

.bubble-pop {
    animation: bubblePopAnim 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bubblePopAnim {
    0% { transform: scale(0.3) translateY(8px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}



/* File: widgets.css */
/* ======================================================== */
/* Widgets: Mini Music, Bulletin Notes, Lock Bubbles, Pets  */
/* ======================================================== */

/* 1. Mini Music Player in Navbar (Two-row aligned with stage) */
.nav-music-player {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 12px;
    min-width: 320px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    position: relative;
}

.music-upper-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.music-player-icon {
    font-size: 15px;
    line-height: 1;
}

.music-title-marquee {
    width: 170px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
}
.music-title-marquee span {
    display: inline-block;
}
.music-title-marquee.scrolling span {
    display: inline-block;
    padding-left: 100%;
    animation: marqueeAnim 10s linear infinite;
}
.nav-music-player.is-paused .music-title-marquee.scrolling span {
    animation-play-state: paused;
}
@keyframes marqueeAnim {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.music-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.15s ease;
}
.music-menu-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.music-controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 23px;
}

.music-mini-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.music-mini-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}
.music-mini-btn.play-btn {
    font-size: 13px;
}
.music-mini-btn.mode-btn {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1px 8px;
    margin-left: auto;
}
.music-mini-btn.mode-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.14);
}

.local-vol-slider {
    width: 55px;
    height: 4px;
    accent-color: #38bdf8;
    cursor: pointer;
}

/* 2. Bulletin Board (Left Sidebar Upper Half) */
.bulletin-board-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #383a40 transparent;
}

.sticky-note {
    background: #f1f5f9;
    color: #1e293b;
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    position: relative;
    line-height: 1.4;
    word-break: break-word;
    transform: rotate(-0.5deg);
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.sticky-note:nth-child(even) {
    transform: rotate(0.8deg);
}

.sticky-note:hover {
    transform: scale(1.02) rotate(0deg);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.note-pin {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
}

.note-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 4px;
    margin-bottom: 6px;
    transition: color 0.15s, background 0.15s;
}
.note-delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.note-content {
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    line-height: 1.5;
    padding-right: 18px; /* 移除按钮和文本内容中间留一点间距 */
}

.note-author-sign {
    margin-top: 6px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

/* Bulletin Board Lottery Button */
.lottery-btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s, filter 0.15s;
    user-select: none;
}
.lottery-btn:hover {
    transform: scale(1.15) rotate(10deg);
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}
.lottery-btn:active {
    transform: scale(0.95);
}
.lottery-btn.cooldown {
    opacity: 0.6;
    filter: grayscale(0.5);
    cursor: not-allowed;
}

/* Shape-Independent Running Light Marquee (跑马灯不受便签形状限制) */
/* Uses filter: drop-shadow() and brightness() which conforms to ANY geometry, clip-path or SVG */
.sticky-note.marquee-active {
    z-index: 30 !important;
    filter: drop-shadow(0 0 10px #f59e0b) drop-shadow(0 0 20px #fbbf24) brightness(1.22) !important;
    transform: scale(1.06) !important;
    transition: filter 0.08s ease, transform 0.08s ease !important;
    position: relative;
}

@keyframes noteWinnerAura {
    0%, 100% {
        filter: drop-shadow(0 0 12px #eab308) drop-shadow(0 0 28px #f59e0b) brightness(1.25);
        transform: scale(1.08);
    }
    50% {
        filter: drop-shadow(0 0 18px #f59e0b) drop-shadow(0 0 40px #ef4444) brightness(1.35);
        transform: scale(1.12);
    }
}

.sticky-note.lottery-winner {
    z-index: 35 !important;
    animation: noteWinnerAura 0.6s ease-in-out infinite alternate !important;
    position: relative;
}

/* Floating celebratory badge on winning note */
.note-winner-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
    pointer-events: none;
    animation: bounceWinnerBadge 0.5s ease-out;
    z-index: 40;
}

@keyframes bounceWinnerBadge {
    0% { transform: translateX(-50%) scale(0.4); opacity: 0; }
    60% { transform: translateX(-50%) scale(1.15); opacity: 1; }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* 方块瀑布流模式 (Masonry Adaptive Waterfall Mode) */
.bulletin-board-wrap.waterfall-mode {
    display: block;
    column-count: 2;
    column-gap: 8px;
    padding: 8px 10px;
}

.bulletin-board-wrap.waterfall-mode .sticky-note {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin-bottom: 8px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 9px;
    border-radius: 8px;
    transform: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.bulletin-board-wrap.waterfall-mode .sticky-note:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.bulletin-board-wrap.waterfall-mode .note-pin {
    font-size: 11px;
    top: -5px;
}

.bulletin-board-wrap.waterfall-mode .note-content {
    font-size: 11px;
    line-height: 1.4;
    padding-right: 14px;
    word-break: break-word;
}

.bulletin-board-wrap.waterfall-mode .note-author-sign {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.85;
}

.bulletin-board-wrap.waterfall-mode .note-delete-btn {
    top: 4px;
    right: 4px;
    font-size: 11px;
    padding: 1px 3px;
}

/* 深色便签高对比度自适应 */
.sticky-note.dark-note {
    color: #f8fafc !important;
}
.sticky-note.dark-note .note-content {
    color: #f1f5f9 !important;
}
.sticky-note.dark-note .note-author-sign {
    color: #ffffff !important;
}
.sticky-note.dark-note .note-delete-btn {
    color: #cbd5e1 !important;
}
.sticky-note.dark-note .note-delete-btn:hover {
    color: #f87171 !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

/* 留言便签独立浮动编辑弹窗 (在添加按钮右侧悬浮展开，不挤占便签列表) */
.note-editor-popover {
    position: fixed;
    width: 290px;
    background: rgba(24, 25, 30, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
    animation: notePopoverSlideIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
}

@keyframes notePopoverSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.note-popover-arrow {
    position: absolute;
    left: -6px;
    top: 14px;
    width: 10px;
    height: 10px;
    background: #18191e;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    transform: rotate(45deg);
    pointer-events: none;
}

.note-editor-textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 12px;
    line-height: 1.5;
    padding: 8px 10px 22px 10px;
    resize: none;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.note-editor-textarea:focus {
    border-color: #f59e0b;
    background: rgba(0, 0, 0, 0.45);
}

.note-char-counter {
    position: absolute;
    right: 8px;
    bottom: 5px;
    font-size: 10px;
    color: var(--text-muted);
    pointer-events: none;
}

.note-color-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.note-section-subtitle {
    font-size: 11px;
    font-weight: 700;
    color: #e2e8f0;
}

.macaron-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.macaron-swatches .color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    box-sizing: border-box;
    border: 2px solid transparent;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.macaron-swatches .color-dot:hover {
    transform: scale(1.18);
}

.macaron-swatches .color-dot.active {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px #f59e0b, 0 2px 6px rgba(0,0,0,0.3);
    transform: scale(1.15);
}

.note-custom-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-color-chip {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: border-color 0.15s, transform 0.15s;
}

.custom-color-chip.active {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px #f59e0b;
}

.custom-color-text-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #f1f5f9;
    font-family: monospace;
    font-size: 11px;
    padding: 4px 8px;
    outline: none;
    transition: border-color 0.15s;
}

.custom-color-text-input:focus {
    border-color: #f59e0b;
}

.custom-color-picker-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 3px 6px;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background 0.15s, border-color 0.15s;
}

.custom-color-picker-label:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.custom-color-native-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* 3. Online Characters List (Left Sidebar Lower Half) */
.friends-list-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.friend-item-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: background 0.15s;
    cursor: pointer;
}

.friend-item-card:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.friend-avatar-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.friend-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.friend-name-line {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-stats-line {
    font-size: 10px;
    color: var(--text-muted);
}

.friend-voice-status {
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.15s;
}
.friend-item-card.is-speaking .friend-voice-status {
    opacity: 1;
}

/* 4. Bottom User Status Panel (Left Sidebar Bottom) */
.sidebar-user-panel {
    height: 56px;
    background: var(--bg-darkest);
    padding: 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.current-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
    overflow: hidden;
}

.current-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.current-user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.current-user-balance {
    font-size: 11px;
    color: #fbbf24;
    font-weight: 600;
}

.current-user-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.user-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ======================================================== */
/* 5. 互斥交互锁定：悬浮气泡 (Floating Lock Bubble)          */
/* ======================================================== */

.interaction-locked-element {
    position: relative;
    opacity: 0.75;
    cursor: not-allowed !important;
}

.lock-bubble-tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #18191c;
    color: #fde047;
    border: 1px solid #eab308;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 9999;
    animation: bubbleFloatUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lock-bubble-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #eab308 transparent transparent transparent;
}

@keyframes bubbleFloatUp {
    0% { transform: translate(-50%, 6px) scale(0.9); opacity: 0; }
    100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
}

/* 6. Pet & Plant Living Area in Stage */
.stage-life-corner {
    position: absolute;
    bottom: 12px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 5;
}

.life-item-card {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}

.life-item-card:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.6);
}

.life-emoji {
    font-size: 24px;
}

.life-info {
    display: flex;
    flex-direction: column;
}

.life-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.life-status {
    font-size: 10px;
    color: var(--text-muted);
}

/* ======================================================== */
/* 7. AI Butler (智能管家) Chat Bubble & Thinking Indicator */
/* ======================================================== */

.chat-quick-mentions-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    padding: 0 2px;
    align-items: center;
}

.quick-mention-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #c4b5fd;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 4px rgba(139, 92, 246, 0.1);
}

.quick-mention-chip:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: #8b5cf6;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}

.quick-mention-chip:active {
    transform: scale(0.96);
}

/* Butler Message Bubble */
.chat-msg.butler-msg {
    margin: 6px 0;
    display: flex;
    flex-direction: column;
}

.butler-msg-body {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.85) 0%, rgba(49, 46, 129, 0.75) 100%);
    border: 1px solid rgba(167, 139, 250, 0.35);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    max-width: 95%;
}

.butler-msg-body .msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.butler-identity-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.butler-icon {
    font-size: 14px;
    filter: drop-shadow(0 0 4px rgba(196, 181, 253, 0.5));
}

.butler-name {
    font-size: 12px;
    font-weight: 700;
    color: #e0e7ff;
    letter-spacing: 0.2px;
}

.butler-badge {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    line-height: 1.2;
    text-transform: uppercase;
    box-shadow: 0 1px 4px rgba(139, 92, 246, 0.4);
}

.butler-reply-pill {
    background: rgba(139, 92, 246, 0.25);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: #ddd6fe;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
}

.butler-text {
    font-size: 13px;
    line-height: 1.6;
    color: #f1f5f9;
    word-break: break-word;
    letter-spacing: 0.1px;
}

.butler-text strong {
    color: #fbcfe8;
    font-weight: 700;
}

.butler-code-inline {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fef08a;
    padding: 1px 5px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
}

.butler-code-block {
    margin: 8px 0;
    background: #090d16;
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.butler-code-header {
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.butler-code-lang {
    font-size: 11px;
    color: #a78bfa;
    font-weight: 600;
    text-transform: uppercase;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.butler-pre {
    margin: 0;
    padding: 10px 12px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    color: #38bdf8;
    background: transparent;
}


/* Thinking Indicator Bubble */
.butler-thinking-msg .thinking-bubble-body {
    background: linear-gradient(135deg, rgba(24, 24, 45, 0.8) 0%, rgba(38, 35, 75, 0.7) 100%);
    border: 1px dashed rgba(167, 139, 250, 0.45);
    animation: butlerBorderPulse 2s infinite alternate;
}

@keyframes butlerBorderPulse {
    0% { border-color: rgba(167, 139, 250, 0.35); box-shadow: 0 0 8px rgba(139, 92, 246, 0.1); }
    100% { border-color: rgba(192, 132, 252, 0.7); box-shadow: 0 0 14px rgba(192, 132, 252, 0.25); }
}

.butler-thinking-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #c4b5fd;
    padding: 2px 0;
}

.thinking-text {
    opacity: 0.9;
}

.butler-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.butler-dots .dot {
    width: 5px;
    height: 5px;
    background-color: #a78bfa;
    border-radius: 50%;
    animation: butlerDotPulse 1.4s infinite ease-in-out both;
}

.butler-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.butler-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.butler-dots .dot:nth-child(3) { animation-delay: 0s; }

@keyframes butlerDotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
        background-color: #f472b6;
    }
}

/* ======================================================== */
/* 7.5. XiaoAi (小爱同学) Voice Assistant CSS              */
/* ======================================================== */

/* XiaoAi Message Bubble */
.chat-msg.xiaoai-msg {
    margin: 6px 0;
    display: flex;
    flex-direction: column;
}

.xiaoai-msg-body {
    background: linear-gradient(135deg, rgba(80, 20, 50, 0.85) 0%, rgba(136, 19, 55, 0.75) 100%);
    border: 1px solid rgba(244, 63, 94, 0.35);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.12);
    position: relative;
    max-width: 95%;
}

.xiaoai-msg-body .msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.xiaoai-identity-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.xiaoai-icon {
    font-size: 14px;
    filter: drop-shadow(0 0 4px rgba(251, 113, 133, 0.5));
}

.xiaoai-name {
    font-size: 12px;
    font-weight: 700;
    color: #ffe4e6;
    letter-spacing: 0.2px;
}

.xiaoai-badge {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 1px 4px rgba(244, 63, 94, 0.4);
}

.xiaoai-reply-pill {
    background: rgba(244, 63, 94, 0.25);
    border: 1px solid rgba(251, 113, 133, 0.35);
    color: #fecdd3;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 6px;
}

/* Custom XiaoAi Voice Bubble */
.xiaoai-voice-bubble {
    background: rgba(30, 10, 20, 0.6) !important;
    border: 1px solid rgba(251, 113, 133, 0.4) !important;
}

.xiaoai-voice-bubble:hover {
    background: rgba(50, 15, 30, 0.8) !important;
    border-color: rgba(251, 113, 133, 0.7) !important;
}

.xiaoai-voice-bubble .voice-play-icon {
    color: #fb7185 !important;
}

.xiaoai-voice-bubble.playing .voice-bar {
    background: #f43f5e !important;
}

/* Transcription Box */
.xiaoai-transcription-box {
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #fce7f3;
}

.xiaoai-transcription-label {
    font-size: 11px;
    font-weight: 700;
    color: #fda4af;
    margin-right: 4px;
}

/* XiaoAi Thinking Indicator */
.xiaoai-thinking-msg .thinking-bubble-body {
    background: linear-gradient(135deg, rgba(50, 15, 30, 0.8) 0%, rgba(70, 20, 40, 0.7) 100%) !important;
    border: 1px dashed rgba(244, 63, 94, 0.5) !important;
    animation: xiaoaiBorderPulse 2s infinite alternate !important;
}

@keyframes xiaoaiBorderPulse {
    0% { border-color: rgba(244, 63, 94, 0.35); box-shadow: 0 0 8px rgba(244, 63, 94, 0.15); }
    100% { border-color: rgba(251, 113, 133, 0.75); box-shadow: 0 0 14px rgba(251, 113, 133, 0.3); }
}

.xiaoai-thinking-msg .butler-dots .dot {
    background-color: #fb7185 !important;
}

/* Settings Preset Style Chips */
.xiaoai-preset-chip {
    padding: 2px 8px;
    font-size: 10px;
    color: #fda4af;
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.35);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.xiaoai-preset-chip:hover {
    background: rgba(244, 63, 94, 0.3);
    border-color: rgba(244, 63, 94, 0.6);
    color: #fff;
    transform: translateY(-1px);
}

.xiaoai-preset-chip.active {
    background: #f43f5e;
    color: #fff;
    border-color: #f43f5e;
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.4);
}

/* ======================================================== */
/* 8. Red Packet (零花钱红包) System CSS                   */
/* ======================================================== */

.quick-mention-chip.red-packet-chip {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.15);
}

.quick-mention-chip.red-packet-chip:hover {
    background: rgba(239, 68, 68, 0.35);
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.icon-action-btn.red-packet-trigger-btn {
    font-size: 15px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 8px;
    padding: 0 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.icon-action-btn.red-packet-trigger-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    transform: scale(1.06);
}

/* Chat Feed Red Packet Card (WeChat Style, Size Halved) */
.chat-msg.red-packet-msg {
    margin: 6px 0;
}

.chat-red-packet-card {
    width: 216px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 3px 10px rgba(234, 82, 56, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    margin-top: 4px;
    display: inline-block;
}

.chat-red-packet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(234, 82, 56, 0.35);
}

.chat-red-packet-card.is-finished {
    opacity: 0.72;
    filter: grayscale(12%);
}

.rp-wechat-main {
    background: linear-gradient(135deg, #fa9d3b 0%, #f36342 55%, #ea5238 100%);
    padding: 10px 10px 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rp-wechat-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-wechat-content {
    flex: 1;
    overflow: hidden;
}

.rp-wechat-greeting {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.rp-wechat-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-wechat-footer {
    background: #ffffff;
    padding: 3px 10px;
    font-size: 10px;
    color: #888888;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
}

/* Magic Circle Fade Out */
.stage-magic-circle.circle-fade-out {
    opacity: 0 !important;
    transition: opacity 0.5s ease-out !important;
}

/* Red Packet Send Popover (Positioned locally directly above red packet icon) */
.send-rp-inline-popover {
    position: fixed;
    width: 310px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(22, 23, 29, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(244, 63, 94, 0.4);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 18px rgba(225, 29, 72, 0.2);
    z-index: 1000;
    padding: 10px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 63, 94, 0.4) transparent;
    animation: atPopoverSlideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.send-rp-inline-popover::-webkit-scrollbar {
    width: 4px;
}
.send-rp-inline-popover::-webkit-scrollbar-thumb {
    background: rgba(244, 63, 94, 0.4);
    border-radius: 2px;
}

.red-packet-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rp-popover-body {
    display: flex;
    flex-direction: column;
}

.modal-header.red-packet-modal-header {
    background: linear-gradient(135deg, #e11d48, #be123c);
    border-bottom: 1px solid rgba(251, 191, 36, 0.3);
}

.rp-header-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rp-header-icon {
    font-size: 16px;
}

.rp-mode-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    padding: 2px;
    gap: 3px;
    margin-bottom: 8px;
}

.rp-mode-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.rp-mode-tab.active {
    background: #e11d48;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.4);
}

.rp-form-group {
    margin-bottom: 8px;
}

.rp-form-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-bottom: 3px;
}

.rp-funds-tip {
    font-size: 11px;
    color: #fbbf24;
    font-weight: 600;
}

.rp-amount-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0 8px;
}

.rp-currency-symbol {
    font-size: 15px;
    font-weight: 700;
    color: #ef4444;
    margin-right: 4px;
}

.rp-amount-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    padding: 5px 0;
    outline: none;
}

.rp-quick-amounts {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.rp-quick-chip {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 0;
    cursor: pointer;
    transition: all 0.12s ease;
}

.rp-quick-chip:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ffffff;
}

.rp-count-input-wrap {
    display: flex;
    align-items: center;
    position: relative;
}

.rp-count-unit {
    position: absolute;
    right: 10px;
    font-size: 11px;
    color: var(--text-muted);
}

.rp-input {
    padding: 5px 8px !important;
    font-size: 12px !important;
    height: auto !important;
}

.rp-send-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #e11d48, #be123c);
    border: 1px solid #fb7185;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(225, 29, 72, 0.35);
    margin-top: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rp-send-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(225, 29, 72, 0.55);
}

.rp-send-submit-btn:active {
    transform: scale(0.98);
}

/* Red Packet Detail Modal */
.rp-detail-dialog {
    padding: 0;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 16px;
}

.rp-detail-header-card {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 60%, #9f1239 100%);
    padding: 24px 20px 20px;
    text-align: center;
    position: relative;
    border-bottom: 2px solid rgba(251, 191, 36, 0.4);
}

.rp-detail-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-detail-sender-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #fde68a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.rp-detail-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rp-detail-sender-name {
    font-size: 13px;
    color: #fecdd3;
    font-weight: 600;
}

.rp-detail-greeting {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 4px;
}

.rp-my-claim-box {
    margin-top: 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(253, 230, 138, 0.3);
}

.rp-my-claim-num {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.rp-num-val {
    font-size: 32px;
    font-weight: 900;
    color: #fde047;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rp-num-unit {
    font-size: 14px;
    font-weight: 700;
    color: #fde68a;
}

.rp-my-claim-tip {
    font-size: 10px;
    color: #ffe4e6;
    margin-top: 2px;
}

.rp-status-banner {
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    padding: 4px 14px;
    display: inline-block;
    font-size: 12px;
    color: #fde68a;
    font-weight: 600;
}

.rp-detail-body {
    padding: 14px 16px;
    max-height: 280px;
    overflow-y: auto;
}

.rp-claims-summary-bar {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.rp-claims-list-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rp-claim-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.rp-claimer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rp-claimer-avatar-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
}

.rp-claimer-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rp-claimer-info {
    display: flex;
    flex-direction: column;
}

.rp-claimer-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.rp-me-tag {
    font-size: 10px;
    color: #60a5fa;
    margin-left: 2px;
}

.rp-claimer-time {
    font-size: 10px;
    color: var(--text-muted);
}

.rp-claimer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.rp-claimed-amount {
    font-size: 14px;
    font-weight: 700;
    color: #fbbf24;
}

.rp-best-luck-badge {
    font-size: 9px;
    font-weight: 800;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 1px 4px;
    border-radius: 4px;
    margin-top: 2px;
}

.rp-empty-claims-tip {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ======================================================== */
/* 🍸 Cocktail Bar & Bartender Workspace Styles            */
/* ======================================================== */

/* 1. Right Sidebar Card & Trigger Buttons */
.cocktail-bar-box {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.45) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 4px 14px rgba(147, 51, 234, 0.1);
}

.bar-action-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    border: none;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.35);
}

.bar-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.5);
}

.cocktail-chip {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(236, 72, 153, 0.25) 100%);
    border-color: rgba(168, 85, 247, 0.45);
    color: #f472b6;
}

.cocktail-chip:hover {
    border-color: #f472b6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(236, 72, 153, 0.4) 100%);
    color: #ffffff;
}

.cocktail-trigger-btn {
    color: #ec4899;
}

.cocktail-trigger-btn:hover {
    background: rgba(236, 72, 153, 0.15);
    transform: scale(1.05);
}

/* 2. Cocktail Bar Modal Layout */
.cocktail-bar-dialog {
    width: 960px;
    max-width: 96vw;
    background: #090d16;
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(147, 51, 234, 0.15);
}

.cocktail-bar-header {
    background: linear-gradient(90deg, #1e1b4b 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 22px;
}

.cocktail-bar-body {
    padding: 16px 20px;
    overflow-y: auto;
    max-height: calc(88vh - 80px);
}

.cocktail-counter-layout {
    display: grid;
    grid-template-columns: 290px 1fr 260px;
    gap: 16px;
    align-items: stretch;
}

@media (max-width: 860px) {
    .cocktail-counter-layout {
        grid-template-columns: 1fr;
    }
}

/* 3. Left Column: Spirits Shelf */
.bar-shelf-column, .bar-mixers-column {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.shelf-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.shelf-title {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
}

.shelf-sub {
    font-size: 11px;
    color: #94a3b8;
}

.spirits-shelf-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spirit-bottle-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.spirit-bottle-card:hover {
    background: rgba(30, 41, 59, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.spirit-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    float: left;
    margin-right: 10px;
}

.spirit-info {
    overflow: hidden;
}

.spirit-name {
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
}

.spirit-en {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 4px;
}

.spirit-meta {
    font-size: 11px;
    color: #cbd5e1;
    margin-top: 2px;
    line-height: 1.35;
}

.spirit-abv {
    color: #fbbf24;
    font-weight: 700;
}

.spirit-actions {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.pour-btn {
    flex: 1;
    padding: 4px 6px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pour-btn:hover {
    background: #8b5cf6;
    border-color: #a78bfa;
    color: #ffffff;
    transform: scale(1.03);
}

.active-pour {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(168, 85, 247, 0.5);
    color: #c4b5fd;
}

/* 4. Center Column: Shaker Station */
.bar-shaker-column {
    background: radial-gradient(circle at 50% 30%, rgba(30, 27, 75, 0.5) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.shaker-station-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.station-title {
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
}

.volume-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #38bdf8;
    font-weight: 800;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Visual Cocktail Shaker Glass */
.shaker-cup-visual {
    width: 130px;
    height: 190px;
    position: relative;
    margin: 10px 0 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 600px;
}

.shaker-cup-rim {
    width: 110px;
    height: 12px;
    background: linear-gradient(90deg, #94a3b8 0%, #f8fafc 50%, #64748b 100%);
    border-radius: 6px 6px 0 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 3;
}

.shaker-cup-body {
    width: 100px;
    flex: 1;
    border-left: 3px solid rgba(255, 255, 255, 0.4);
    border-right: 3px solid rgba(255, 255, 255, 0.4);
    border-bottom: 6px solid rgba(255, 255, 255, 0.6);
    border-radius: 0 0 24px 24px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(4px);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column-reverse;
}

.shaker-liquid {
    width: 100%;
    height: 0%;
    background: #cbd5e1;
    position: relative;
    transition: height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.4s ease;
}

.liquid-wave {
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 10px;
    background: inherit;
    border-radius: 50%;
    filter: brightness(1.2);
}

.ice-cubes-floating {
    position: absolute;
    top: 2px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    font-size: 18px;
    animation: iceBob 2s ease-in-out infinite alternate;
}

@keyframes iceBob {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-4px) rotate(8deg); }
}

/* 3D Violent Shaking Animation */
.shaker-shaking-anim {
    animation: hardShakerShake 1.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes hardShakerShake {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: translate3d(-12px, -8px, 0) rotate(-14deg) scale(1.04); }
    20%, 40%, 60%, 80% { transform: translate3d(12px, 8px, 0) rotate(14deg) scale(1.04); }
}

/* Poured Ingredients Tags */
.poured-shelf-section {
    width: 100%;
    margin-bottom: 12px;
}

.section-label {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.poured-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

.poured-tag {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 11px;
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tag-del-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 10px;
    cursor: pointer;
    padding: 0 2px;
}

.tag-del-btn:hover {
    color: #f43f5e;
}

.empty-hint {
    font-size: 11px;
    color: #64748b;
    font-style: italic;
}

/* Shaker Action Buttons */
.shaker-actions-row {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-bottom: 14px;
}

.shaker-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shake-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.shake-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5);
}

.shake-btn:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}

.reset-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

.reset-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

/* Cocktail Result & Drink Card */
.cocktail-result-card {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.result-card-top {
    margin-bottom: 8px;
}

.result-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: inline-block;
    flex-shrink: 0;
}

.result-name {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #f8fafc;
    flex: 1;
}

.result-abv-tag {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
}

.result-taste-tags {
    font-size: 11px;
    color: #38bdf8;
    margin-top: 4px;
}

.result-comment {
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.4;
    margin-bottom: 12px;
    font-style: italic;
}

.drink-action-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 800;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
}

.drink-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.drink-action-btn:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}

/* 5. Right Column: Mixers Shelf */
.mixers-shelf-grid {
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding-right: 4px;
}

.mixer-chip-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mixer-chip-card:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(2px);
}

.mixer-icon {
    font-size: 16px;
}

.mixer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mixer-name {
    font-size: 12px;
    font-weight: 700;
    color: #f1f5f9;
}

.mixer-cat {
    font-size: 10px;
    color: #94a3b8;
}

.mixer-add-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #38bdf8;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
}

.mixer-add-btn:hover {
    background: #0284c7;
    color: #ffffff;
}

/* ======================================================== */
/* 🌈 Character Drunk Glowing & Stage Animations           */
/* ======================================================== */

.avatar-sphere.drunk-glowing {
    animation: drunkSphereGlow 2.5s ease-in-out infinite alternate;
}

@keyframes drunkSphereGlow {
    0% {
        filter: brightness(1.05) saturate(1.2);
        transform: scale(1.0);
    }
    50% {
        transform: scale(1.04) rotate(2deg);
    }
    100% {
        filter: brightness(1.25) saturate(1.4);
        transform: scale(1.0);
    }
}

.drunk-badge {
    position: absolute;
    border-radius: 10px;
    padding: 1px 6px;
    font-weight: 800;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    animation: drunkBadgeFloat 2s ease-in-out infinite alternate;
}

@keyframes drunkBadgeFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}

.drunk-gulp-anim {
    animation: drunkGulpBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes drunkGulpBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.22); }
    60% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

@keyframes floatUpFade {
    0% { opacity: 0; transform: translate(-50%, 10px) scale(0.8); }
    15% { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
    75% { opacity: 1; transform: translate(-50%, -10px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -24px) scale(0.9); }
}

/* Level 2: Drunk Wobble Animation */
.avatar-sphere.drunk-wobble {
    animation: drunkSphereWobble 1.2s ease-in-out infinite alternate;
}

@keyframes drunkSphereWobble {
    0% { transform: rotate(-7deg) translateY(0) scale(1.02); filter: brightness(1.15) saturate(1.3); }
    50% { transform: rotate(0deg) translateY(-2px) scale(0.98); }
    100% { transform: rotate(7deg) translateY(0) scale(1.02); filter: brightness(1.25) saturate(1.4); }
}

/* Level 3: Wasted Collapsed Animation */
.avatar-sphere.drunk-collapsed {
    transform: scaleY(0.68) scaleX(1.18) translateY(10px) !important;
    border-radius: 40% 40% 50% 50% / 30% 30% 60% 60% !important;
    filter: brightness(0.9) saturate(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
    animation: wastedBreathing 2.2s ease-in-out infinite alternate;
}

@keyframes wastedBreathing {
    0% { transform: scaleY(0.68) scaleX(1.18) translateY(10px); }
    100% { transform: scaleY(0.62) scaleX(1.22) translateY(12px); }
}

/* Snore bubble for Level 3 */
.snore-bubble {
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid #a855f7;
    color: #f3e8ff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
    z-index: 12;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
    animation: snorePulse 1.8s ease-in-out infinite alternate;
}

@keyframes snorePulse {
    0% { transform: translateX(-50%) scale(0.92); opacity: 0.85; }
    100% { transform: translateX(-50%) scale(1.08) translateY(-4px); opacity: 1; }
}

/* Drunk forecast bar in cocktail bar modal */
.drunk-forecast-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.drunk-forecast-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.drunk-forecast-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Cocktail Chat Drink Card */
.cocktail-drink-msg {
    margin: 6px 0;
}

.chat-cocktail-card {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cocktail-msg-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.cocktail-msg-icon {
    font-size: 14px;
}

.cocktail-drinker-name {
    font-size: 12px;
    color: #f1f5f9;
}

.cocktail-action-badge {
    font-size: 10px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #c084fc;
    padding: 1px 5px;
    border-radius: 4px;
}

.cocktail-msg-body {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.cocktail-color-pill {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.cocktail-title-text {
    font-size: 13px;
    color: #e2e8f0;
}

.cocktail-title-text strong {
    color: #f472b6;
}

.cocktail-msg-footer {
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
}

/* ======================================================== */
/* 7. Garbage Station & Scrap Selling Minigame Styles      */
/* ======================================================== */

.garbage-station-box {
    border-left: 3px solid #10b981;
}

.garbage-action-btn {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s;
}

.garbage-action-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.15);
}

/* Garbage Station Modal Dialog */
.garbage-station-dialog {
    width: 680px;
    max-width: 95vw;
    background: #18191c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
    color: #f1f5f9;
}

.garbage-station-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.garbage-operator-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 3px;
    font-weight: 600;
}

.garbage-operator-badge.is-operator {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.garbage-operator-badge.is-observer {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.garbage-station-body {
    padding: 14px 16px;
    min-height: 440px;
    position: relative;
}

.garbage-station-hint {
    font-size: 11px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid #38bdf8;
}

/* 4 Classified Bins Container */
.garbage-bins-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.garbage-bin-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.rummage-btn-slot {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 4px;
}

.rummage-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
    animation: rummageBounce 1.2s ease-in-out infinite;
    white-space: nowrap;
    transition: transform 0.12s, filter 0.12s;
    user-select: none;
}

.rummage-btn:hover {
    filter: brightness(1.2);
    transform: scale(1.08);
}

.rummage-btn:active {
    transform: scale(0.95);
}

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

/* Single Trash Bin Item */
.garbage-bin-item {
    width: 100%;
    height: 120px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.2s;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.garbage-bin-item:hover {
    transform: translateY(-3px);
}

.garbage-bin-item.blue-bin {
    background: linear-gradient(180deg, #1d4ed8, #1e40af);
    border: 2px solid #3b82f6;
}

.garbage-bin-item.red-bin {
    background: linear-gradient(180deg, #b91c1c, #991b1b);
    border: 2px solid #ef4444;
}

.garbage-bin-item.green-bin {
    background: linear-gradient(180deg, #15803d, #166534);
    border: 2px solid #22c55e;
}

.garbage-bin-item.grey-bin {
    background: linear-gradient(180deg, #475569, #334155);
    border: 2px solid #64748b;
}

/* Bin Lid with 3D open hinge effect */
.bin-lid {
    width: 104%;
    height: 22px;
    background: inherit;
    border-radius: 6px 6px 2px 2px;
    border: inherit;
    border-bottom: 2px solid rgba(0, 0, 0, 0.3);
    position: absolute;
    top: -8px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: top left;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

.bin-lid-handle {
    width: 24px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
}

/* Open Lid State */
.garbage-bin-item.lid-open .bin-lid {
    transform: rotate(-55deg) translateY(-14px) translateX(-4px);
    box-shadow: -4px 6px 12px rgba(0, 0, 0, 0.4);
}

/* Heavy Slam Animation */
.garbage-bin-item.lid-slam .bin-lid {
    animation: lidHeavySlam 0.45s ease-out forwards;
}

@keyframes lidHeavySlam {
    0% { transform: rotate(-55deg) translateY(-14px) translateX(-4px); }
    55% { transform: rotate(5deg) translateY(2px); }
    75% { transform: rotate(-3deg) translateY(0); }
    100% { transform: rotate(0deg) translateY(0); }
}

.bin-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding-top: 14px;
}

.bin-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.bin-name {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.bin-status-text {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
}

/* Exhausted / Empty Bin */
.garbage-bin-item.exhausted {
    opacity: 0.65;
    filter: grayscale(0.4);
    cursor: default;
}
.garbage-bin-item.exhausted .bin-status-text {
    color: #f87171;
    font-weight: 700;
}

/* Lower Area: Collected Garbage List */
.collected-garbage-section {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    min-height: 150px;
}

.collected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.collected-total-value {
    color: #fbbf24;
    font-size: 12px;
}

.collected-garbage-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
    padding: 4px 0;
}

.empty-garbage-tip {
    width: 100%;
    color: #64748b;
    font-size: 11px;
    text-align: center;
    padding: 24px 0;
}

/* Garbage Item Card in List */
.garbage-item-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 5px 8px;
    min-width: 130px;
    animation: itemPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

@keyframes itemPopIn {
    0% { transform: scale(0.2) translateY(-15px); opacity: 0; }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.garbage-item-card .item-icon {
    font-size: 20px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.garbage-item-card .item-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.garbage-item-card .item-name {
    font-size: 11px;
    font-weight: 700;
    color: #f1f5f9;
}

.garbage-item-card .item-val {
    font-size: 10px;
    color: #34d399;
    font-weight: 600;
}

/* Sell Scrap Action Area */
.sell-scrap-action-area {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.sell-scrap-btn {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: sellBtnPulse 1.4s ease-in-out infinite alternate;
    transition: transform 0.15s, filter 0.15s;
    user-select: none;
}

.sell-scrap-btn:hover {
    transform: scale(1.06);
    filter: brightness(1.15);
}

.sell-scrap-btn:active {
    transform: scale(0.96);
}

@keyframes sellBtnPulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4); }
    100% { transform: scale(1.04); box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6); }
}

/* ======================================================== */
/* Tricycle Animation Stage                                */
/* ======================================================== */
.scrap-animation-stage {
    min-height: 380px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 65%, #334155 100%);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.animation-sky {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
}

.anim-cloud {
    position: absolute;
    font-size: 32px;
    opacity: 0.7;
}
.anim-cloud.cloud-1 {
    top: 10px;
    left: 40px;
    animation: cloudDrift 16s linear infinite alternate;
}
.anim-cloud.cloud-2 {
    top: 30px;
    right: 80px;
    animation: cloudDrift 12s linear infinite alternate;
}

@keyframes cloudDrift {
    0% { transform: translateX(0); }
    100% { transform: translateX(50px); }
}

.animation-road {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: #1f2937;
    border-top: 4px solid #4b5563;
}

.road-markings {
    position: absolute;
    top: 45px;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(90deg, #facc15 0, #facc15 30px, transparent 30px, transparent 60px);
    opacity: 0.8;
}

/* Pile of collected trash on left side of road */
.anim-trash-pile {
    position: absolute;
    bottom: 45px;
    left: 60px;
    display: flex;
    flex-wrap: wrap;
    width: 140px;
    gap: 4px;
    z-index: 10;
}

.anim-pile-item {
    font-size: 26px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Tricycle & Driver */
.anim-tricycle {
    position: absolute;
    bottom: 45px;
    left: -220px; /* starts off-screen */
    display: flex;
    align-items: flex-end;
    z-index: 20;
    transition: left 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.tricycle-body {
    display: flex;
    align-items: flex-end;
    position: relative;
}

.tricycle-driver {
    position: absolute;
    bottom: 25px;
    left: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 15;
}

.driver-hat {
    font-size: 20px;
    margin-bottom: -10px;
}

.driver-head {
    font-size: 26px;
}

.tricycle-vehicle {
    display: flex;
    align-items: flex-end;
}

.tricycle-cab {
    font-size: 60px;
    transform: scaleX(-1); /* facing right */
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
    z-index: 10;
}

.tricycle-cargo-bed {
    width: 90px;
    height: 48px;
    background: #78350f;
    border: 2px solid #b45309;
    border-radius: 4px;
    margin-left: -12px;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    padding: 2px;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.tricycle-cargo-bed .loaded-item {
    font-size: 20px;
    animation: loadItemBounce 0.3s ease-out;
}

@keyframes loadItemBounce {
    0% { transform: translateY(-30px) scale(0.5); opacity: 0; }
    80% { transform: translateY(4px) scale(1.1); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.tricycle-smoke {
    position: absolute;
    left: -20px;
    bottom: 8px;
    font-size: 22px;
    opacity: 0;
    transition: opacity 0.3s;
}

.anim-tricycle.puffing .tricycle-smoke {
    opacity: 0.85;
    animation: smokePuff 0.6s ease-out infinite;
}

@keyframes smokePuff {
    0% { transform: translateX(0) scale(0.6); opacity: 0.8; }
    100% { transform: translateX(-35px) scale(1.4); opacity: 0; }
}

.anim-status-banner {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fde047;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 30;
    white-space: nowrap;
}

/* Click Ripple Wave (全员同步点击波) */
.garbage-ripple-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 999;
}

.garbage-click-ripple {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #38bdf8;
    box-shadow: 0 0 10px #38bdf8, inset 0 0 8px #38bdf8;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: none;
    animation: garbageRippleExpand 0.55s ease-out forwards;
}

@keyframes garbageRippleExpand {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(5.5);
        opacity: 0;
    }
}

/* Spectate Button in Right Sidebar Card */
.garbage-spectate-bar {
    width: 100%;
    margin-top: 8px;
}

.spectate-garbage-btn {
    width: 100%;
    padding: 7px 14px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: 12px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    animation: spectatePulse 2s infinite ease-in-out;
}

.spectate-garbage-btn:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

@keyframes spectatePulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 2px 14px rgba(16, 185, 129, 0.65);
    }
}

/* Bottom Exit Row & Button: "算啦，暂时不翻了~" */
.garbage-bottom-exit-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.cancel-garbage-station-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 6px 22px;
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-garbage-station-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fca5a5;
    transform: translateY(-1px);
}

/* Chat Message Spectate Button */
.system-garbage-notice-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 4px;
}

.system-garbage-text-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.system-garbage-action-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 2px;
}

.btn-spectate-garbage-chat {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #6ee7b7;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-spectate-garbage-chat:hover {
    background: rgba(16, 185, 129, 0.35);
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}








/* File: modals.css */
/* ======================================================== */
/* Modals: Homecoming, Private Playlist, Snack Shop, Exit   */
/* ======================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 90vh;
    animation: scaleIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

.modal-header {
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-footer {
    padding: 14px 20px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 1. Homecoming Character Selection Modal */
.homecoming-dialog {
    width: 530px;
    max-width: 94vw;
    max-height: 88vh;
}

.homecoming-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.homecoming-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.homecoming-section-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.room-action-link-btn {
    background: none;
    border: none;
    color: #8ea1e1;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s;
    text-decoration: underline;
}

.room-action-link-btn:hover {
    color: #ffffff;
    background: rgba(88, 101, 242, 0.25);
}

.homecoming-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

/* Room Archives Grid */
.room-archives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
    padding: 2px;
}

.room-archive-loading {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--text-muted);
    padding: 12px;
    text-align: center;
}

.room-archive-card {
    background: var(--bg-primary);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.15s ease;
    user-select: none;
    position: relative;
}

.room-archive-card:hover {
    background: var(--bg-hover);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.room-archive-card.active {
    border-color: var(--blurple);
    background: rgba(88, 101, 242, 0.2);
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.4);
}

.room-archive-card .room-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-archive-card .room-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-archive-card .room-active-indicator {
    display: none;
    font-size: 10px;
    background: var(--blurple);
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 600;
    align-self: flex-start;
    margin-top: 2px;
}

.room-archive-card.active .room-active-indicator {
    display: inline-block;
}

.custom-room-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.character-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 345px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.character-cards-grid::-webkit-scrollbar {
    width: 6px;
}

.character-cards-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.character-cards-grid::-webkit-scrollbar-track {
    background: transparent;
}

.empty-characters-tip {
    grid-column: 1 / -1;
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    line-height: 1.5;
}

.char-select-card {
    background: var(--bg-primary);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    user-select: none;
}

.char-select-card:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
}

.char-select-card.selected {
    border-color: var(--blurple);
    background: rgba(88, 101, 242, 0.22);
    box-shadow: 0 0 14px rgba(88, 101, 242, 0.5);
}

/* 房间在线角色：不可选、禁用灰度态与锁定提示 */
.char-select-card.is-online-occupied {
    opacity: 0.55;
    filter: grayscale(40%);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.08);
}

.char-select-card.is-online-occupied:hover {
    background: var(--bg-primary);
    transform: none;
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
}

.char-select-card.is-online-occupied .claim-enter-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #64748b;
    border-color: rgba(255, 255, 255, 0.08);
    cursor: not-allowed;
    pointer-events: none;
}

.char-card-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-weight: 600;
}

.char-card-badge.occupied {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.char-card-badge.offline-available {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.char-select-card.selected .char-card-badge {
    background: var(--blurple);
    color: white;
}

.claim-enter-btn {
    margin-top: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.15s ease;
}

.claim-enter-btn:hover {
    background: var(--blurple);
    color: white;
    border-color: var(--blurple);
}

.char-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    color: white;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
}

.char-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.char-card-funds {
    font-size: 11px;
    color: #fbbf24;
}

/* New Character Form */
.new-char-box {
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.new-char-color-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
}

.color-picker-label {
    font-size: 12px;
    color: var(--text-muted);
    user-select: none;
    line-height: 1.4;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    width: 100%;
}

.color-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s;
}
.color-dot:hover {
    transform: scale(1.15);
}
.color-dot.active {
    border-color: white;
    box-shadow: 0 0 8px white;
}

/* Form Inputs */
.form-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}
.form-input:focus {
    border-color: var(--blurple);
}

/* 2. Private Playlist Modal */
.playlist-dialog {
    width: 520px;
    max-width: 94vw;
}

.add-song-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-primary);
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.song-input-row {
    display: flex;
    gap: 10px;
}

.playlist-items-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}

.playlist-song-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.15s;
}

.playlist-song-card:hover {
    background: var(--bg-hover);
}

.playlist-song-card.now-playing {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}

.song-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.song-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.song-requester {
    font-size: 11px;
    color: var(--text-muted);
}

.play-now-btn {
    background: var(--blurple);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.play-now-btn:hover {
    background: var(--blurple-hover);
}

.delete-song-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    padding: 5px 9px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.delete-song-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* 3. Snack Shop Modal */
.shop-dialog {
    width: 560px;
    max-width: 94vw;
}

.shop-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.shop-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}
.shop-tab-btn.active {
    background: var(--blurple);
    color: white;
}

.shop-goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.shop-item-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.item-icon {
    font-size: 32px;
}

.item-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.item-desc {
    font-size: 10px;
    color: var(--text-muted);
}

.item-price {
    font-size: 12px;
    color: #fbbf24;
    font-weight: 800;
}

.buy-item-btn {
    width: 100%;
    background: #10b981;
    color: white;
    border: none;
    padding: 6px 0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.15s;
}
.buy-item-btn:hover {
    background: #059669;
}

/* 4. Exit Confirmation Modal */
.exit-dialog {
    width: 380px;
    max-width: 90vw;
    text-align: center;
}

.exit-icon {
    font-size: 44px;
    margin: 8px 0;
}

.exit-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.exit-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ======================================================== */
/* 5. Fullscreen Cute Room Loading Overlay ("信号接收中~")   */
/* ======================================================== */

.room-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 45%, #1c1e28 0%, #0d0e13 80%, #07080a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 1;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    cursor: wait;
}

.room-loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    transform: translateY(-20px);
}

/* Radar & Pulse Rings */
.cute-radar-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(88, 101, 242, 0.4);
    box-shadow: 0 0 16px rgba(88, 101, 242, 0.2);
    animation: radarRingPulse 2.4s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.radar-pulse-ring.ring-1 {
    animation-delay: 0s;
}

.radar-pulse-ring.ring-2 {
    animation-delay: 0.8s;
}

.radar-pulse-ring.ring-3 {
    animation-delay: 1.6s;
}

@keyframes radarRingPulse {
    0% {
        transform: scale(0.45);
        opacity: 0.9;
        border-color: rgba(87, 242, 135, 0.8);
    }
    50% {
        border-color: rgba(88, 101, 242, 0.5);
    }
    100% {
        transform: scale(2.05);
        opacity: 0;
        border-color: rgba(254, 231, 92, 0);
    }
}

/* Cute Antenna Robot Character */
.cute-antenna-character {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: botFloat 2.6s ease-in-out infinite;
}

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

.antenna-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: -2px;
    z-index: 3;
}

.antenna-beacon {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #57f287;
    box-shadow: 0 0 14px #57f287, 0 0 28px rgba(87, 242, 135, 0.6);
    animation: beaconGlow 1.2s ease-in-out infinite alternate;
}

@keyframes beaconGlow {
    0% {
        transform: scale(0.9);
        opacity: 0.75;
        box-shadow: 0 0 8px #57f287;
    }
    100% {
        transform: scale(1.18);
        opacity: 1;
        box-shadow: 0 0 18px #57f287, 0 0 35px rgba(87, 242, 135, 0.85);
    }
}

.antenna-stem {
    width: 3.5px;
    height: 15px;
    background: linear-gradient(to bottom, #57f287, #5865f2);
    border-radius: 2px;
}

.antenna-bot-head {
    width: 82px;
    height: 68px;
    border-radius: 24px;
    background: linear-gradient(145deg, #2b2e3b, #191a24);
    border: 2.5px solid #5865f2;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 22px rgba(88, 101, 242, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.antenna-bot-head::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12), transparent);
    border-radius: 20px 20px 0 0;
}

.bot-face {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    z-index: 1;
}

.bot-eye {
    width: 9px;
    height: 11px;
    background: #00f0ff;
    border-radius: 5px;
    box-shadow: 0 0 10px #00f0ff;
    animation: eyeBlink 3.2s infinite;
}

@keyframes eyeBlink {
    0%, 90%, 100% {
        transform: scaleY(1);
    }
    95% {
        transform: scaleY(0.12);
    }
}

.bot-blush {
    width: 8px;
    height: 5px;
    background: rgba(255, 107, 129, 0.75);
    border-radius: 50%;
    filter: blur(0.5px);
}

.bot-mouth {
    color: #00f0ff;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-1px);
    text-shadow: 0 0 6px #00f0ff;
}

.cute-sparkle {
    position: absolute;
    font-size: 16px;
    animation: sparkleTwinkle 1.8s infinite alternate ease-in-out;
    pointer-events: none;
}

.cute-sparkle.sparkle-left {
    top: -4px;
    left: -16px;
    animation-delay: 0.3s;
}

.cute-sparkle.sparkle-right {
    bottom: 6px;
    right: -18px;
    animation-delay: 0.9s;
}

@keyframes sparkleTwinkle {
    0% {
        transform: scale(0.7) rotate(-15deg);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.15) rotate(15deg);
        opacity: 1;
    }
}

/* Loading Prompt Text & Signal Flow */
.loading-prompt-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.loading-main-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 14px rgba(88, 101, 242, 0.45);
}

.signal-dish-icon {
    font-size: 24px;
    animation: dishRotate 3s ease-in-out infinite alternate;
    display: inline-block;
}

@keyframes dishRotate {
    0% {
        transform: rotate(-9deg);
    }
    100% {
        transform: rotate(9deg);
    }
}

.signal-text-title {
    background: linear-gradient(135deg, #ffffff 40%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.signal-dots-flow {
    display: inline-flex;
    -webkit-text-fill-color: #57f287;
}

.dot-f {
    display: inline-block;
    animation: dotFlow 1.4s infinite ease-in-out;
}

.dot-f:nth-child(1) {
    animation-delay: 0s;
}

.dot-f:nth-child(2) {
    animation-delay: 0.25s;
}

.dot-f:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes dotFlow {
    0%, 20% {
        opacity: 0.2;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-4px);
    }
    80%, 100% {
        opacity: 0.2;
        transform: translateY(0);
    }
}

.signal-tilde {
    color: #57f287;
    font-weight: 800;
    font-size: 24px;
}

.loading-sub-desc {
    font-size: 13px;
    color: #949ba4;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.signal-strength-indicator {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 20px;
    margin-top: 10px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sig-bar {
    width: 5px;
    border-radius: 3px;
    background: #3f414a;
    transition: background 0.3s;
    animation: barWave 1.6s infinite ease-in-out;
}

.sig-bar.b-1 {
    height: 6px;
    animation-delay: 0.1s;
}

.sig-bar.b-2 {
    height: 9px;
    animation-delay: 0.25s;
}

.sig-bar.b-3 {
    height: 12px;
    animation-delay: 0.4s;
}

.sig-bar.b-4 {
    height: 15px;
    animation-delay: 0.55s;
}

.sig-bar.b-5 {
    height: 18px;
    animation-delay: 0.7s;
}

@keyframes barWave {
    0%, 100% {
        background: #3f414a;
        opacity: 0.5;
    }
    50% {
        background: #57f287;
        box-shadow: 0 0 8px #57f287;
        opacity: 1;
    }
}

/* Elastic Slide-Up Exit Animation (整体向上弹性移出) */
.room-loading-overlay.elastic-slide-up {
    animation: elasticSlideUpOut 0.72s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

@keyframes elasticSlideUpOut {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    18% {
        transform: translateY(35px);
        opacity: 1;
    }
    36% {
        transform: translateY(-22px);
        opacity: 0.98;
    }
    100% {
        transform: translateY(-118vh);
        opacity: 0.92;
    }
}

/* Welcome Home Big Banner in Center-Bottom Area (中间下方大字“欢迎回家！”) */
.loading-welcome-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-top: 4px;
    animation: welcomeBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes welcomeBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.65) translateY(24px);
    }
    70% {
        opacity: 1;
        transform: scale(1.08) translateY(-4px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.welcome-home-big-title {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fffbeb 0%, #fde047 30%, #f59e0b 70%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 24px rgba(251, 191, 36, 0.65), 0 4px 12px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 2px 10px rgba(245, 158, 11, 0.4));
    animation: welcomeTitleGlow 1.4s ease-in-out infinite alternate;
}

@keyframes welcomeTitleGlow {
    0% {
        filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.35));
    }
    100% {
        filter: drop-shadow(0 4px 18px rgba(253, 224, 71, 0.75));
    }
}

.welcome-home-subtitle {
    font-size: 14px;
    color: #cbd5e1;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* ======================================================== */
/* Independent Image Cropper Styles                        */
/* ======================================================== */
.cropper-dialog {
    background: #1e1f22;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7);
}

.cropper-viewport {
    width: 280px;
    height: 280px;
    position: relative;
    overflow: hidden;
    background: #0f1012;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    cursor: grab;
    user-select: none;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.8);
}
.cropper-viewport.is-dragging {
    cursor: grabbing;
}

.cropper-preview-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    pointer-events: none;
    max-width: none;
    max-height: none;
    will-change: transform;
}

.cropper-mask-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cropper-circle-guide {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62);
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.cropper-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
}

.cropper-tool-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    user-select: none;
}
.cropper-tool-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.05);
}

.cropper-zoom-slider {
    flex: 1;
    accent-color: #5865F2;
    cursor: pointer;
    height: 6px;
    border-radius: 3px;
}

/* Round avatar image display across all avatar containers */
.round-avatar-container {
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.round-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.friend-avatar-badge .round-avatar-img,
.avatar-preview-badge .round-avatar-img,
.char-card-avatar .round-avatar-img,
.carriage-seated-avatar .round-avatar-img,
.sphere-avatar-img-wrap .round-avatar-img,
#current-user-avatar-display .round-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* ======================================================== */
/* 🔮 Summoner Grimoire Modal & Activity Box CSS            */
/* ======================================================== */

.summoner-circle-box {
    border-color: rgba(168, 85, 247, 0.3);
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.12), rgba(15, 23, 42, 0.6));
}

.summon-action-btn {
    background: linear-gradient(135deg, #9333ea, #7e22ce) !important;
    border: 1px solid #c084fc !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.35);
}

.summon-action-btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.6);
}

.summoner-grimoire-dialog {
    width: 760px;
    max-width: 95vw;
    background: #12131a;
    border: 1.5px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(147, 51, 234, 0.25);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.summoner-modal-header {
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.5), rgba(15, 23, 42, 0.9));
    border-bottom: 1px solid rgba(168, 85, 247, 0.3);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summoner-modal-header .modal-icon {
    font-size: 26px;
    filter: drop-shadow(0 0 8px #c084fc);
}

.summoner-modal-header .modal-title {
    font-size: 16px;
    font-weight: 800;
    color: #f5f3ff;
    letter-spacing: 0.5px;
}

.summoner-modal-header .modal-subtitle {
    font-size: 11px;
    color: #c4b5fd;
    margin-top: 3px;
    line-height: 1.35;
}

.summoner-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #6b21a8 #12131a;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 当前陪伴状态条 */
.summon-status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(88, 28, 135, 0.22);
    border: 1px solid rgba(192, 132, 252, 0.35);
    border-radius: 10px;
    padding: 10px 14px;
    gap: 12px;
}

.summon-status-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-summon-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 0 10px #c084fc);
}

.status-summon-title {
    font-size: 13px;
    font-weight: 800;
    color: #fdf4ff;
}

.status-summon-desc {
    font-size: 11px;
    color: #cbd5e1;
    margin-top: 2px;
}

.dismiss-summon-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.dismiss-summon-btn:hover {
    background: rgba(239, 68, 68, 0.4);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.grimoire-section-title {
    font-size: 12px;
    font-weight: 800;
    color: #d8b4fe;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* 5大物种卡片网格 */
.grimoire-species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
}

.grimoire-card {
    background: rgba(24, 25, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.grimoire-card:hover {
    border-color: var(--card-theme-color, #c084fc);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 14px var(--card-theme-color, rgba(192, 132, 252, 0.4));
    transform: translateY(-2px);
}

.grimoire-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.grimoire-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.grimoire-icon {
    font-size: 26px;
    line-height: 1;
}

.grimoire-title-wrap {
    flex: 1;
}

.grimoire-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.grimoire-name {
    font-size: 14px;
    font-weight: 800;
    color: #f8fafc;
    margin: 0;
}

.grimoire-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
}

.grimoire-desc {
    font-size: 11px;
    color: #94a3b8;
    margin: 3px 0 0 0;
    line-height: 1.35;
}

/* 契约咒语展示框 */
.grimoire-incantation-box {
    background: rgba(15, 23, 42, 0.8);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 7px 10px;
}

.incantation-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 2px;
}

.incantation-text {
    font-size: 11px;
    font-weight: 700;
    color: #fef08a;
    letter-spacing: 0.3px;
    line-height: 1.35;
}

.grimoire-card-footer {
    display: flex;
    justify-content: flex-end;
}

.chant-summon-btn {
    width: 100%;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border: 1px solid #a78bfa;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

.chant-summon-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.65);
}

/* 底部聊天区咒语触发指引 */
.grimoire-chat-hint-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 11px;
    color: #cbd5e1;
    line-height: 1.45;
}

.grimoire-chat-hint-card .hint-icon {
    font-size: 18px;
    line-height: 1;
}

.grimoire-chat-hint-card strong {
    color: #f8fafc;
}

.grimoire-chat-hint-card em {
    color: #facc15;
    font-style: normal;
    background: rgba(250, 204, 21, 0.12);
    padding: 1px 4px;
    border-radius: 4px;
    border: 1px solid rgba(250, 204, 21, 0.3);
}


