/* ============================================
   LLM Playground v2 - Clean, Organized CSS
   ============================================ */

/* CSS Variables - Theme */
:root {
    /* EY Light Theme */
    --bg-body: #f6f6f2;
    --bg-surface: #ffffff;
    --bg-hover: #efefe8;
    --text-primary: #1f1f1f;
    --text-secondary: #4c4c4c;
    --text-muted: #7a7a7a;
    --border-color: #d8d8cd;
    --accent-color: #ffe600;
    --accent-hover: #f2d600;
    --accent-contrast: #1f1f1f;
    --focus-ring: rgba(255, 230, 0, 0.28);
    --primary-color: var(--accent-color);
    --bg-primary: var(--bg-body);
    --bg-secondary: var(--bg-surface);
    --danger-color: #d93025;
    --success-color: #1e8e3e;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
}

[data-theme="dark"] {
    --bg-body: #1a1a1f;
    --bg-surface: #25252d;
    --bg-hover: #32323b;
    --text-primary: #f4f4f4;
    --text-secondary: #cacaca;
    --text-muted: #9a9a9a;
    --border-color: #40404a;
    --accent-color: #ffe600;
    --accent-hover: #f2d600;
    --accent-contrast: #1f1f1f;
    --focus-ring: rgba(255, 230, 0, 0.22);
    --primary-color: var(--accent-color);
    --bg-primary: var(--bg-body);
    --bg-secondary: var(--bg-surface);
}

/* Dark mode logo invert */
/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* ============================================
   Layout - App Container
   ============================================ */
.app-container {
    display: flex;
    height: 100vh;
}

/* ============================================
   Sidebars - Shared Styles
   ============================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    background: var(--bg-body);
    transition: width 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

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

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

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

/* Left Sidebar - Chat History */
.sidebar-left {
    width: 260px;
    border-right: 1px solid var(--border-color);
}

.sidebar-left.collapsed {
    width: 0;
    border-right: none;
}

/* Right Sidebar - Settings */
.sidebar-right {
    width: 320px;
    border-left: 1px solid var(--border-color);
}

.sidebar-right.collapsed {
    width: 0;
    border-left: none;
}

/* Chat History */
.chat-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-actions {
    display: flex;
    gap: 4px;
}

.search-history-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    margin: 0 8px 8px 8px;
}

.search-history-bar input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.search-history-bar input::placeholder {
    color: var(--text-muted);
}

.chat-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-history-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    gap: 12px;
}

.chat-history-item:hover {
    background: var(--bg-hover);
}

.chat-history-item.active {
    background: var(--bg-hover);
}

.chat-history-item .chat-icon {
    color: var(--text-secondary);
}

.chat-history-item .chat-title {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* ============================================
   Main Content
   ============================================ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-surface);
    margin: 12px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.brand:hover {
    background: var(--bg-hover);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

.brand-subtitle {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

/* ============================================
   Chat Area
   ============================================ */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Welcome Message */
.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-secondary);
}

.welcome-icon {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.welcome-message h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.welcome-message p {
    font-size: 14px;
    margin-bottom: 24px;
}

/* Message Bubbles */
.message {
    display: flex;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: var(--accent-color);
    color: var(--accent-contrast);
}

.message.assistant .message-avatar {
    background: var(--bg-hover);
    color: var(--text-primary);
}

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

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-sender {
    font-weight: 500;
    font-size: 14px;
}

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

.message-body {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.6;
}

.message.user .message-body {
    background: var(--accent-color);
    color: var(--accent-contrast);
    border-bottom-right-radius: 4px;
}

.message.assistant .message-body {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.message-actions {
    display: flex;
    gap: 8px;
}

.message-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

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

.message-action-btn.active {
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
}

.message-action-btn.thumbs-up.active {
    color: #10b981;
}

.message-action-btn.thumbs-down.active {
    color: #ef4444;
}

/* Edit button for user messages */
.message-edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.message.user {
    position: relative;
}

.message.user:hover .message-edit-btn {
    opacity: 1;
    pointer-events: auto;
}

.message-edit-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
}

.message-edit-btn i {
    font-size: 12px;
}

[data-theme="dark"] .message-edit-btn {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .message-edit-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Message with image */
.message-image {
    max-width: 400px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

/* Message file attachment */
.message-file-attachment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
}

.message-file-attachment i {
    color: var(--accent-color);
    font-size: 16px;
}

.message-file-attachment .file-name {
    font-weight: 500;
}

/* Code blocks in messages */
.message-body pre {
    background: var(--bg-body);
    padding: 12px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 8px 0;
}

.message-body code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
}

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

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

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* ============================================
   Chat Input Area
   ============================================ */
.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.file-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.file-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-hover);
    border-radius: 16px;
    font-size: 12px;
}

