/* DGN CODE ASSISTANT - GLASSMORPHISM DESKTOP & LANDING DESIGN SYSTEM */

:root {
    --dgn-bg: #07090e;
    --dgn-surface: #0f1523;
    --dgn-surface-border: rgba(255, 255, 255, 0.08);
    --dgn-panel: #141c2e;
    --dgn-panel-border: rgba(255, 255, 255, 0.12);
    --dgn-cyan: #00f2fe;
    --dgn-cyan-glow: rgba(0, 242, 254, 0.3);
    --dgn-purple: #8b5cf6;
    --dgn-purple-glow: rgba(139, 92, 246, 0.3);
    --dgn-emerald: #10b981;
    --dgn-amber: #f59e0b;
    --dgn-rose: #f43f5e;
    --dgn-text-main: #f1f5f9;
    --dgn-text-muted: #94a3b8;
    --dgn-text-dim: #64748b;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--dgn-bg);
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(0, 242, 254, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(139, 92, 246, 0.06) 0%, transparent 40%);
    color: var(--dgn-text-main);
    height: 100vh;
    overflow: hidden;
}

/* Main Layout Grid */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(11, 16, 29, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    user-select: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
}

.brand-logo-img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 16px var(--dgn-cyan-glow);
}

.brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    border-radius: 10px;
    color: #040914;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 16px var(--dgn-cyan-glow);
}

.brand-text strong {
    display: block;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
}

.brand-kicker, .sidebar-section-label {
    color: var(--dgn-cyan);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-section-label {
    color: var(--dgn-text-dim);
    margin: 1.2rem 0 0.5rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.nav-item {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--dgn-text-muted);
    padding: 0.7rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

.nav-item.active {
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.3);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 242, 254, 0.15);
}

.download-sidebar-card {
    margin-bottom: 0.75rem;
}

.download-btn-glow {
    background: linear-gradient(135deg, #10b981 0%, #00f2fe 100%) !important;
    color: #040914 !important;
    font-weight: 800 !important;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35) !important;
}

.download-btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5) !important;
}

.account-card {
    background: rgba(20, 28, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.account-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Main Content Workspace */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2rem;
    overflow-y: auto;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 28, 46, 0.6);
    border: 1px solid var(--dgn-surface-border);
    border-radius: 14px;
    backdrop-filter: blur(16px);
    padding: 1rem 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-kicker {
    color: var(--dgn-cyan);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.header-title {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.engine-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 999px;
    color: #34d399;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
}

.status-pulse {
    width: 0.5rem;
    height: 0.5rem;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}

/* Page Views */
.page-view {
    display: none;
}

.page-view.active {
    display: block;
}

/* LANDING PAGE STYLING */
.hero-section {
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(16, 23, 42, 0.8) 0%, rgba(20, 28, 46, 0.6) 100%);
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-block;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 999px;
    color: var(--dgn-cyan);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--dgn-text-muted);
    line-height: 1.6;
    max-width: 800px;
    margin-bottom: 1.75rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.75rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dgn-cyan);
}

.stat-label {
    font-size: 0.82rem;
    color: var(--dgn-text-muted);
    margin-top: 0.2rem;
}

.section-title-group {
    margin: 2rem 0 1.25rem;
}

.section-kicker {
    color: var(--dgn-purple);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.section-title-group h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 0.2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.feature-card {
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 12px 30px rgba(0, 242, 254, 0.1);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.85rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--dgn-text-muted);
    line-height: 1.55;
}

.demo-showcase-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(0, 242, 254, 0.15) 100%);
    border-color: rgba(139, 92, 246, 0.3);
}

.showcase-info h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.showcase-info p {
    color: var(--dgn-text-muted);
    font-size: 0.9rem;
}

.website-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 0;
    margin-top: 2rem;
    text-align: center;
    color: var(--dgn-text-dim);
    font-size: 0.85rem;
}

/* Grid Layout for Workspace */
.workspace-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Glass Panels */
.glass-panel {
    background: rgba(16, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    backdrop-filter: blur(20px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    padding: 1.25rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.panel-title {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
}

.panel-badge {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 6px;
    color: var(--dgn-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
}

/* Sample Loader Bar */
.sample-loader-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.sample-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--dgn-text-muted);
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.clear-btn:hover {
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.3);
    color: var(--dgn-rose);
}

/* Code Textarea Container */
.code-textarea-container {
    position: relative;
    margin-bottom: 0.85rem;
}

.code-textarea {
    width: 100%;
    height: 320px;
    background: rgba(9, 13, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #f8fafc;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 1rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
}

.code-textarea:focus {
    border-color: var(--dgn-cyan);
    box-shadow: 0 0 0 2px var(--dgn-cyan-glow);
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--dgn-text-dim);
    margin-top: 0.35rem;
    padding: 0 0.2rem;
}

/* Status Pill Bar */
.status-pill-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(9, 13, 22, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
}

.pill-label {
    color: var(--dgn-text-dim);
}

.pill-value {
    color: var(--dgn-cyan);
    font-weight: 700;
}

/* Form Controls */
.control-group {
    margin-bottom: 1.15rem;
}

.control-label {
    display: block;
    color: var(--dgn-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    letter-spacing: 0.02em;
}

.glass-select, .glass-input {
    width: 100%;
    background: rgba(9, 13, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #f8fafc;
    padding: 0.7rem 0.9rem;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.glass-select:focus, .glass-input:focus {
    border-color: var(--dgn-cyan);
    box-shadow: 0 0 0 2px var(--dgn-cyan-glow);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.checkbox-item {
    font-size: 0.82rem;
    color: var(--dgn-text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.checkbox-item input {
    accent-color: var(--dgn-cyan);
}

.toggles-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--dgn-text-main);
    cursor: pointer;
}

.toggle-item input {
    accent-color: var(--dgn-cyan);
}

/* Buttons */
.btn {
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #040914;
    box-shadow: 0 4px 20px var(--dgn-cyan-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 26px rgba(0, 242, 254, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

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

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: rgba(20, 28, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    backdrop-filter: blur(12px);
}

.metric-title {
    color: var(--dgn-text-dim);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    display: block;
}

.metric-value {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 0.25rem;
    display: block;
}

.text-cyan { color: var(--dgn-cyan); }
.text-purple { color: var(--dgn-purple); }
.text-rose { color: var(--dgn-rose); }
.text-emerald { color: var(--dgn-emerald); }

/* Tabs Header */
.tabs-header {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--dgn-text-muted);
    padding: 0.55rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: rgba(0, 242, 254, 0.4);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 242, 254, 0.15);
}

.tab-pane {
    display: none;
    line-height: 1.7;
}

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

/* Chat Section */
.chat-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prompt-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip-btn {
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 999px;
    color: var(--dgn-cyan);
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip-btn:hover {
    background: rgba(0, 242, 254, 0.18);
}

.chat-messages {
    min-height: 220px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-right: 0.5rem;
}

.chat-bubble {
    padding: 0.85rem 1.15rem;
    border-radius: 12px;
    max-width: 80%;
    font-size: 0.9rem;
}

.chat-bubble.user {
    align-self: flex-end;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #ffffff;
}

.chat-bubble.assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--dgn-text-main);
}

.chat-input-bar {
    display: flex;
    gap: 0.5rem;
}

/* Modals & Utility Classes */
.hidden { display: none !important; }
.mt-4 { margin-top: 1rem; }
.p-4 { padding: 1rem; }

.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.glass-modal {
    background: rgba(16, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 380px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--dgn-text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}
