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

body {
    background-color: #060606;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ide-header {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.1em;
    color: #fff;
}

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

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ide-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.ide-sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Floating Chat Window Interface Panel */
.ai-panel {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 340px;
    height: 450px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 998;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ai-panel.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.panel-header {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.08em;
    color: #888;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-header button {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
}

.panel-header button:hover {
    color: #fff;
}

.tree-container, .chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.file-item {
    height: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    cursor: pointer;
    font-size: 12px;
    color: #aaa;
    transition: background 0.2s;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.02);
    color: #eee;
}

.file-item.active {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border-left: 2px solid #fff;
}

.editor-matrix {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #060606;
}

.tab-strip {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    background: rgba(10, 10, 10, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    gap: 4px;
}

.tab {
    height: 30px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #888;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
}

.tab.active {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tab .close-tab-btn {
    opacity: 0.4;
    cursor: pointer;
}

.tab:hover .close-tab-btn {
    opacity: 1;
}

.monaco-viewport {
    flex: 1;
    position: relative;
    width: 100%;
}

.placeholder-msg {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #444;
    font-size: 11px;
    text-align: center;
    padding: 20px;
    letter-spacing: 0.05em;
}

.terminal-drawer {
    height: 200px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(6, 6, 6, 0.95);
}

.terminal-header {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 10px;
    color: #666;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-header button {
    background: transparent;
    border: none;
    color: #555;
    font-family: inherit;
    font-size: 9px;
    cursor: pointer;
}

.terminal-header button:hover {
    color: #cc241d;
}

.terminal-logs {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-line.system { color: #666; }
.log-line.input { color: #eee; }
.log-line.error { color: #fb4934; border-left: 2px solid rgba(251, 73, 52, 0.5); padding-left: 6px; }
.log-line.success { color: #b8bb26; border-left: 2px solid rgba(184, 187, 38, 0.5); padding-left: 6px; }

.terminal-input-row {
    height: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.prompt-symbol {
    color: #444;
    margin-right: 8px;
    font-size: 12px;
}

.terminal-input-row input, .ai-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    outline: none;
}

.chat-history {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.5;
    max-width: 90%;
    word-break: break-word;
}

.chat-bubble.assistant {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #ccc;
}

.chat-bubble.user {
    background: #fff;
    color: #000;
    align-self: flex-end;
}

.ai-input-wrapper {
    margin: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
}

.ai-input-wrapper button {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
}

.ai-input-wrapper button:hover {
    color: #fff;
}

/* Floating AI Toggle Bubble Button Style */
.ai-bubble-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffffff;
    color: #000000;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s;
}

.ai-bubble-trigger:hover {
    background: #e5e5e5;
    transform: scale(1.08);
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 📱 Mobile Specific Overrides */
@media (max-width: 768px) {
    .ide-sidebar {
        display: none;
    }
    .ai-panel {
        width: calc(100% - 48px);
        right: 24px;
    }
    .terminal-drawer {
        height: 140px;
    }
}
