/**
 * base.css - 基础样式
 * CSS变量、重置样式、滚动条、body样式
 */

/* === CSS 变量 === */
:root {
    --bg-color: #343541;
    --sidebar-bg: #202123;
    --chat-bg: #343541;
    --user-msg-bg: #343541;
    --ai-msg-bg: #444654;
    --border-color: #4d4d4f;
    --text-color: #ececf1;
    --accent-color: #10a37f;
    --highlight-border: #ff9f43;
    --modal-bg: #202123;
    --nav-bg: #1a1b1e;
}

/* === 基础样式 === */
html, body, * {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important;  /* IE and Edge */
}

/* 彻底隐藏所有 Webkit 浏览器的滚动条 */
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* 📢 连环播报公告条 */
.announcement-ticker {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #1a1b1e 0%, #2a2b2e 50%, #1a1b1e 100%);
    border-bottom: 1px solid #333;
    padding: 0;
    height: 36px;
    overflow: hidden;
    position: relative;
}
.ticker-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 163, 127, 0.15);
    font-size: 14px;
    border-right: 1px solid #333;
}
.ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}
.ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: ticker-scroll 20s linear infinite;
    padding-left: 100%;
}
.ticker-track:hover {
    animation-play-state: paused;
}
.ticker-track .ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 40px 0 0;
    font-size: 0.85rem;
    color: #ccc;
}
.ticker-item .ticker-tag {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: bold;
    color: #fff;
}
.ticker-tag.tag-feature { background: #10a37f; }
.ticker-tag.tag-update  { background: #409eff; }
.ticker-tag.tag-fix     { background: #e6a23c; }
.ticker-tag.tag-info    { background: #909399; }
.ticker-close {
    flex-shrink: 0;
    width: 30px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-left: 1px solid #333;
    color: #666;
    cursor: pointer;
    font-size: 16px;
}
.ticker-close:hover { color: #fff; background: rgba(255,255,255,0.05); }
@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Connection Banner */
.connection-banner {
    position: fixed; top: 50px; left: 0; width: 100%;
    background: #e74c3c; color: white; text-align: center;
    padding: 8px; z-index: 999; display: none;
    font-size: 0.9rem; box-shadow: 0 2px 5px rgba(0,0,0,0.2); font-weight: bold;
}

/* Queue Banner */
.queue-banner {
    position: fixed; top: 90px; left: 50%; transform: translateX(-50%);
    background: #e6a23c; color: white; padding: 8px 20px;
    border-radius: 20px; z-index: 998; display: none;
    font-size: 0.9rem; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown { from { transform: translate(-50%, -20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Loading Animation */
.loading-dots { display: flex; gap: 8px; align-items: center; min-height: 30px; padding: 10px 0; justify-content: flex-start; align-self: flex-start; }
.dot { width: 12px; height: 12px; background: var(--accent-color); border-radius: 50%; opacity: 0.4; animation: blink 1.4s infinite ease-in-out both; }
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.4; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1.1); } }

.loading-indicator {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #888;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
