@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
    --bg-main: #0a0a0c; --bg-surface: #15151a; --bg-surface-light: #22222a;
    --text-main: #ffffff; --text-muted: #8a8a93;
    --accent-green: #00e59b; --accent-yellow: #facc15;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-radius-lg: 16px; --border-radius-md: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-main); color: var(--text-main);
    font-family: 'Inter', sans-serif; overflow-x: hidden;
    display: flex; flex-direction: column; height: 100vh;
}

header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background-color: var(--bg-main); z-index: 100; }
.icon-btn { background: var(--bg-surface); border: 1px solid var(--border-color); color: var(--text-main); width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.1rem; cursor: pointer; transition: background 0.2s; }
.header-actions { display: flex; gap: 0.8rem; align-items: center; }
.header-pill { background: rgba(250, 204, 21, 0.1); color: var(--accent-yellow); border: 1px solid rgba(250, 204, 21, 0.3); padding: 0.5rem 1rem; border-radius: 20px; font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; cursor: pointer; transition: all 0.2s; }

.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.sidebar-overlay.active { opacity: 1; pointer-events: all; }
.sidebar { position: fixed; top: 0; left: -300px; width: 280px; height: 100%; background-color: #111115; z-index: 1000; transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; border-right: 1px solid var(--border-color); }
.sidebar.active { left: 0; }
.sidebar-header { padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.brand-logo { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.5px; }
.sidebar-nav { padding: 1rem; flex-grow: 1; }
.nav-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; color: var(--text-muted); text-decoration: none; font-size: 1.05rem; font-weight: 500; border-radius: var(--border-radius-md); transition: all 0.2s; }
.nav-item:hover, .nav-item.active { background: var(--bg-surface-light); color: var(--text-main); }
.nav-item.highlight i { color: var(--accent-green); }
.recent-section { padding: 1rem 1.5rem; }
.recent-title { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 1rem; }
.recent-task { color: #d1d5db; padding: 0.5rem 0; font-size: 0.95rem; cursor: pointer; transition: color 0.2s;}
.recent-task:hover { color: var(--text-main); }

main { flex-grow: 1; padding: 1rem; display: flex; flex-direction: column; overflow-y: auto; }
.greeting { font-family: 'Space Mono', monospace; color: var(--accent-green); text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; text-align: center; margin-top: 2rem; margin-bottom: 1rem; text-shadow: 0 0 10px rgba(0, 229, 155, 0.3); }
h1 { text-align: center; font-size: 2rem; font-weight: 600; margin-bottom: 0.5rem; }
.subtitle { text-align: center; color: var(--text-muted); font-size: 1rem; margin-bottom: 2.5rem; }

.app-types { display: flex; gap: 0.8rem; overflow-x: auto; padding-bottom: 1rem; margin-bottom: 1rem; -ms-overflow-style: none; scrollbar-width: none; }
.app-types::-webkit-scrollbar { display: none; }
.type-chip { background: var(--bg-surface); border: 1px solid var(--border-color); padding: 0.8rem 1.2rem; border-radius: var(--border-radius-md); white-space: nowrap; display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; cursor: pointer; transition: all 0.2s; }
.type-chip:hover { background: var(--bg-surface-light); border-color: rgba(255, 255, 255, 0.2); }

.prompt-container { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--border-radius-lg); padding: 1rem; display: flex; flex-direction: column; margin-bottom: 1rem; flex-shrink: 0; }
.prompt-input { background: transparent; border: none; color: var(--text-main); font-family: 'Inter', sans-serif; font-size: 1rem; resize: none; height: 50px; min-height: 50px; max-height: 200px; outline: none; overflow-y: hidden; }
.prompt-input::placeholder { color: #555560; }
.prompt-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.action-icons { display: flex; gap: 0.5rem; }
.action-btn { background: rgba(255, 255, 255, 0.05); border: none; color: var(--text-muted); width: 35px; height: 35px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.submit-btn { background: var(--bg-surface-light); color: var(--text-muted); border: none; width: 35px; height: 35px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: not-allowed; transition: all 0.3s ease; }
.submit-btn.active { background: var(--text-main); color: var(--bg-main); cursor: pointer; box-shadow: 0 0 15px rgba(255, 255, 255, 0.2); transform: scale(1.05); }

#output-wrapper { display: none; flex-direction: column; flex-grow: 1; margin-bottom: 2rem; }
.output-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding: 0 0.5rem; flex-wrap: wrap; gap: 1rem; }
.tabs { display: flex; gap: 1rem; background: var(--bg-surface); padding: 0.3rem; border-radius: var(--border-radius-md); border: 1px solid var(--border-color); }
.tab-btn { background: transparent; border: none; color: var(--text-muted); padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.tab-btn.active { background: var(--bg-surface-light); color: var(--text-main); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.action-buttons { display: flex; gap: 0.5rem; }
#downloadBtn { color: var(--accent-green); border-color: rgba(0, 229, 155, 0.3); background: rgba(0, 229, 155, 0.1); }
#output-container { background: #000; border: 1px solid var(--border-color); border-radius: var(--border-radius-md); padding: 1.5rem; overflow-x: auto; font-family: 'Space Mono', monospace; font-size: 0.9rem; flex-grow: 1; }
#preview-frame { display: none; width: 100%; height: 70vh; border: 1px solid var(--border-color); border-radius: var(--border-radius-md); background: #fff; }

/* Toast Notification Styles */
#toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast { background: var(--bg-surface-light); color: var(--text-main); padding: 12px 20px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 4px 15px rgba(0,0,0,0.5); font-size: 0.9rem; display: flex; align-items: center; gap: 10px; transition: opacity 0.3s; }
.toast i { color: var(--accent-yellow); }
