:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --arabic-font: 'Scheherazade New', serif;
    --text-font: 'Poppins', sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--text-font);
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    box-shadow: var(--box-shadow);
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, var(--primary-color), #1a2a3a);
    color: white;
    padding: 1rem;
    border-bottom: 4px solid var(--accent-color);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.datetime {
    text-align: left;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: var(--border-radius);
}

.app-title {
    font-size: 1.8rem;
    text-align: center;
    flex-grow: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.app-version {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Controls */
.app-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.control-group label {
    font-size: 0.9rem;
    opacity: 0.9;
}

select {
    padding: 0.5rem 0.8rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-family: var(--text-font);
    background-color: rgba(255, 255, 255, 0.9);
    min-width: 200px;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3);
}

/* Main Content */
.quran-content {
    flex: 1;
    padding: 1.5rem;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(52, 152, 219, 0.2);
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: #e74c3c;
    text-align: center;
    padding: 1.5rem;
    font-weight: bold;
    background: rgba(231, 76, 60, 0.1);
    border-radius: var(--border-radius);
    margin: 1rem 0;
    display: none;
}

/* Surah Info */
.surah-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(52, 152, 219, 0.05);
    border-radius: var(--border-radius);
}

.surah-name {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.surah-meta {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
}

/* Verses */
.verses-container {
    margin-bottom: 2rem;
}

.verse {
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    border-radius: var(--border-radius);
    background-color: white;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.verse.highlighted {
    background-color: #e3f2fd;
    border-left: 4px solid var(--secondary-color);
    transform: translateX(5px);
}

.verse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.verse-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: bold;
}

.arabic-text {
    font-family: var(--arabic-font);
    font-size: 1.8rem;
    line-height: 3.5rem;
    text-align: right;
    direction: rtl;
    margin: 1rem 0;
    color: #2c3e50;
    letter-spacing: 1px;
}

.translation-text {
    margin: 1rem 0;
    color: #444;
    line-height: 1.7;
    font-size: 0.95rem;
}

.audio-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.audio-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Audio Player */
.audio-player {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to right, var(--primary-color), #1a2a3a);
    color: white;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

#progress-bar {
    flex: 1;
    height: 6px;
    cursor: pointer;
    border-radius: 3px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
}

#progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

#volume-control {
    width: 100px;
    height: 6px;
    border-radius: 3px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
}

#volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--dark-color);
    color: white;
    font-size: 0.9rem;
}

.app-footer p {
    margin-bottom: 0.3rem;
}

.app-credit {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .app-title {
        font-size: 1.5rem;
        order: -1;
    }
    
    .app-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .control-group {
        width: 100%;
    }
    
    select {
        width: 100%;
    }
    
    .arabic-text {
        font-size: 1.6rem;
        line-height: 3rem;
    }
}

@media (max-width: 480px) {
    .arabic-text {
        font-size: 1.4rem;
        line-height: 2.8rem;
    }
    
    .verse {
        padding: 1rem;
    }
    
    .surah-name {
        font-size: 1.6rem;
    }
}