:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --font-primary: 'Amiri', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    background-color: #f5f5f5;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 20px 0;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.search-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

#search-input {
    padding: 10px 15px;
    width: 70%;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
    font-family: var(--font-primary);
}

#search-btn {
    padding: 10px 15px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
}

.tabs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: var(--font-primary);
    color: var(--text-color);
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--secondary-color);
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
}

.tab-content {
    display: none;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
}

.tab-content.active {
    display: block;
}

.surahs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.surah-card {
    background-color: var(--light-color);
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.surah-card:hover {
    background-color: var(--secondary-color);
    color: white;
}

.ayah-display {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.ayah-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.ayah-content {
    font-size: 1.8rem;
    text-align: center;
    line-height: 2.5;
    margin: 20px 0;
    color: var(--dark-color);
    transition: opacity 0.3s ease;
}

.ayah-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.ayah-controls button {
    padding: 8px 15px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

.ayah-controls button:hover {
    background-color: var(--primary-color);
}

.ayah-controls button.active {
    background-color: var(--accent-color);
}

.progress-container {
    width: 100%;
    height: 5px;
    background-color: #ddd;
    margin-top: 20px;
    border-radius: 5px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--secondary-color);
    border-radius: 5px;
    transition: width 0.1s linear;
}

.translation-container {
    padding: 20px;
}

#translation-lang {
    padding: 8px 15px;
    margin-bottom: 20px;
    font-family: var(--font-primary);
    border-radius: 5px;
    border: 1px solid #ddd;
}

#translation-text {
    font-size: 1.2rem;
    line-height: 1.8;
}

.anashid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.anashid-card {
    background-color: var(--light-color);
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.anashid-card:hover {
    background-color: var(--secondary-color);
    color: white;
}

.azkar-container {
    text-align: center;
}

.azkar-display {
    font-size: 1.5rem;
    line-height: 2;
    margin: 20px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.azkar-timer {
    margin-top: 20px;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .surahs-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .ayah-content {
        font-size: 1.5rem;
    }
    
    .ayah-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .ayah-controls button {
        width: 100%;
    }
}