/* Plurall AI - Claude-inspired Chat UI */

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --bg-input: #0d0d0d;
    --bg-message-user: #1a1a1a;
    --bg-message-assistant: transparent;
    --bg-sidebar: #000000;
    --bg-hover: #141414;
    --bg-active: #1a1a1a;
    --text-primary: #e8e8e8;
    --text-secondary: #999;
    --text-muted: #666;
    --border-color: #1a1a1a;
    --accent: #b8a0d2;
    --accent-hover: #a78bc4;
    --accent-teal: #7dd3c0;
    --gradient-brand: linear-gradient(135deg, #b8a0d2, #7dd3c0);
    --success: #4ade80;
    --danger: #f87171;
    --warning: #fbbf24;
    --radius: 24px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --sidebar-width: 260px;
    --header-height: 52px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

/* ── App Layout ── */
.app {
    display: flex;
    height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 14px 14px 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.logo-text-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.logo-tagline {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), #b8845a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #0d0d0d;
}

.logo-icon-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.icon-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* Temp Chat Toggle */
.temp-chat-section {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.temp-chat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.temp-chat-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.temp-chat-btn.active {
    background: rgba(184, 160, 210, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.toggle-switch {
    margin-left: auto;
    width: 32px;
    height: 18px;
    background: var(--bg-tertiary);
    border-radius: 9px;
    position: relative;
    transition: background 0.2s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--text-muted);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.2s;
}

.temp-chat-btn.active .toggle-switch {
    background: var(--accent);
}

.temp-chat-btn.active .toggle-switch::after {
    left: 16px;
    background: #000;
}

.temp-chat-hint {
    font-size: 11px;
    color: var(--text-muted);
    padding: 4px 10px 0;
    display: none;
}

.temp-chat-hint.visible {
    display: block;
}

/* Conversation List */
.conv-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 8px;
}

.conv-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 6px 10px;
    font-weight: 500;
}

.conv-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

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

.conv-item.active {
    background: var(--bg-active);
    color: var(--text-primary);
}

.conv-item .conv-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-item .conv-delete {
    opacity: 0;
    padding: 2px;
    color: var(--text-muted);
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.conv-item:hover .conv-delete {
    opacity: 1;
}

.conv-delete:hover {
    color: var(--danger) !important;
}

.conv-empty {
    padding: 20px 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Sidebar Plans Link */
.sidebar-plans-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: 0 10px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-plans-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(184, 160, 210, 0.08);
}

.sidebar-plans-link .plan-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    background: var(--gradient-brand);
    color: #000;
    border-radius: 4px;
}

/* Sidebar Account */
.sidebar-account {
    padding: 12px 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-avatar {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.account-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    color: var(--text-muted);
}

.logout-btn:hover {
    color: var(--danger) !important;
    background: rgba(248, 113, 113, 0.1) !important;
}

/* ── Main Chat Area ── */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--bg-primary);
}

/* Welcome mode layout */
.chat-main.welcome-mode {
    justify-content: flex-start;
}

.chat-main.welcome-mode .messages-container {
    flex: 0 0 auto;
    overflow: visible;
}

.chat-main.welcome-mode .messages {
    padding-top: 0;
    padding-bottom: 0;
}

.chat-main.welcome-mode .welcome-screen {
    min-height: 42vh;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 6px;
}

.chat-main.welcome-mode .input-area {
    flex-shrink: 0;
    padding-top: 0;
    padding-bottom: 14px;
}

/* Header */
.chat-header {
    height: var(--header-height);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    flex-shrink: 0;
    position: relative;
}

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

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
}

.header-model {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-logo-img {
    height: 22px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.header-username {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── Messages ── */
.messages-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 0;
    scroll-behavior: smooth;
}

.messages {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: auto;
    padding: 18px 20px 8px;
    text-align: center;
}

.welcome-logo {
    margin-bottom: 20px;
}

.welcome-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent), #b8845a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
    color: #0d0d0d;
}

.welcome-logo-img {
    height: 92px;
    width: auto;
    object-fit: contain;
    border-radius: 12px;
}

.welcome-title {
    font-size: 36px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.welcome-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.welcome-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.action-chip:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

/* Meeting Guard CTA on Welcome Screen */
.welcome-meeting-cta {
    margin-top: 24px;
    width: 100%;
    max-width: 440px;
}

.meeting-guard-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(184, 160, 210, 0.08), rgba(125, 211, 192, 0.08));
    border: 1px solid rgba(184, 160, 210, 0.25);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s;
    text-align: left;
}

