/* ============================================ */
/* ===== متغیرهای تم (روشن/تاریک) ===== */
/* ============================================ */
:root {
    --bg-body: #f1f5f9;
    --bg-container: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --border-color: #e2e8f0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --card-bg: #f8fafc;
    --card-border: #e2e8f0;
    --badge-bg: #eef2ff;
    --badge-text: #4f46e5;
    --nav-hover: #f1f5f9;
    --menu-bg: #ffffff;
    --menu-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --footer-bg: #f8fafc;
}

[data-theme="dark"] {
    --bg-body: #0b1120;
    --bg-container: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --code-bg: #0f172a;
    --code-text: #e2e8f0;
    --card-bg: #2d3748;
    --card-border: #4a5568;
    --badge-bg: #2d3748;
    --badge-text: #a5b4fc;
    --nav-hover: #2d3748;
    --menu-bg: #1e293b;
    --menu-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --footer-bg: #162032;
}

/* ============================================ */
/* ===== ریست و فونت پایه ===== */
/* ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.8;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================ */
/* ===== کانتینر اصلی ===== */
/* ============================================ */
.container {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
    background: var(--bg-container);
    border-radius: 28px;
    padding: 2rem 1.8rem;
    box-shadow: var(--shadow);
    flex: 1;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-color);
}

/* ============================================ */
/* ===== کلاس‌های کمکی ===== */
/* ============================================ */
.highlight {
    background: #fef9c3;
    padding: 0.1rem 0.3rem;
    border-radius: 6px;
    color: #1e293b;
}

[data-theme="dark"] .highlight {
    background: #4b4a2a;
    color: #f1f5f9;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }