/**
 * ARIS 2.0 — Antigravity Code Studio Stylesheet
 * Authentic Visual Studio Code / Antigravity Dark Theme
 * 100% self-contained skill asset — zero database or external CSS framework required
 */

:root {
    --bg-window: #181818;
    --bg-activity: #181818;
    --bg-sidebar: #252526;
    --bg-editor: #1e1e1e;
    --bg-tabs: #252526;
    --bg-tab-active: #1e1e1e;
    --bg-tab-inactive: #2d2d2d;
    --bg-bot: #1e1e1e;
    --bg-bot-card: #252526;
    --bg-input: #2b2b2b;
    --border-color: #333333;
    --border-subtle: #2d2d2d;
    --text-primary: #cccccc;
    --text-bright: #ffffff;
    --text-muted: #858585;
    --accent-blue: #007acc;
    --accent-cyan: #38bdf8;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-yellow: #eab308;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-code: 'Fira Code', Consolas, "Courier New", monospace;
}

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

body.vscode-theme-dark {
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-window);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

/* -------------------------------------------------------------
 * Title Bar
 * ------------------------------------------------------------- */
.titlebar {
    height: 35px;
    background-color: var(--bg-window);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    flex-shrink: 0;
}

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

.app-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-menu {
    display: flex;
    align-items: center;
    gap: 2px;
}

.menu-dropdown-wrapper {
    position: relative;
}

.menu-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.menu-btn:hover, .menu-btn.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 210px;
    background: #252526;
    border: 1px solid #454545;
    border-radius: 4px;
    padding: 4px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 2000;
}

.dropdown-menu.hidden {
    display: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    font-size: 11.5px;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
}

.dropdown-item:hover {
    background: #094771;
    color: #ffffff;
}

.dropdown-item .shortcut {
    color: var(--text-muted);
    font-family: var(--font-code);
    font-size: 10px;
}

.dropdown-item:hover .shortcut {
    color: #9cdcfe;
}

.dropdown-sep {
    height: 1px;
    background: #3c3c3c;
    margin: 4px 0;
}

.top-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}

.top-action-btn:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: var(--accent-cyan);
    color: #fff;
}

.titlebar-center {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.title-project {
    color: var(--accent-cyan);
    font-weight: 600;
}

.title-sub {
    color: var(--text-primary);
}

.title-active-file {
    color: #9cdcfe;
    font-family: var(--font-code);
}

.titlebar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-return-hud {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    transition: all 0.2s;
}

.btn-return-hud:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--accent-cyan);
}

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

.title-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* -------------------------------------------------------------
 * Main Workspace Grid
 * ------------------------------------------------------------- */
.workspace {
    flex: 1;
    display: flex;
    min-height: 0;
    position: relative;
}

/* Activity Bar (Far Left) */
.activity-bar {
    width: 48px;
    background-color: var(--bg-activity);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    flex-shrink: 0;
}

.activity-top, .activity-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: center;
}

.activity-icon {
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: color 0.15s;
}

.activity-icon:hover {
    color: var(--text-bright);
}

.activity-icon.active {
    color: var(--text-bright);
}

.activity-icon.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background-color: var(--accent-cyan);
}

/* Left Sidebar (Explorer) */
.sidebar {
    width: 270px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-height: 0;
}

.sidebar-header {
    height: 36px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

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

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-bright);
}

.sidebar-search {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-search input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-bright);
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 11px;
    outline: none;
    font-family: var(--font-ui);
}

.sidebar-search input:focus {
    border-color: var(--accent-blue);
}

.explorer-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
}

.section-title:hover {
    background: rgba(255, 255, 255, 0.04);
}

.section-title .chevron {
    font-size: 9px;
    transition: transform 0.2s;
}

.section-title .badge {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: normal;
}

.tree-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
}

.tree-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    color: var(--text-muted);
    font-size: 11px;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(56, 189, 248, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tree Nodes */
.tree-node {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    cursor: pointer;
    border-radius: 2px;
    color: var(--text-primary);
    font-size: 12px;
    user-select: none;
    white-space: nowrap;
}

.tree-node:hover {
    background-color: #2a2d2e;
}

.tree-node.active {
    background-color: #37373d;
    color: #ffffff;
}

.tree-arrow {
    width: 12px;
    font-size: 9px;
    color: var(--text-muted);
    display: inline-flex;
    justify-content: center;
}

.tree-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    flex-shrink: 0;
}

