:root {
    --primary: #137ae0;
    --accent: #f1c40f;
    --success: #27ae60;
    --danger: #e74c3c;
    --bg: #f4f7f6;
}

* { box-sizing: border-box; }

body {
    font-family: vazirmatn;
    background-color: var(--bg);
    margin: 0;
    direction: rtl;
    color: #333;
}

.app-header {
    background: var(--primary);
    color: white;
    padding: 10px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.app-main {
    padding: 15px;
    padding-bottom: 80px;
    max-width: 600px; /* محدودیت عرض برای لپ‌تاپ */
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* اصلاح نوار پیشرفت */
.progress-container {
    width: 100%;
    background: #e0e0e0;
    border-radius: 20px;
    height: 15px;
    margin: 15px 0;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    width: 0%;
    transition: width 0.6s ease;
}

/* استایل کلمات و دایره شدن */
.ayah-container {
    font-size: 1.6rem;
    line-height: 2.5;
    text-align: center;
    background: #fffcf0;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #f1c40f33;
    margin: 15px 0;
}

.word {
    display: inline-block;
    padding: 0 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s;
}

.word.hidden-circle {
    background: var(--accent) !important;
    color: var(--accent) !important;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    line-height: 35px;
    overflow: hidden;
    vertical-align: middle;
    margin: 0 5px;
}

/* دکمه‌ها */
.btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

.selectors select {
    width: 48%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
}

.audio-controls, .action-btns {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
        cursor: pointer;

}

.nav-btn, .action-btns button {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.play-btn {
    flex: 1.5;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
}

/* نوار ناوبری پایین */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: white;
    display: flex;
    height: 65px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.bottom-nav button {
    flex: 1;
    border: none;
    background: none;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.bottom-nav button.active {
    color: var(--primary);
    font-weight: bold;
    border-top: 3px solid var(--primary);
}

/* مودال */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.test-opts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 15px 0;
}

.test-option {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    text-align: right;
    cursor: pointer;
}

/* ظاهر لپ‌تاپ */
@media (min-width: 768px) {
    .app-main { border-left: 1px solid #ddd; border-right: 1px solid #ddd; min-height: 100vh; }
}
/* استایل کلمات آیه */
.word {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s;
    font-size: 1.4em; /* اندازه متن آیه */
    line-height: 2;
}

/* حالتی که کلمه تبدیل به دایره می‌شود */
.word.circle {
    background-color: #3498db; /* رنگ دایره */
    color: #3498db; /* همرنگ شدن متن با پس‌زمینه برای مخفی شدن */
    border-radius: 50%; /* تبدیل به دایره */
    transform: scale(0.8);
}

/* ظرف نگهدارنده آیات */
.ayah-container {
    text-align: center;
    padding: 20px;
    background: #fdfdfd;
    border-radius: 10px;
    min-height: 100px;
    direction: rtl;
}