.meeting-guard-btn:hover {
    background: linear-gradient(135deg, rgba(184, 160, 210, 0.15), rgba(125, 211, 192, 0.15));
    border-color: rgba(184, 160, 210, 0.45);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(184, 160, 210, 0.1);
}

.meeting-guard-btn-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #000;
}

.meeting-guard-btn-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.meeting-guard-btn-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.meeting-guard-btn-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.meeting-guard-btn-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.meeting-guard-btn:hover .meeting-guard-btn-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* Messages */
.message {
    display: flex;
    gap: 14px;
    margin-bottom: 28px;
    animation: fadeIn 0.3s ease;
}

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

.message-avatar {
    flex-shrink: 0;
}

.avatar-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.message.assistant .avatar-icon {
    background: linear-gradient(135deg, var(--accent), #b8845a);
    color: #0d0d0d;
}

.message.assistant .avatar-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-icon.avatar-img {
    background: none;
    overflow: hidden;
}

.message.user .avatar-icon {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-bubble {
    line-height: 1.65;
    font-size: 14px;
    color: var(--text-primary);
}

.message.user .message-bubble {
    background: var(--bg-message-user);
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    display: inline-block;
}

.message.assistant .message-bubble {
    padding: 4px 0;
}

.message-bubble h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.message-bubble h3 {
    font-size: 15px;
    margin: 14px 0 6px;
    color: var(--text-primary);
}

.message-bubble p {
    margin-bottom: 8px;
}

.message-bubble strong {
    color: var(--text-primary);
}

.message-bubble ul, .message-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-bubble li {
    margin: 4px 0;
}

.message-bubble code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Fira Code', monospace;
}

.analysis-heatmap-img {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 12px auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    object-fit: contain;
}

/* Tables */
.message-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
}

.message-bubble th, .message-bubble td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.message-bubble th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.message-bubble td {
    color: var(--text-secondary);
}

/* Verdict cards */
.verdict-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.verdict-card.deepfake .message-bubble {
    border-left: 3px solid var(--danger);
    padding-left: 16px;
}

.verdict-card.real .message-bubble {
    border-left: 3px solid var(--success);
    padding-left: 16px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
}

.typing-dot {
    width: 7px;
    height: 7px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* File preview in messages */
.file-preview-attached {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.file-preview-attached img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

/* ── Input Area ── */
.input-area {
    padding: 12px 20px 16px;
    background: var(--bg-primary);
}

.file-preview {
    max-width: 760px;
    margin: 0 auto 10px;
}

/* URL Scan Bar */
.url-scan-bar {
    max-width: 760px;
    margin: 0 auto 10px;
    animation: slideUp 0.2s ease;
}

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

.url-scan-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-xs);
    transition: border-color 0.2s;
}

.url-scan-content:focus-within {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.url-scan-icon {
    color: rgba(139, 92, 246, 0.7);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.url-scan-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.url-scan-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    min-width: 0;
}

.url-scan-input-wrap input::placeholder {
    color: var(--text-tertiary);
}

.url-platform-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    display: none;
    flex-shrink: 0;
}

.url-platform-badge.youtube { display: inline; background: rgba(255, 0, 0, 0.15); color: #ff4444; }
.url-platform-badge.instagram { display: inline; background: rgba(225, 48, 108, 0.15); color: #e1306c; }
.url-platform-badge.tiktok { display: inline; background: rgba(0, 242, 234, 0.15); color: #00f2ea; }
.url-platform-badge.twitter { display: inline; background: rgba(29, 155, 240, 0.15); color: #1d9bf0; }
.url-platform-badge.facebook { display: inline; background: rgba(24, 119, 242, 0.15); color: #1877f2; }
.url-platform-badge.website { display: inline; background: rgba(255, 255, 255, 0.1); color: var(--text-secondary); }
.url-platform-badge.media { display: inline; background: rgba(34, 197, 94, 0.15); color: #22c55e; }

.url-scan-btn {
    background: rgba(139, 92, 246, 0.2);
    border: none;
    color: rgba(139, 92, 246, 0.9);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.url-scan-btn:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.35);
    color: #fff;
}

.url-scan-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.url-scan-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border-radius: 4px;
    transition: color 0.2s;
}

.url-scan-close:hover {
    color: var(--text-primary);
}

.file-preview-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
}

.file-preview-content img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
}

.video-preview-icon {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 12px;
    color: var(--text-muted);
}

.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s;
}

.file-remove:hover {
    color: var(--danger);
    background: rgba(248, 113, 113, 0.1);
}

.input-box {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px 14px;
    transition: border-color 0.2s;
}

.input-box:focus-within {
    border-color: #444;
}

.attach-btn, .send-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.attach-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.send-btn {
    color: var(--accent);
}

.send-btn:hover {
    background: rgba(184, 160, 210, 0.15);
}

.send-btn:disabled {
    color: var(--text-muted);
    cursor: default;
}

#messageInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 24px;
    max-height: 150px;
    line-height: 1.5;
    padding: 4px 0;
}