.tree-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-node.ext-php .tree-icon { color: #a855f7; }
.tree-node.ext-js .tree-icon { color: #facc15; }
.tree-node.ext-json .tree-icon { color: #f59e0b; }
.tree-node.ext-css .tree-icon { color: #38bdf8; }
.tree-node.ext-html .tree-icon { color: #ea580c; }
.tree-node.ext-md .tree-icon { color: #60a5fa; }
.tree-node.ext-env .tree-icon { color: #ec4899; }
.tree-node.ext-folder .tree-icon { color: #e2b714; }

.tree-children {
    display: flex;
    flex-direction: column;
}

.outline-section {
    height: 160px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.outline-container {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    font-family: var(--font-code);
    font-size: 11px;
}

.outline-empty {
    color: var(--text-muted);
    font-style: italic;
    padding: 6px;
    font-size: 11px;
}

.outline-item {
    padding: 3px 6px;
    color: #9cdcfe;
    cursor: pointer;
    border-radius: 2px;
}

.outline-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* -------------------------------------------------------------
 * Center Editor Area
 * ------------------------------------------------------------- */
.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-editor);
    overflow: hidden;
}

/* Tabs Bar */
.tabs-bar {
    height: 35px;
    background-color: var(--bg-tabs);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    flex-shrink: 0;
}

.tabs-list {
    display: flex;
    align-items: center;
    height: 100%;
}

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 12px;
    background-color: var(--bg-tab-inactive);
    color: var(--text-muted);
    border-right: 1px solid var(--border-color);
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background 0.15s, color 0.15s;
}

.tab:hover {
    background-color: #2e2e2e;
    color: var(--text-primary);
}

.tab.active {
    background-color: var(--bg-tab-active);
    color: var(--text-bright);
}

.tab.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-cyan);
}

.tab-icon {
    display: flex;
    align-items: center;
}

.tab-title {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tab-dirty-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    display: none;
}

.tab.dirty .tab-dirty-dot {
    display: inline-block;
}

.tab-close {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    font-size: 12px;
    opacity: 0.7;
    transition: opacity 0.15s, background 0.15s;
}

.tab-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

.tabs-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 8px;
}

/* Breadcrumbs Bar */
.breadcrumbs-bar {
    height: 24px;
    background-color: var(--bg-editor);
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.breadcrumbs-path {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-code);
}

.crumb-sep {
    opacity: 0.4;
}

.crumb-file {
    color: var(--text-primary);
    font-weight: 500;
}

.editor-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dirty-status {
    font-size: 10px;
    color: var(--accent-yellow);
}

.pill-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.pill-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-cyan);
    color: #fff;
}

/* Immediate Built-in Editor & Seamless Monaco Upgrade */
.editor-container {
    flex: 1;
    min-height: 0;
    position: relative;
    background: var(--bg-editor);
}

.monaco-mount {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    z-index: 10;
}

.monaco-mount.hidden {
    display: none;
}

.builtin-editor {
    display: flex;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    background: #1e1e1e;
    overflow: hidden;
    z-index: 5;
}

.builtin-editor.hidden {
    display: none;
}

.editor-gutter {
    width: 52px;
    background: #181818;
    color: #6e7681;
    padding: 10px 8px;
    text-align: right;
    font-family: var(--font-code);
    font-size: 13px;
    line-height: 1.5;
    user-select: none;
    border-right: 1px solid #2d2d2d;
    overflow: hidden;
    white-space: pre;
    flex-shrink: 0;
}

.editor-code-wrapper {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.code-editor-area {
    width: 100%;
    height: 100%;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: var(--font-code);
    font-size: 13px;
    line-height: 1.5;
    border: none;
    outline: none;
    padding: 10px 14px;
    resize: none;
    white-space: pre;
    tab-size: 4;
    overflow: auto;
}

.code-editor-area::placeholder {
    color: #555555;
    font-style: italic;
}

/* Floating Find in File Bar */
.editor-find-bar {
    position: absolute;
    top: 10px;
    right: 25px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #252526;
    border: 1px solid #454545;
    border-radius: 4px;
    padding: 4px 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.editor-find-bar.hidden {
    display: none;
}

.editor-find-bar input {
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    color: #fff;
    padding: 3px 6px;
    border-radius: 3px;
    font-family: var(--font-ui);
    font-size: 11px;
    width: 160px;
    outline: none;
}

.editor-find-bar input:focus {
    border-color: #007acc;
}

.editor-find-bar button {
    background: transparent;
    border: 1px solid #3c3c3c;
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.editor-find-bar button:hover {
    background: #094771;
    color: #fff;
}

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

/* Editor Status Bar */
.editor-statusbar {
    height: 22px;
    background-color: #007acc;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 11px;
    flex-shrink: 0;
}

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

.status-item {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: default;
}

.status-live {
    background: rgba(0, 0, 0, 0.2);
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
}

/* -------------------------------------------------------------
 * Right Panel: Antigravity Bot
 * ------------------------------------------------------------- */
.bot-panel {
    width: 420px;
    background-color: var(--bg-bot);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-height: 0;
}

.bot-panel.collapsed {
    display: none;
}

.bot-header {
    height: 48px;
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bot-avatar {
    width: 30px;
    height: 30px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-bright);
}

.bot-subtitle {
    font-size: 10px;
    color: var(--accent-cyan);
}

.bot-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Changes bar */
.changes-bar {
    height: 32px;
    background: #202428;
    border-bottom: 1px solid var(--border-color);
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.changes-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.changes-badge {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-cyan);
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
}

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

.btn-review-diff {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-review-diff:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Bot Activity / Reasoning banner */
.bot-activity-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(56, 189, 248, 0.08);
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    font-size: 11px;
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.bot-activity-banner.hidden {
    display: none;
}

.activity-pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Chat Stream */
.chat-stream {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12.5px;
}

.user-msg {
    align-self: flex-end;
    max-width: 90%;
    background: #094771;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px 8px 2px 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.user-msg .msg-body {
    white-space: pre-wrap;
    word-break: break-word;
}

.bot-msg {
    align-self: flex-start;
    width: 100%;
    background: var(--bg-bot-card);
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: 8px;
}

.welcome-card {
    border-color: rgba(56, 189, 248, 0.3);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.05) 0%, rgba(37, 37, 38, 0.9) 100%);
}

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

.sender-name {
    font-weight: 600;
    color: var(--accent-cyan);
}

.msg-body {
    line-height: 1.5;
    color: var(--text-primary);
}

.msg-body p {
    margin-bottom: 8px;
}

.msg-body p:last-child {
    margin-bottom: 0;
}

.msg-body code {
    background: rgba(0, 0, 0, 0.3);
    color: #ce9178;
    padding: 1px 4px;
    border-radius: 3px;
    font-family: var(--font-code);
    font-size: 11.5px;
}

.msg-body pre {
    background: #181818;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 10px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: var(--font-code);
    font-size: 11.5px;
    line-height: 1.4;
}

.msg-body pre code {
    background: transparent;
    padding: 0;
    color: #d4d4d4;
}

/* Tool execution badges */
.tool-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #181818;
    border: 1px solid #3c3c3c;
    border-left: 3px solid var(--accent-cyan);
    padding: 6px 10px;
    border-radius: 4px;
    margin: 6px 0;
    font-family: var(--font-code);
    font-size: 11px;
}

.tool-badge.running {
    border-left-color: var(--accent-yellow);
}

.tool-badge.success {
    border-left-color: var(--accent-green);
}

/* Modified file notification card */
.file-modified-card {
    background: #181818;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    padding: 10px;
    margin: 8px 0;
}

.file-modified-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-green);
    margin-bottom: 6px;
}