.file-chip .remove-file {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
}

.file-chip .remove-file:hover {
    color: var(--danger-color);
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--focus-ring);
}

.input-wrapper textarea {
    flex: 1;
    border: none;
    background: none;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    padding: 8px 0;
    max-height: 120px;
    outline: none;
}

.input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.input-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

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

.input-btn.recording {
    color: var(--danger-color);
    animation: pulse 1s infinite;
}

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

/* Input Menu Dropdown */
.input-menu-container {
    position: relative;
}

.input-menu-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 8px 0;
    z-index: 100;
}

.input-menu-dropdown.show {
    display: block;
    animation: fadeInUp 0.15s ease-out;
}

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

.input-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.input-menu-item:hover {
    background: var(--bg-hover);
}

.input-menu-item i {
    width: 20px;
    color: var(--text-secondary);
    font-size: 1rem;
    text-align: center;
}

.input-menu-item.active i {
    color: var(--accent-color);
}

.send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--accent-color);
    color: var(--accent-contrast);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.send-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

.send-btn:disabled {
    background: var(--bg-hover);
    color: var(--text-muted);
    cursor: not-allowed;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    padding: 8px 4px 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* Prompt Suggestions */
.prompt-suggestions {
    margin-top: 16px;
}

.suggestions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.suggestions-header:hover {
    background: var(--bg-hover);
}

.suggestions-header .toggle-icon {
    margin-left: auto;
    transition: transform 0.2s;
}

.suggestions-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.suggestions-grid.collapsed {
    display: none;
}

.suggestion-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.suggestion-btn:hover {
    border-color: var(--accent-color);
    background: var(--bg-hover);
}

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

/* ============================================
   Footer Disclaimer
   ============================================ */
.disclaimer {
    padding: 12px 20px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--accent-contrast);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

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

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-google {
    background: white;
    color: #1f1f1f;
    border: 1px solid var(--border-color);
    width: 100%;
}

.btn-google:hover {
    background: var(--bg-hover);
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.icon-btn.small {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

.slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
}

.info-icon {
    color: var(--text-muted);
    font-size: 14px;
    cursor: help;
    margin-left: 6px;
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
}

.info-icon:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* Settings Content */
.settings-content {
    padding: 16px;
}

/* ============================================
   Profile
   ============================================ */
.auth-container {
    width: 100%;
}

.login-form-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.login-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: var(--radius-sm, 6px);
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #333);
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.login-input:focus {
    border-color: #FFE600;
    box-shadow: 0 0 0 2px rgba(255, 230, 0, 0.2);
}

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: #FFE600;
    color: #2E2E38;
    border: none;
    border-radius: var(--radius-sm, 6px);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #FFD700;
}

.login-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    text-align: center;
}

.profile-container {
    width: 100%;
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.profile-btn:hover {
    background: var(--bg-hover);
}

.profile-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.profile-status {
    font-size: 11px;
    color: var(--success-color);
}

.dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 16px;
    right: 16px;
    margin-bottom: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    z-index: 1000;
}

