/* ==========================================
   PROMPTIZY 10.0 - TWO-COLUMN LAYOUT
   ========================================== */

:root {
    --accent-blue: #3b82f6;
    --bg-deep: #0a0a12;
    --bg-card: rgba(15, 20, 35, 0.9);
    --border-subtle: rgba(255, 255, 255, 0.1);
    --text-primary: #fff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
    background: linear-gradient(135deg, #0a0a12 0%, #1a1a2e 50%, #0a0a12 100%);
    color: var(--text-primary);
    font-family: var(--font-stack);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================
   MAIN LAYOUT - Two Columns
   ========================================== */

.app-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    gap: 0;
}

/* ==========================================
   LEFT PANEL - Input
   ========================================== */

.input-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    border-right: 1px solid var(--border-subtle);
    position: relative;
    transition: justify-content 0.3s;
}

/* When results exist, move form to top */
.input-panel.has-results {
    justify-content: flex-start;
    padding-top: 60px;
}

.input-panel.has-results .glow-orb {
    width: 60px;
    height: 60px;
    margin-bottom: 24px;
}

.input-panel.has-results .lightning-icon {
    font-size: 24px;
}

/* The Orb */
.glow-orb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #60a5fa, #2563eb, #1d4ed8);
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.lightning-icon {
    font-size: 36px;
}

/* Input Card */
.glass-card {
    width: 100%;
    max-width: 500px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 24px;
}

.input-area {
    margin-bottom: 20px;
}

.pixel-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    font-family: var(--font-stack);
    outline: none;
    resize: none;
    min-height: 80px;
    line-height: 1.5;
}

.pixel-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Card Footer */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.add-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-subtle);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.add-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.spacer {
    flex: 1;
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #1e3a8a;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.send-btn:hover {
    transform: scale(1.1);
}

/* Onboarding Guide */
.onboarding-guide {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.onboarding-guide:hover {
    opacity: 0.9;
}

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

.step-num {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.step-divider {
    width: 20px;
    height: 1px;
    background: var(--border-subtle);
}

/* Hide guide when results exist */
.input-panel.has-results .onboarding-guide {
    display: none;
}

/* ==========================================
   RIGHT PANEL - Output
   ========================================== */

.output-panel {
    display: flex;
    flex-direction: column;
    background: rgba(5, 5, 15, 0.8);
    position: relative;
}

/* Empty State */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    padding: 40px;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    opacity: 0.6;
}

/* Output Content */
.output-container {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.output-container.visible {
    display: flex;
}

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

.output-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.output-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.output-actions {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-subtle);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.action-btn.primary {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Syntax Highlighting */
.heading-md {
    color: #a78bfa;
    font-weight: 600;
    display: block;
    margin-top: 16px;
}

.tag-xml {
    color: #f472b6;
}

.attr-xml {
    color: #60a5fa;
}

/* ==========================================
   MODEL PICKER MODAL
   ========================================== */

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

.context-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    max-width: 90vw;
    background: rgba(15, 20, 35, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 20px;
    z-index: 1000;
}

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

.menu-section-title {
    grid-column: 1 / -1;
    padding: 8px 0 4px;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.menu-item:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
    color: #fff;
}

.menu-item.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    color: #fff;
}

.model-icon {
    font-size: 16px;
}

.hidden {
    display: none !important;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .input-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 24px;
    }

    .output-panel {
        min-height: 50vh;
    }
}