.file-modified-path {
    font-family: var(--font-code);
    font-size: 11px;
    color: #9cdcfe;
    margin-bottom: 6px;
    word-break: break-all;
}

.file-modified-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.btn-view-diff {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-view-diff:hover {
    background: rgba(34, 197, 94, 0.3);
}

/* Command Suggestions */
.command-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.quick-prompt {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.quick-prompt:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-cyan);
    color: var(--text-bright);
}

/* -------------------------------------------------------------
 * Antigravity Prompt Capsule (Matches Google Antigravity IDE)
 * ------------------------------------------------------------- */
.antigravity-chat-footer {
    padding: 10px 12px 14px 12px;
    background: transparent;
    flex-shrink: 0;
}

.antigravity-input-card {
    background: #1e1f23;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 10px 14px 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.antigravity-input-card:focus-within {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 6px 28px rgba(2, 132, 199, 0.18);
}

.antigravity-context-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.antigravity-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    color: #7dd3fc;
    font-family: var(--font-code);
}

.antigravity-file-chip .chip-at {
    color: #38bdf8;
    font-weight: 700;
}

.antigravity-file-chip .btn-chip-remove {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 3px;
    display: inline-flex;
    align-items: center;
}

.antigravity-file-chip .btn-chip-remove:hover {
    color: #ef4444;
}

