:root {
    --primary: #064e3b;
    --accent: #fbbf24;
    --bg: #f8fafc;
    --glass: rgba(255, 255, 255, 0.8);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --playing-bg: rgba(6, 78, 59, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    background-image: radial-gradient(circle at top right, rgba(6, 78, 59, 0.03), transparent),
                      radial-gradient(circle at bottom left, rgba(251, 191, 36, 0.03), transparent);
    color: var(--text-main);
    line-height: 1.6;
}

.app-container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; }

.logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 700; color: var(--primary); font-family: 'Outfit'; }

.search-bar { position: relative; width: 350px; }
.search-bar i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 18px; }
.search-bar input { width: 100%; padding: 0.8rem 1rem 0.8rem 3rem; border-radius: 15px; border: 1px solid #e2e8f0; background: white; outline: none; transition: 0.3s; }
.search-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(6, 78, 59, 0.1); }

.hero { text-align: center; margin-bottom: 4rem; }
.hero h1 { font-size: 3.5rem; font-family: 'Outfit'; background: linear-gradient(to right, #064e3b, #059669); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.surah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

.surah-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.surah-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }

.surah-num { width: 40px; height: 40px; background: #ecfdf5; color: var(--primary); display: flex; align-items: center; justify-content: center; border-radius: 10px; font-weight: 700; }

.surah-arabic { margin-left: auto; font-family: 'Amiri'; font-size: 1.5rem; color: var(--primary); }

/* Modal & Reader */
.modal { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px); z-index: 1000; overflow-y: auto; padding: 2rem; }
.modal-content { background: white; max-width: 900px; margin: 0 auto; border-radius: 30px; padding: 3rem; position: relative; }

.ayah-item {
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    transition: 0.4s;
    border: 1px solid transparent;
}

.ayah-item.is-playing {
    background: var(--playing-bg);
    border-color: var(--primary);
    transform: scale(1.02);
}

.ayah-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; direction: ltr; }

.play-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.play-btn:hover { background: #065f46; transform: scale(1.1); }
.play-btn.playing { background: var(--accent); animation: pulse 1.5s infinite; }

.ayah-text { font-family: 'Amiri'; font-size: 2.4rem; text-align: right; direction: rtl; color: #1e293b; line-height: 1.8; display: block; }
.ayah-trans { font-size: 1.1rem; color: var(--text-muted); margin-top: 1.5rem; display: block; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(251, 191, 36, 0); }
    100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.loader { border: 4px solid #f3f3f3; border-top: 4px solid var(--primary); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 2rem auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }