@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Tajawal:wght@200;300;400;500;700;800;900&family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

@font-face {
    font-family: 'UthmaniHafs';
    src: url('Uthmani Hafs @Am9li9.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ElgharibA001';
    src: url('Elgharib-A001.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'A426';
    src: url('Elgharib-A426.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-color: #4a3721;
    --secondary-color: #c9a66b;
    --accent-color: #d4af37;
    --bg-color: #fdfaf5;
    --text-color: #2c241a;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
}

[data-theme="dark"] {
    --primary-color: #e5c158;
    --secondary-color: #c9a66b;
    --accent-color: #d4af37;
    --bg-color: #1a1510;
    --text-color: #fdfaf5;
    --white: #251e16;
    --glass-bg: rgba(37, 30, 22, 0.9);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    --card-bg: #251e16;
}

[data-theme="dark"] header {
    background: #120e0a;
    color: var(--accent-color);
}

[data-theme="dark"] header h1 {
    color: var(--accent-color);
}

[data-theme="dark"] header p {
    color: var(--text-color);
    opacity: 0.8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    direction: rtl;
}

h1,
h2,
h3 {
    font-family: 'Cairo', sans-serif;
}

.quran-font {
    font-family: 'UthmaniHafs', 'Amiri', serif;
    font-size: 2.2rem;
    line-height: 1.6;
    color: var(--primary-color);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid var(--accent-color);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/islamic-art.png');
    opacity: 0.1;
    pointer-events: none;
}

header h1 {
    font-size: 4.5rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
    font-weight: 900;
    line-height: 1.1;
}

header p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.4;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #f9f4ec 100%);
}

.hero-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 166, 107, 0.2);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.badge {
    background: var(--secondary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
}

/* Content Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 10px auto 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-right: 4px solid var(--secondary-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* License Section */
.license-box {
    background: #2c241a;
    color: #fdfaf5;
    padding: 40px;
    border-radius: 20px;
    position: relative;
}

.license-box ul {
    list-style: none;
    margin-top: 20px;
}

.license-box li {
    margin-bottom: 15px;
    padding-right: 30px;
    position: relative;
}

.license-box li::before {
    content: '✦';
    position: absolute;
    right: 0;
    color: var(--accent-color);
}

/* Links Section */
.links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.link-btn {
    background: var(--white);
    color: var(--primary-color);
    padding: 12px 25px;
    border: 1px solid var(--secondary-color);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.link-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: var(--primary-color) !important;
    padding: 16px 40px;
    font-size: 1.25rem;
    font-weight: 800;
    border: none;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    margin-top: 30px;
    display: inline-flex;
    justify-content: center;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.4);
}

/* Footer */
footer {
    background: #1a1510;
    color: #888;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 10px;
}

.visitor-counter {
    margin-top: 15px;
    padding: 6px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.count-label {
    color: rgba(255, 255, 255, 0.8);
}

.count-value {
    color: var(--accent-color);
    font-weight: bold;
    font-family: 'Tajawal', sans-serif;
}

footer .highlight {
    color: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeIn 1s ease forwards;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.6rem;
    }

    .hero-card {
        padding: 15px;
    }

    .nav-link {
        font-size: 1rem;
    }

    .quran-font {
        font-size: 1.2rem;
    }

    .nav-wrapper {
        bottom: 20px;
        padding: 5px 12px;
    }

    .menu-text {
        display: none;
    }
}

/* Specific Reductions for Contact and Links */
#contact .section-title h2,
#links .section-title h2 {
    font-size: 1.4rem;
}

#contact .contact-form,
#links .links-container {
    transform: scale(0.9);
    transform-origin: top;
}

.share-btn {
    padding: 8px 18px;
    font-size: 0.8rem;
}

.link-btn {
    padding: 6px 15px;
    font-size: 0.85rem;
}

.verse-a426 {
    font-family: 'A426', serif;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin: 25px 0;
    line-height: 1.4;
}

/* Preview Banner */
.preview-banner {
    background: var(--white);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 20px 15px;
    margin-top: -40px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.preview-banner::before {
    content: 'معاينة حية';
    position: absolute;
    top: 8px;
    right: -25px;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 3px 35px;
    transform: rotate(45deg);
    font-size: 0.65rem;
    font-weight: bold;
}

.fatiha-text {
    font-family: 'ElgharibA001', serif;
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--primary-color);
    word-spacing: -2px;
    letter-spacing: -1px;
    direction: rtl;
    max-width: 90%;
    margin: 0 auto;
}

.preview-label {
    display: block;
    font-size: 0.8rem;
    color: #ae9775;
    margin-bottom: 10px;
    font-weight: 600;
}

/* New Styles for Soon Badges and Disabled Buttons */
.soon-badge {
    background: rgba(0, 0, 0, 0.05);
    color: #888;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    font-weight: normal;
    border: 1px dashed #ccc;
}

.disabled-btn {
    opacity: 0.7;
    cursor: not-allowed;
    background: #f0f0f0;
    border-color: #ddd;
    color: #999;
}

.disabled-btn:hover {
    background: #f0f0f0;
    color: #999;
    border-color: #ddd;
    transform: none;
}

/* FAQ Styles */
.faq-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.faq-item {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    border-right: 4px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.faq-item h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.faq-item p {
    font-size: 0.95rem;
    color: #666;
}

/* Share Buttons Box */
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.telegram {
    background: #0088cc;
}

.share-btn.facebook {
    background: #1877F2;
}

/* Contact Form Styles */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.form-group {
    margin-bottom: 20px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Fixed Theme Toggle */
.nav-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    z-index: 2000;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
}

.nav-wrapper:hover {
    transform: scale(1.1);
    background: var(--white);
    border-color: var(--accent-color);
}

.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    color: var(--primary-color);
    font-size: 1.6rem;
}

.menu-icon {
    font-size: 1.5rem;
    margin-left: 8px;
}

.menu-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.theme-toggle:hover,
.menu-toggle:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

/* Nav Overlay Hidden (Removed Menu) */
.nav-overlay {
    display: none;
}

/* Changelog Styles */
.changelog-list {
    list-style: none;
    text-align: right;
}

.changelog-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.changelog-list li:last-child {
    border-bottom: none;
}

.changelog-list li strong {
    color: var(--accent-color);
    margin-left: 10px;
}

/* Rating Section Styles */
.rating-container {
    text-align: center;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-top: 30px;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    direction: ltr;
}

.star {
    font-size: 2.5rem;
    cursor: pointer;
    color: #ddd;
    transition: color 0.3s ease, transform 0.2s;
}

.star.selected {
    color: var(--accent-color);
}

.star.active {
    color: var(--accent-color);
}

.star:hover {
    transform: scale(1.2);
    color: var(--accent-color);
}

.rating-stats {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #888;
}

.stat-bar-bg {
    background: rgba(0, 0, 0, 0.05);
    height: 10px;
    border-radius: 50px;
    margin: 10px auto;
    max-width: 300px;
    overflow: hidden;
}

.stat-bar-fill {
    background: var(--accent-color);
    height: 100%;
    width: 85%;
    /* Just for visualization if not dynamic */
    transition: width 1s ease;
}