.antigravity-textarea {
    width: 100%;
    min-height: 38px;
    max-height: 140px;
    background: transparent;
    border: none;
    outline: none;
    color: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    resize: none;
    padding: 2px 0 0 0;
    margin: 0;
}

.antigravity-textarea::placeholder {
    color: #64748b;
    font-size: 13px;
}

.antigravity-input-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}

.toolbar-left-group {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.btn-antigravity-plus {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-antigravity-plus:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: scale(1.05);
}

.model-picker-container {
    position: relative;
}

.model-thinking-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12.5px;
    transition: all 0.15s;
    color: #cbd5e1;
}

.model-thinking-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.pill-model-name {
    color: #38bdf8;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.pill-thinking-level {
    color: #94a3b8;
    font-weight: 500;
    margin-left: 2px;
}

.pill-chevron {
    color: #64748b;
    transition: transform 0.2s;
}

.model-thinking-pill.open .pill-chevron {
    transform: rotate(180deg);
}

/* Sleek Antigravity Popover Menu */
.antigravity-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    min-width: 290px;
    background: #18191c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: blur(12px);
    animation: popoverFadeIn 0.15s ease-out;
}

.antigravity-popover.hidden {
    display: none !important;
}

.hidden {
    display: none !important;
}

.send-spinner.hidden {
    display: none !important;
}

.send-arrow.hidden {
    display: none !important;
}

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

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

.popover-group-title {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.8px;
    margin-bottom: 2px;
}

.btn-popover-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-popover-close:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.1);
}

.thinking-level-chips {
    display: flex;
    align-items: center;
    gap: 6px;
}

.thinking-chip {
    flex: 1;
    padding: 5px 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.thinking-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.15);
}

.thinking-chip.active {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
}

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

.model-options-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.model-options-list::-webkit-scrollbar {
    width: 5px;
}

.model-options-list::-webkit-scrollbar-track {
    background: transparent;
}

.model-options-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.model-options-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.popover-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.btn-popover-done {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-popover-done:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
}

.model-option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
}

.model-option-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.model-option-item.selected {
    background: rgba(2, 132, 199, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
}

.model-option-item .model-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.model-option-item .model-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.model-option-item .model-name {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
}

.model-option-item .model-sub {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-option-item .model-pill-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    flex-shrink: 0;
}

.toolbar-right-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-antigravity-voice {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-antigravity-voice:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.08);
}

.btn-antigravity-voice.listening {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    animation: voicePulse 1s infinite alternate;
}

@keyframes voicePulse {
    from { transform: scale(1); box-shadow: 0 0 0 rgba(239, 68, 68, 0.4); }
    to { transform: scale(1.1); box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); }
}

.btn-antigravity-send {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #007aff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.4);
    transition: all 0.15s;
}

.btn-antigravity-send:hover {
    background: #0066d6;
    box-shadow: 0 4px 14px rgba(0, 122, 255, 0.6);
    transform: scale(1.05);
}

.btn-antigravity-send:active {
    transform: scale(0.96);
}

