:root {
    --primary-color: #2c3e50;
    --accent-color: #27ae60;
    --text-color: #333;
    --bg-color: #f4f4f4;
    --card-bg: #fff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    margin: 0;
    font-size: 1.5rem;
}

main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.hidden {
    display: none;
}

#loading,
#error {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
}

#error {
    color: #c0392b;
}

/* Surah List Styles */
.surah-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.surah-card {
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.surah-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.surah-number {
    background-color: var(--accent-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

.surah-info {
    flex-grow: 1;
    padding: 0 1rem;
}

.surah-name-en {
    font-weight: bold;
    display: block;
}

.surah-name-ar {
    font-family: 'Traditional Arabic', serif;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Surah Detail Styles */
.surah-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
}

.back-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.back-btn:hover {
    background-color: #34495e;
}

.verses-container {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.verse {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.verse:last-child {
    border-bottom: none;
}

.verse-text {
    font-family: 'KFGQPC Uthmanic Script HAFS', 'Traditional Arabic', serif;
    font-size: 1.8rem;
    text-align: right;
    direction: rtl;
    line-height: 2.2;
    margin-bottom: 0.5rem;
    color: #000;
}

.verse-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.play-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.play-btn:hover {
    background-color: #219150;
}

.play-btn.playing {
    background-color: #e67e22;
}

.verse-number {
    font-size: 0.9rem;
    color: #7f8c8d;
}