/* ============================================================
   theme.css — سیستم طراحی مرکزی «جوجه پاییزی»
   همه‌ی صفحات باید این فایل را قبل از CSS اختصاصی خودشان لود کنند.
   ============================================================ */

:root {
    /* پالت رنگی */
    --color-bg-start:   #fef3e0;
    --color-bg-end:     #ffdfae;
    --color-card-bg:    #fffaf1;
    --color-primary:    #d97a3e; /* نارنجی سوخته - اصلی */
    --color-primary-dark: #c2652c;
    --color-secondary:  #e8b23d; /* خردلی */
    --color-tertiary:   #f0d98a; /* زرد کم‌رنگ */
    --color-brown:      #8a6244;
    --color-danger:     #d64545;
    --color-success:    #4caf50;
    --color-text-dark:  #4a2f1a;
    --color-text-muted: #a07850;
    --color-white:      #ffffff;

    /* گوشه‌ها و سایه‌ها */
    --radius-pill: 999px;
    --radius-card: 24px;
    --radius-sm:   14px;
    --shadow-soft: 0 6px 16px rgba(120, 72, 30, 0.12);
    --shadow-card: 0 4px 14px rgba(120, 72, 30, 0.08);

    --font-main: 'Vazirmatn', Tahoma, sans-serif;
}

* {
    box-sizing: border-box;
}

body.app-body {
    font-family: var(--font-main);
    background: linear-gradient(180deg, var(--color-bg-start) 0%, var(--color-bg-end) 100%);
    color: var(--color-text-dark);
    margin: 0;
    padding: 16px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ---------- برگ‌های تزئینی پس‌زمینه ---------- */
.leaf-decor {
    position: fixed;
    font-size: 1.6rem;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

/* ---------- هدر بازی: تنظیمات + نقطه‌های پیشرفت + شمارنده ---------- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--color-card-bg);
    border-radius: var(--radius-pill);
    padding: 10px 14px;
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 2;
    margin-bottom: 18px;
}

.app-header .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-end);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
}

.progress-dots {
    display: flex;
    gap: 6px;
    flex: 1;
    justify-content: center;
    overflow-x: auto;
    padding: 0 4px;
}

.progress-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-tertiary);
    flex-shrink: 0;
}

.progress-dots .dot.active {
    background: var(--color-primary);
    width: 14px;
    height: 14px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--color-bg-end);
    border-radius: var(--radius-pill);
    padding: 6px 12px;
    font-weight: bold;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* ---------- کارت محتوا (سوال، پیام و ...) ---------- */
.app-card {
    background: var(--color-card-bg);
    border-radius: var(--radius-card);
    padding: 24px 20px;
    box-shadow: var(--shadow-card);
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 18px;
}

.app-card h2, .app-card h3 {
    font-size: 1.15rem;
    line-height: 1.9;
    margin: 0;
}

.card-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--color-tertiary);
    font-size: 0.9rem;
}

.card-divider::before,
.card-divider::after {
    content: '';
    height: 1px;
    width: 40px;
    background: var(--color-tertiary);
}

/* ---------- دکمه‌های گزینه‌ی قرصی‌شکل با مدالیون آیکون ---------- */
.option-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: none;
    border-radius: var(--radius-pill);
    padding: 8px 8px 8px 20px;
    margin-bottom: 12px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-white);
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    transition: transform 0.12s ease;
    position: relative;
    z-index: 2;
}

.option-pill:active {
    transform: scale(0.97);
}

.option-pill .option-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.option-pill.selected {
    outline: 3px solid var(--color-text-dark);
    outline-offset: 2px;
}

/* رنگ‌های چرخشی گزینه‌ها (مطابق رفرنس) */
.option-pill.opt-1 { background: var(--color-primary); }
.option-pill.opt-2 { background: var(--color-secondary); }
.option-pill.opt-3 { background: var(--color-tertiary); color: var(--color-text-dark); }
.option-pill.opt-4 { background: var(--color-brown); }
.option-pill.opt-3 .option-icon { background: rgba(0,0,0,0.08); }

/* ---------- دکمه‌ی اصلی CTA ---------- */
.cta-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 15px;
    font-size: 1.05rem;
    font-weight: bold;
    font-family: var(--font-main);
    color: var(--color-white);
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.cta-button:disabled {
    background: var(--color-tertiary);
    cursor: not-allowed;
}

/* ---------- مسکات جوجه ---------- */
.mascot {
    width: 120px;
    margin: 0 auto;
    display: block;
}

@media (max-width: 380px) {
    .app-card h2, .app-card h3 { font-size: 1rem; }
    .option-pill { font-size: 0.9rem; }
}