.dropdown.show {
    display: block;
}

.dropdown-header {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-header strong {
    display: block;
    font-size: 14px;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

/* ============================================
   Modals
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-large {
    max-width: 720px;
}

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* ============================================================================
   Attestation Modal Styles
   ============================================================================ */

.attestation-subtitle {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
}

.attestation-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
    max-height: 180px;
    overflow-y: auto;
}

.attestation-box p {
    margin: 0;
    color: var(--text-primary);
}

.attestation-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.attestation-checkbox:hover {
    border-color: var(--accent-color);
}

.attestation-checkbox input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
    cursor: pointer;
    flex-shrink: 0;
}

.attestation-checkbox span {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
}

.attestation-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.attestation-note i {
    color: var(--accent-color);
}

.attestation-actions {
    justify-content: space-between;
}

.attestation-actions .btn-secondary {
    color: var(--text-secondary);
}

.attestation-actions .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Code Modal */
.code-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.tab-btn {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-copy {
    padding: 6px 12px;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: var(--border-color);
}

.code-block {
    background: var(--bg-body);
    padding: 16px;
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Rating Stars */
.rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.rating-stars i {
    font-size: 28px;
    color: var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.rating-stars i:hover,
.rating-stars i.active {
    color: #ffc107;
    transform: scale(1.1);
}

/* Screen Share Modal */
.screen-share-start {
    text-align: center;
    padding: 40px 20px;
}

.screen-icon {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.screen-share-start h4 {
    margin-bottom: 8px;
}

.screen-share-start p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.screen-preview video {
    width: 100%;
    border-radius: var(--radius-sm);
    background: #000;
}

.screen-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.captured-view .captured-image-container {
    margin-bottom: 16px;
}

.captured-view img {
    width: 100%;
    border-radius: var(--radius-sm);
}

.question-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   Advanced Section (Sidebar Navigation)
   ============================================ */
.advanced-section {
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.advanced-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.advanced-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.advanced-toggle i:first-child {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.advanced-toggle span {
    flex: 1;
}

.advanced-toggle-icon {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.advanced-section.collapsed .advanced-toggle-icon {
    transform: rotate(-90deg);
}

.advanced-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    padding-left: 8px;
    overflow: hidden;
    max-height: 200px;
    transition: max-height 0.2s ease, opacity 0.2s ease;
}

.advanced-section.collapsed .advanced-menu {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.advanced-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.advanced-item:hover {
    background: var(--bg-hover);
    color: var(--accent-color);
}

.advanced-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: var(--text-secondary);
}

.advanced-item:hover i {
    color: var(--accent-color);
}

.advanced-item.active {
    background: var(--bg-hover);
    color: var(--accent-color);
}

.advanced-item.active i {
    color: var(--accent-color);
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

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

    .sidebar-left.collapsed {
        transform: translateX(-100%);
        width: 260px;
    }

    .sidebar-right {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(0);
    }

    .sidebar-right.collapsed {
        transform: translateX(100%);
        width: 320px;
    }

    .main-content {
        margin: 8px;
    }

    .suggestions-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Unauthenticated State
   ============================================ */
body.not-authenticated .sidebar-left,
body.not-authenticated .sidebar-right,
body.not-authenticated .chat-input-area,
body.not-authenticated .header-left button:first-child {
    display: none !important;
}

body.not-authenticated .main-content {
    margin: 0;
    border-radius: 0;
}

body.not-authenticated #centerSignInBtn {
    display: inline-flex !important;
}

/* ============================================
   Blocked/Error Messages
   ============================================ */
.message.error .message-body {
    background: #fce8e6;
    color: var(--danger-color);
    border-left: 3px solid var(--danger-color);
}

.message.blocked .message-body {
    background: #fff3cd;
    color: #856404;
    border-left: 3px solid #ffc107;
}

/* ============================================
   Live Screen Sharing Indicator
   ============================================ */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--danger-color);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.live-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
