﻿:root {
    --primary-color: #1a472a;
    --secondary-color: #2d5e3a;
    --accent-color: #c19a5b;
    --light-bg: #f8f5f0;
    --card-bg: #ffffff;
    --text-primary: #2c3e2d;
    --text-secondary: #5d6e5f;
    --border-color: #e0ddd6;
    --shadow: 0 2px 12px rgba(26, 71, 42, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: radial-gradient(circle at 10% 20%, rgba(26, 71, 42, 0.03) 0%, transparent 20%), radial-gradient(circle at 90% 80%, rgba(193, 154, 91, 0.03) 0%, transparent 20%);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* هدر با تم قرآنی */
.header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 25px;
}

    .header::after {
        content: "";
        position: absolute;
        bottom: 0;
        right: 50%;
        transform: translateX(50%);
        width: 120px;
        height: 3px;
        background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
        border-radius: 2px;
    }

    .header h1 {
        font-size: 2.2rem;
        font-weight: 600;
        color: var(--primary-color);
        margin-bottom: 10px;
        letter-spacing: -0.5px;
    }

    .header .subtitle {
        font-size: 1.1rem;
        color: var(--text-secondary);
        font-weight: 400;
    }

/* بخش انتخاب سوره */
.surah-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

    .surah-section::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 6px;
        height: 100%;
        background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    }

.section-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .section-label::before {
        content: "🕌";
        font-size: 1.4rem;
    }

.surah-select-wrapper {
    max-width: 350px;
}

.surah-select {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a472a' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 18px center;
    padding-left: 45px;
}

    .surah-select:focus {
        outline: none;
        border-color: var(--accent-color);
        box-shadow: 0 0 0 3px rgba(193, 154, 91, 0.15);
    }

    .surah-select option {
        padding: 10px;
        background: var(--card-bg);
    }

/* کارت‌های دسته‌بندی */
.category-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

    .category-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 20px rgba(26, 71, 42, 0.12);
        border-color: var(--accent-color);
    }

.category-header {
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: linear-gradient(90deg, rgba(26, 71, 42, 0.03), rgba(193, 154, 91, 0.03));
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

    .category-header.active {
        background: linear-gradient(90deg, rgba(26, 71, 42, 0.08), rgba(193, 154, 91, 0.08));
        border-bottom-color: var(--accent-color);
    }

.category-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(26, 71, 42, 0.2);
}

.toggle-icon {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: bold;
}

    .toggle-icon.rotated {
        transform: rotate(180deg);
        color: var(--accent-color);
    }

/* محتوای دسته‌بندی */
.category-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

    .category-content.expanded {
        padding: 28px;
        max-height: 1000px;
    }

/* آیتم‌های تنظیمات */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

    .setting-item:hover {
        background-color: rgba(248, 245, 240, 0.5);
        padding-right: 10px;
        border-radius: 8px;
    }

    .setting-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .setting-item:first-child {
        padding-top: 0;
    }

.setting-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.setting-name {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 500;
}

.setting-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-color), #d4b074);
    color: white;
    font-weight: 600;
}

.setting-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 120px;
    justify-content: center;
}

.btn-article {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(26, 71, 42, 0.2);
}

    .btn-article:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(26, 71, 42, 0.3);
        background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    }

.btn-software {
    background: linear-gradient(135deg, #8b7355, var(--accent-color));
    color: white;
    box-shadow: 0 4px 12px rgba(193, 154, 91, 0.2);
}

    .btn-software:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(193, 154, 91, 0.3);
        background: linear-gradient(135deg, var(--accent-color), #8b7355);
    }

/* دکمه تنظیمات بیشتر */
.more-settings {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 2px dashed var(--border-color);
}

.btn-more {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
}

    .btn-more:hover {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(26, 71, 42, 0.2);
    }

/* فوتر */
.footer {
    margin-top: 60px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
}

    .footer::before {
        content: "﴿";
        position: absolute;
        top: -15px;
        right: 50%;
        transform: translateX(50%);
        font-size: 2rem;
        color: var(--accent-color);
        background: var(--light-bg);
        padding: 0 20px;
    }

    .footer p {
        margin-bottom: 5px;
    }

/* طراحی واکنش‌گرا */
@@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .category-header {
        padding: 18px 22px;
    }

    .category-content.expanded {
        padding: 22px;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px 0;
    }

    .setting-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn {
        min-width: 110px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .surah-item {
        padding: 14px 16px;
    }

    .surah-item-info {
        flex-direction: column;
        gap: 4px;
    }
}

.surah-selector-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .surah-selector-btn:hover {
        border-color: var(--accent-color);
        background: #f9f7f3;
    }

.btn-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.surah-indicator {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.surah-text {
    font-size: 1.1rem;
    font-weight: 500;
}

.surah-name {
    color: var(--primary-color);
}

.btn-arrow {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.surah-selector-btn:hover .btn-arrow {
    transform: translateX(-5px);
}

/* دیالوگ */
.dialog-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

    .dialog-overlay.active {
        display: flex;
    }

.dialog {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

/* هدر دیالوگ */
.dialog-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dialog-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .close-btn:hover {
        background: #f5f5f5;
        color: var(--primary-color);
    }

/* جستجو */
.search-container {
    padding: 0 24px 20px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: #f9f9f9;
    transition: all 0.3s ease;
}

    .search-input:focus {
        outline: none;
        border-color: var(--accent-color);
        background: white;
        box-shadow: 0 0 0 3px rgba(193, 154, 91, 0.1);
    }

.search-icon {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* لیست سوره‌ها */
.surahs-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 24px;
}

.surah-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

    .surah-item:last-child {
        border-bottom: none;
    }

    .surah-item:hover {
        background: #f9f9f9;
        padding-right: 20px;
    }

    .surah-item.selected {
        background: rgba(26, 71, 42, 0.05);
        border-right: 3px solid var(--primary-color);
    }

.surah-item-number {
    background: var(--primary-color);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.surah-item.selected .surah-item-number {
    background: var(--accent-color);
}

.surah-item-content {
    flex: 1;
}

.surah-item-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.surah-item-translation {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.surah-item-info {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* فوتر دیالوگ */
.dialog-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selection-info {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.selected-surah-name {
    color: var(--primary-color);
    font-weight: 500;
}

.confirm-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .confirm-btn:hover {
        background: var(--secondary-color);
        transform: translateY(-1px);
    }

/* انیمیشن‌ها */
@@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card {
    animation: fadeInUp 0.4s ease forwards;
}

    .category-card:nth-child(2) {
        animation-delay: 0.1s;
    }

    .category-card:nth-child(3) {
        animation-delay: 0.2s;
    }

    .category-card:nth-child(4) {
        animation-delay: 0.3s;
    }

/* استایل برای هایلایت */
.highlight {
    background: linear-gradient(120deg, rgba(193, 154, 91, 0.15) 0%, rgba(193, 154, 91, 0) 100%);
    padding: 3px 0;
}

/* انیمیشن‌ها */
@@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* اسکرول‌بار سفارشی */
.surahs-list::-webkit-scrollbar {
    width: 6px;
}

.surahs-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.surahs-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

    .surahs-list::-webkit-scrollbar-thumb:hover {
        background: #ccc;
    }