#messageInput::placeholder {
    color: var(--text-muted);
}

.input-footer {
    max-width: 760px;
    margin: 8px auto 0;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Analysis Result Cards ── */
.signal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 8px 0;
}

.signal-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.signal-bar-wrap {
    background: var(--bg-tertiary);
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
    margin: 6px 0 4px;
}

.signal-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease;
}

.signal-bar.green { background: var(--success); }
.signal-bar.yellow { background: var(--warning); }
.signal-bar.red { background: var(--danger); }
.signal-bar.brand { background: var(--gradient-brand); }

.signal-detail {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 4px;
}

.insight-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 10px 0;
}

.insight-box .insight-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 6px;
}

.insight-box p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Heatmap section */
.heatmap-section {
    margin: 16px 0;
    text-align: center;
}

.heatmap-section img {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 8px auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.heatmap-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.heatmap-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.heatmap-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.heatmap-legend .dot.blue { background: #3b82f6; }
.heatmap-legend .dot.green { background: #22c55e; }
.heatmap-legend .dot.yellow { background: #eab308; }
.heatmap-legend .dot.red { background: #ef4444; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: block;
    }

    .messages {
        padding: 16px;
    }

    .input-area {
        padding: 10px 12px 14px;
    }

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

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* ── Sidebar Navigation ── */
.sidebar-nav {
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

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

.sidebar-nav-item.active {
    background: var(--bg-active);
    color: var(--text-primary);
}

.sidebar-nav-item.active svg {
    color: var(--accent);
}

.nav-badge {
    margin-left: auto;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Meeting Guard Page ── */
.meeting-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--bg-primary);
}

.meeting-header-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.meeting-header-title svg {
    color: var(--accent);
}

.meeting-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.meeting-status-badge.joining {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.meeting-status-badge.active, .meeting-status-badge.analyzing {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    animation: pulseBadge 2s infinite;
}

.meeting-status-badge.stopped {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.meeting-status-badge.error {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.meeting-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Join Section */
.meeting-join-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    padding: 40px 20px;
}

.meeting-join-card {
    max-width: 540px;
    width: 100%;
    text-align: center;
}

.meeting-join-icon {
    margin-bottom: 20px;
    color: var(--accent);
}

.meeting-join-card h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.meeting-join-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

/* Google Auth Section */
.meeting-auth-section {
    width: 100%;
    margin-bottom: 18px;
}
.meeting-auth-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s;
}
.meeting-auth-card.connected {
    border-color: rgba(52, 168, 83, 0.4);
    background: rgba(52, 168, 83, 0.06);
}
.meeting-auth-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.meeting-auth-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.meeting-auth-status {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.meeting-auth-desc {
    font-size: 11px;
    color: var(--text-secondary);
}
.meeting-auth-btn {
    padding: 7px 16px;
    border-radius: 6px;
    border: 1px solid rgba(66, 133, 244, 0.5);
    background: rgba(66, 133, 244, 0.12);
    color: #8ab4f8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.meeting-auth-btn:hover {
    background: rgba(66, 133, 244, 0.22);
    border-color: rgba(66, 133, 244, 0.7);
}
.meeting-auth-btn.connected {
    border-color: rgba(52, 168, 83, 0.5);
    background: rgba(52, 168, 83, 0.12);
    color: #81c995;
}
.meeting-auth-btn.signing-in {
    border-color: rgba(251, 188, 5, 0.5);
    background: rgba(251, 188, 5, 0.1);
    color: #fdd663;
    cursor: default;
}

.meeting-url-input-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.meeting-url-input-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s;
}

.meeting-url-input-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(184, 160, 210, 0.1);
}

.meeting-url-input-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.meeting-url-input-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    min-width: 0;
    font-family: inherit;
}

.meeting-url-input-box input::placeholder {
    color: var(--text-muted);
}

.meeting-platform-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    display: none;
}

.meeting-platform-badge.gmeet { display: inline; background: rgba(66, 133, 244, 0.15); color: #4285f4; }
.meeting-platform-badge.zoom { display: inline; background: rgba(45, 140, 255, 0.15); color: #2d8cff; }
.meeting-platform-badge.teams { display: inline; background: rgba(98, 100, 167, 0.15); color: #6264a7; }

.meeting-deploy-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-brand);
    border: none;
    border-radius: var(--radius-sm);
    color: #000;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.meeting-deploy-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.meeting-deploy-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.meeting-platforms-info {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 28px;
}

.platform-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.platform-tag.gmeet { color: #4285f4; border-color: rgba(66, 133, 244, 0.3); }
.platform-tag.zoom { color: #2d8cff; border-color: rgba(45, 140, 255, 0.3); }
.platform-tag.teams { color: #6264a7; border-color: rgba(98, 100, 167, 0.3); }

.meeting-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.meeting-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    font-size: 12px;
    color: var(--text-secondary);
}

.meeting-feature svg {
    color: var(--accent-teal);
    flex-shrink: 0;
}

/* Active Session */
.meeting-session-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px;
}

.session-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.session-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.session-platform-icon {
    font-size: 20px;
}

.session-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.session-url {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.session-timer {
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.meeting-stop-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: var(--radius-xs);
    color: #f87171;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.meeting-stop-btn:hover {
    background: rgba(248, 113, 113, 0.2);
}

/* Session Verdict Card */
.session-verdict-card {
    padding: 18px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--text-muted);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    transition: border-color 0.3s;
}

.session-verdict-card.real { border-left-color: var(--success); }
.session-verdict-card.deepfake { border-left-color: var(--danger); }
.session-verdict-card.analyzing { border-left-color: var(--warning); }

.verdict-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.verdict-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.verdict-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.verdict-value.real { color: var(--success); }
.verdict-value.deepfake { color: var(--danger); }

.verdict-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Participants Grid */
.participants-section {
    margin-bottom: 16px;
}

.participants-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.participants-title svg {
    color: var(--accent);
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.participant-card {
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: border-color 0.3s;
}

.participant-card.real { border-color: rgba(74, 222, 128, 0.3); }
.participant-card.deepfake { border-color: rgba(248, 113, 113, 0.3); }

.participant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.participant-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.participant-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.participant-verdict {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.participant-verdict.real { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.participant-verdict.deepfake { background: rgba(248, 113, 113, 0.15); color: #f87171; }

.participant-signals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.signal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--bg-primary);
    border-radius: 6px;
    font-size: 11px;
}

.signal-item .signal-label {
    color: var(--text-muted);
}

.signal-item .signal-value {
    font-weight: 600;
    color: var(--text-secondary);
}

.signal-item .signal-value.good { color: var(--success); }
.signal-item .signal-value.warn { color: var(--warning); }
.signal-item .signal-value.bad { color: var(--danger); }

.participant-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Session Log */
.session-log-section {
    margin-bottom: 20px;
}

.session-log-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.session-log-title svg { color: var(--accent-teal); }

.session-log {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
}

.log-entry {
    padding: 3px 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.log-entry.info { color: var(--text-secondary); }
.log-entry.success { color: var(--success); }
.log-entry.warning { color: var(--warning); }
.log-entry.error { color: var(--danger); }

/* Responsive - Meeting */
@media (max-width: 768px) {
    .meeting-url-input-wrap {
        flex-direction: column;
    }
    .meeting-features {
        grid-template-columns: 1fr;
    }
    .participants-grid {
        grid-template-columns: 1fr;
    }
    .session-url {
        max-width: 200px;
    }
}

/* ── Pricing Page ── */
.pricing-page {
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 24px;
}

.pricing-header {
    max-width: 900px;
    margin: 0 auto 40px;
}

.pricing-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.pricing-back:hover {
    color: var(--accent);
}

.pricing-logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pricing-logo-img {
    height: 48px;
    width: auto;
    border-radius: 10px;
    object-fit: cover;
}

.pricing-logo h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.pricing-logo p {
    font-size: 14px;
    color: var(--text-muted);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto 32px;
}

.pricing-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card-pro {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(184, 160, 210, 0.2);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-brand);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.pricing-card-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.pricing-price {
    margin-bottom: 12px;
}

.price-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
}

.price-period {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 24px;
    flex: 1;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.pricing-features li svg {
    flex-shrink: 0;
    color: var(--success);
}

.pricing-btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    border: none;
}

.pricing-btn-free {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: default;
}

.pricing-btn-pro {
    background: var(--gradient-brand);
    color: #000;
}

.pricing-btn-pro:hover:not(:disabled) {
    opacity: 0.9;
}

.pricing-btn-portal {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.pricing-btn-portal:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.pricing-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    max-width: 900px;
    margin: 0 auto;
}