.btn-antigravity-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-antigravity-send .send-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* -------------------------------------------------------------
 * Diff Modal
 * ------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.diff-modal-card {
    width: 85vw;
    height: 80vh;
    background: var(--bg-editor);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.diff-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-bright);
}

.diff-viewer-body {
    flex: 1;
    overflow: auto;
    background: #181818;
    padding: 12px;
}

.diff-content {
    font-family: var(--font-code);
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

.diff-line-add {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    display: block;
    padding: 1px 6px;
    border-left: 3px solid #22c55e;
}

.diff-line-del {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    display: block;
    padding: 1px 6px;
    border-left: 3px solid #ef4444;
}

.diff-line-context {
    color: #9ca3af;
    display: block;
    padding: 1px 6px;
}

.diff-modal-footer {
    height: 48px;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

/* Prompt Modal */
.prompt-modal-card {
    width: 440px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 14px;
    color: var(--text-bright);
    font-weight: 600;
}

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

.modal-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-bright);
    font-family: var(--font-code);
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 4px;
    outline: none;
}

.modal-input:focus {
    border-color: var(--accent-cyan);
}

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

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-primary {
    background: var(--accent-blue);
    border: none;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.btn-primary:hover {
    background: #0066b8;
}

/* ==============================================================================
   WORKSPACE MODE NAVIGATION BAR & PANES
   ============================================================================== */
.studio-mode-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #111827;
    border-bottom: 1px solid #1f2937;
    padding: 6px 12px;
    flex-shrink: 0;
    user-select: none;
}

.mode-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 600;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: all 0.15s ease;
}

.mode-tab-btn:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.05);
}

.mode-tab-btn.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.studio-view-pane {
    height: calc(100vh - 75px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.studio-view-pane.hidden {
    display: none !important;
}

/* ==============================================================================
   APP CREATOR (WEB FORM) STYLES
   ============================================================================== */
.builder-scroll-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #06090e;
}

.preset-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.preset-chip:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #38bdf8;
}

.diag-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid #1e293b;
    border-radius: 6px;
    backdrop-filter: blur(8px);
}

.build-step {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #1e293b;
    border-radius: 4px;
    padding: 6px 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.build-step.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #38bdf8;
}

.build-step.completed {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
}

/* ==============================================================================
   APPS ROSTER STYLES
   ============================================================================== */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding-bottom: 24px;
}

.app-roster-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.app-roster-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ==============================================================================
   BOT THOUGHT PROCESS BOX & MULTIMODAL ATTACHMENTS
   ============================================================================== */
.studio-thought-box {
    margin: 8px 0;
    border-radius: 4px;
    background: rgba(10, 16, 26, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.25);
    overflow: hidden;
    font-size: 11px;
}

.studio-thought-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(14, 23, 38, 0.9);
    cursor: pointer;
    user-select: none;
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background 0.15s ease;
}

.studio-thought-summary:hover {
    background: rgba(56, 189, 248, 0.15);
}

.studio-thought-steps {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid rgba(56, 189, 248, 0.15);
    max-height: 220px;
    overflow-y: auto;
}

.studio-step-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-family: var(--font-code);
    font-size: 11px;
    line-height: 1.4;
    color: #94a3b8;
}

.studio-step-item.tool-start {
    color: #38bdf8;
}

.studio-step-item.tool-finish {
    color: #10b981;
}

.studio-step-item.reasoning {
    color: #a78bfa;
    font-style: italic;
}

.studio-step-item.file-mod {
    color: #34d399;
    font-weight: bold;
}

.studio-attachment-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(3, 7, 18, 0.7);
    border-top: 1px dashed rgba(56, 189, 248, 0.3);
}

.studio-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 24, 38, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 10px;
    color: #fff;
    max-width: 200px;
}

.studio-attachment-chip img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 2px;
}

.studio-attachment-chip .btn-remove-attachment {
    background: none;
    border: none;
    color: #f43f5e;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    padding: 0 2px;
}

.studio-attachment-chip .btn-remove-attachment:hover {
    color: #ff0055;
}

.btn-attach-file {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-attach-file:hover {
    border-color: #38bdf8;
    color: #38bdf8;
}

