/* ======================================================
   AGORA — Premium Dark Theme
   ====================================================== */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-elevated: #1e1e2a;
    --bg-input: #12121a;

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-focus: rgba(139, 92, 246, 0.5);

    --text-primary: #f0f0f5;
    --text-secondary: #8b8b9e;
    --text-muted: #5a5a6e;

    --accent-primary: #8b5cf6;
    --accent-primary-hover: #7c3aed;
    --accent-glow: rgba(139, 92, 246, 0.15);
    --accent-glow-strong: rgba(139, 92, 246, 0.3);

    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    --gradient-bg: linear-gradient(180deg, #0a0a0f 0%, #0f0f1a 100%);

    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;

    /* Spacing */
    --section-padding: 6rem 2rem;
    --card-radius: 16px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: scroll;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.5); }

/* ======================================================
   NAVBAR
   ====================================================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-base);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
}

.brand-icon {
    font-size: 1.5rem;
}

.brand-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    gap: 0.75rem;
    border-top: 1px solid var(--border);
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
}

.mobile-link:hover { color: var(--text-primary); }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
}

/* ======================================================
   BUTTONS
   ====================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn svg,
.btn i { width: 18px; height: 18px; }

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 24px;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow-strong);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    padding: 12px 24px;
    font-size: 0.95rem;
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-xl {
    padding: 18px 40px;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

.btn-xl svg,
.btn-xl i { width: 22px; height: 22px; }

/* ======================================================
   HERO
   ====================================================== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%);
    bottom: -15%;
    left: -10%;
    animation-delay: -7s;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 70%);
    top: 40%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 30px) scale(1.02); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-glow);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 2rem;
}

.badge-icon { width: 16px; height: 16px; }

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.25rem 2.5rem;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

@media (max-width: 640px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem 2rem;
    }
    .stat-divider {
        width: 60px;
        height: 1px;
    }
}

/* ======================================================
   SECTIONS (shared)
   ====================================================== */
.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ======================================================
   FEATURES
   ====================================================== */
#features {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 2rem;
    transition: all var(--transition-base);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon-wrap {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    color: var(--accent-primary);
}

.feature-icon-wrap svg,
.feature-icon-wrap i { width: 24px; height: 24px; }

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ======================================================
   TUTORIAL
   ====================================================== */
#tutorial {
    background: var(--bg-primary);
}

.video-container {
    max-width: 900px;
    margin: 0 auto 3rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-container video {
    width: 100%;
    display: block;
    background: #000;
}

.install-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 480px) {
    .install-methods {
        grid-template-columns: 1fr;
    }
}

.install-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 1.75rem;
    transition: border-color var(--transition-base);
}

.install-card:hover {
    border-color: var(--border-hover);
}

.install-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.install-icon {
    width: 22px;
    height: 22px;
    color: var(--accent-primary);
}

.install-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-recommended {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent-glow);
    color: var(--accent-primary);
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.code-block {
    background: #0d0d14;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.copy-btn svg, .copy-btn i { width: 14px; height: 14px; }

.code-block pre {
    padding: 1rem 1.25rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
}

.code-block code {
    color: var(--text-primary);
}

.code-comment { color: #5a5a6e; }
.code-cmd { color: #8b5cf6; font-weight: 600; }

.install-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.install-note code {
    background: var(--accent-glow);
    color: var(--accent-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ======================================================
   DOWNLOAD
   ====================================================== */
#download {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.download-box {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.download-icon-wrap {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    color: var(--accent-primary);
}

.download-icon-wrap svg,
.download-icon-wrap i { width: 36px; height: 36px; }

.download-box h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.download-box > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.download-status {
    margin-top: 1rem;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.download-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.download-status.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.download-info {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.info-icon { width: 14px; height: 14px; }

.hidden { display: none !important; }

/* ======================================================
   CHAT
   ====================================================== */
#chat {
    background: var(--bg-primary);
}

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.chat-user-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.user-icon { width: 18px; height: 18px; color: var(--text-muted); }

.chat-user-bar input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
}

.chat-user-bar input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    transition: background var(--transition-base);
}

.connection-status.connected .status-dot { background: var(--success); }
.connection-status.connected .status-text { color: var(--success); }
.connection-status.error .status-dot { background: var(--error); }
.connection-status.error .status-text { color: var(--error); }

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 8px;
}

.empty-icon { width: 32px; height: 32px; }

.chat-msg {
    display: flex;
    gap: 8px;
    padding: 0;
    margin-bottom: 8px;
    animation: msgIn 0.3s ease-out;
    align-items: flex-end;
}

.msg-me {
    flex-direction: row-reverse;
}

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

.msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--accent-primary);
    flex-shrink: 0;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.msg-body {
    max-width: 75%;
    display: flex;
    flex-direction: column;
}

.msg-me .msg-body {
    align-items: flex-end;
}

.msg-other .msg-body {
    align-items: flex-start;
}

.msg-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
    padding: 0 4px;
}

