:root {
    --bg-dark: #070a13;
    --sidebar-bg: #0d1424;
    --panel-bg: #121c32;
    --card-bg: #18243e;
    --accent: #00d2ff;
    --accent-dark: #0062ff;
    --accent-glow: rgba(0, 210, 255, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: #1e2d4a;
    --danger: #ff4757;
    --success: #2ed573;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Vazirmatn', -apple-system, sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-primary); height: 100vh; overflow: hidden; }

/* صفحه اول (Landing Page) */
#landing-view {
    position: fixed; inset: 0;
    background: radial-gradient(circle at 50% 10%, #152752 0%, var(--bg-dark) 85%);
    display: flex; flex-direction: column; z-index: 50; overflow-y: auto; scroll-behavior: smooth;
}

.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 8%; border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(7, 10, 19, 0.85); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 60;
}
.nav-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.nav-brand img { width: 42px; height: 42px; }
.brand-logotype { font-size: 24px; font-weight: 900; color: #fff; letter-spacing: 1px; }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.btn-nav {
    background: #111c33; border: 1px solid var(--border); color: #fff;
    padding: 9px 18px; border-radius: 20px; font-size: 13px; font-weight: bold; cursor: pointer; transition: 0.2s;
}
.btn-nav:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #fff; border: none; padding: 11px 26px; border-radius: 24px; font-size: 14px;
    font-weight: bold; cursor: pointer; box-shadow: 0 0 20px var(--accent-glow); transition: 0.3s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 30px var(--accent); }

/* هیرو سکشن */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 60px 10% 40px; }
.hero-logo { width: 140px; height: 140px; margin-bottom: 25px; animation: floatAnim 4s ease-in-out infinite; }
@keyframes floatAnim { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero-title { font-size: 50px; font-weight: 900; margin-bottom: 18px; line-height: 1.25; }
.hero-title span { color: var(--accent); text-shadow: 0 0 30px var(--accent-glow); }
.hero-desc { font-size: 18px; color: var(--text-secondary); max-width: 720px; line-height: 1.8; margin-bottom: 35px; }

/* بخش بنچمارک مقایسه‌ای پرچمداران */
.benchmark-section { width: 100%; max-width: 1050px; margin: 40px auto 80px; padding: 0 20px; }
.section-head { text-align: center; margin-bottom: 35px; }
.section-head h2 { font-size: 28px; font-weight: 900; color: #fff; margin-bottom: 8px; }
.section-head p { font-size: 14px; color: var(--text-secondary); }

.benchmark-card {
    background: rgba(18, 28, 50, 0.7); border: 1px solid var(--border);
    border-radius: 20px; padding: 25px; backdrop-filter: blur(12px); box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.bench-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 14px; }
.bench-table th { padding: 16px 12px; color: var(--text-secondary); border-bottom: 1px solid var(--border); font-weight: bold; }
.bench-table td { padding: 18px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.bench-table tr.highlight { background: rgba(0, 210, 255, 0.08); font-weight: bold; }
.bench-table tr.highlight td { color: #fff; border-color: rgba(0, 210, 255, 0.2); }
.score-badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 13px; font-weight: 900; }
.score-win { background: rgba(0, 210, 255, 0.2); color: var(--accent); border: 1px solid var(--accent); }

/* مودال‌ها (لاگین، تنظیمات، پیش‌نمایش کد) */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none;
    justify-content: center; align-items: center; z-index: 100; backdrop-filter: blur(10px);
}
.modal-card {
    background: var(--sidebar-bg); border: 1px solid var(--border);
    box-shadow: 0 0 40px rgba(0,0,0,0.8); width: 100%; max-width: 440px;
    padding: 30px; border-radius: 22px; position: relative;
}
.modal-card.wide { max-width: 800px; width: 90%; height: 80vh; display: flex; flex-direction: column; }
.modal-close { position: absolute; top: 16px; left: 18px; background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; font-weight: bold; }
.form-control {
    width: 100%; background: #080c14; border: 1px solid var(--border);
    padding: 12px 16px; border-radius: 12px; color: #fff; outline: none; font-size: 14px;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }

/* محیط چت اصلی (ChatGPT Pro Style) */
#app-view { display: none; height: 100vh; width: 100%; }

.sidebar { width: 280px; background: var(--sidebar-bg); border-inline-end: 1px solid var(--border); display: flex; flex-direction: column; padding: 20px 16px; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.btn-sidebar {
    background: var(--panel-bg); color: #fff; border: 1px solid var(--border);
    padding: 11px 14px; border-radius: 12px; cursor: pointer; font-size: 13px; font-weight: bold; width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; transition: 0.2s;
}
.btn-sidebar:hover { border-color: var(--accent); background: #1c2b4c; }

.chat-zone { flex: 1; display: flex; flex-direction: column; background: var(--bg-dark); }
.chat-scroll { flex: 1; overflow-y: auto; padding: 30px 18%; display: flex; flex-direction: column; gap: 22px; }

.msg-row { display: flex; gap: 14px; font-size: 15px; line-height: 1.8; width: 100%; }
.msg-row.user { flex-direction: row-reverse; }
.msg-bubble { padding: 14px 22px; border-radius: 18px; max-width: 84%; word-break: break-word; }
.msg-row.user .msg-bubble { background: #1e2c48; border: 1px solid #31446b; border-top-left-radius: 4px; }
.msg-row.bot .msg-bubble { background: var(--panel-bg); border: 1px solid var(--border); border-top-right-radius: 4px; width: 100%; }

.msg-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.msg-avatar img { width: 100%; height: 100%; }

/* جعبه کدهای فوق‌پیشرفته */
.code-container {
    background: #060910; border: 1px solid var(--border); border-radius: 12px;
    margin: 14px 0; overflow: hidden; direction: ltr; text-align: left;
}
.code-header {
    background: #0d1526; padding: 8px 14px; display: flex; justify-content: space-between;
    align-items: center; font-size: 12px; color: var(--text-secondary); border-bottom: 1px solid var(--border);
}
.code-actions { display: flex; gap: 8px; }
.btn-code {
    background: #18243e; color: #fff; border: 1px solid var(--border);
    padding: 4px 10px; border-radius: 6px; font-size: 11px; cursor: pointer; transition: 0.2s;
}
.btn-code:hover { border-color: var(--accent); color: var(--accent); }
.code-container pre { padding: 14px; overflow-x: auto; font-family: 'Consolas', monospace; font-size: 13px; color: #00d2ff; }

/* کارت تصویر هوش مصنوعی */
.ai-image-card { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); margin: 12px 0; max-width: 480px; }
.ai-image-card img { width: 100%; display: block; border-radius: 12px; }

/* پیش‌نمایش در پنجره Iframe */
#preview-frame { width: 100%; flex: 1; border: none; background: #fff; border-radius: 12px; margin-top: 15px; }

/* مکان‌نما و اینپوت */
.cursor-stream { display: inline-block; width: 8px; height: 16px; background-color: var(--accent); margin-inline-start: 4px; vertical-align: middle; animation: blink 0.8s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.input-container { padding: 18px 18%; background: var(--bg-dark); }
.input-glass-bar {
    background: var(--sidebar-bg); border: 1px solid var(--border);
    border-radius: 30px; display: flex; align-items: center; padding: 6px 18px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.4);
}
.input-glass-bar textarea { flex: 1; background: transparent; border: none; outline: none; color: #fff; font-size: 15px; resize: none; max-height: 160px; height: 26px; padding: 4px 10px; }
.btn-send-round { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); border: none; width: 38px; height: 38px; border-radius: 50%; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }

@media (max-width: 850px) {
    .sidebar { display: none; }
    .chat-scroll, .input-container { padding: 15px 5%; }
    .hero-title { font-size: 34px; }
}