.msg-me .msg-header {
    flex-direction: row-reverse;
}

.msg-username {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

.msg-content {
    font-size: 0.95rem;
    word-break: break-word;
    line-height: 1.4;
    padding: 10px 14px;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.msg-me .msg-content {
    background: #10b981;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.msg-other .msg-content {
    background: #1e293b;
    color: #f8fafc;
    border-bottom-left-radius: 4px;
}

/* ---- Markdown Body ---- */
.markdown-body p { margin: 0 0 0.4em; }
.markdown-body p:last-child { margin: 0; }
.markdown-body code {
    background: rgba(0,0,0,0.25);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
}
.markdown-body pre {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.5em 0;
}
.markdown-body pre code {
    background: transparent;
    padding: 0;
}
.markdown-body blockquote {
    border-left: 3px solid rgba(255,255,255,0.4);
    margin: 0.5em 0;
    padding-left: 10px;
    font-style: italic;
    opacity: 0.9;
}
.markdown-body ul, .markdown-body ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}
.markdown-body a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.9;
}
.markdown-body a:hover {
    opacity: 1;
}

.chat-input-bar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.chat-input-bar input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
}

.chat-input-bar input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.chat-input-bar input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-input-bar .btn {
    padding: 10px 16px;
}

.chat-input-bar .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.chat-input-bar .btn svg,
.chat-input-bar .btn i { width: 18px; height: 18px; }

.chat-error {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border-top: 1px solid rgba(239, 68, 68, 0.2);
    text-align: center;
}

/* ======================================================
   FOOTER
   ====================================================== */
#footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 600px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ======================================================
   RESPONSIVE POLISH
   ====================================================== */
@media (max-width: 640px) {
    .section-inner {
        padding: 4rem 1.25rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-lg, .btn-xl {
        width: 100%;
        justify-content: center;
    }

    .download-box {
        padding: 2rem 1.5rem;
    }

    .chat-messages {
        height: 300px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}
/* ---- Chat Overlay & Pinned Message ---- */
.chat-container {
    position: relative;
}

.chat-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.chat-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.overlay-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.chat-overlay h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.chat-overlay p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.chat-pinned-message {
    background: rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-pinned-message.hidden {
    display: none !important;
}

.pin-icon {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.pinned-content {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

/* ---- Admin Panel ---- */
.admin-panel {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.admin-panel-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--success);
    font-weight: 500;
}
.admin-actions {
    display: flex;
    gap: 10px;
}
.admin-status {
    margin-top: 1rem;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
}
.admin-status.info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.admin-status.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.admin-status.error { background: rgba(239, 68, 68, 0.1); color: var(--error); }

/* ---- Chat Admin Elements ---- */
.badge-admin {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
}
.badge-admin i {
    width: 12px;
    height: 12px;
}
.msg-avatar.admin {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}
.msg-username.admin {
    color: var(--accent-primary);
}
.btn-delete-msg {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    margin-left: auto;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-delete-msg:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}
.btn-delete-msg i {
    width: 14px;
    height: 14px;
}
/* ======================================================
   TABS (OS Selector)
   ====================================================== */
.os-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.os-tab {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.os-tab:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.os-tab.active {
    background: var(--accent-glow);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.engine-tab {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.engine-tab:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.engine-tab.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
    color: var(--text-primary);
    font-weight: 600;
}
