:root {
    --primary-color: #2d6a4f;
    --primary-dark: #1b4332;
    --secondary-color: #d4af37;
    --secondary-dark: #b8942b;
    --dark-bg: #0a1c14;
    --light-bg: #f5f5f5;
    --text-light: #ffffff;
    --text-dark: #333333;
    --text-muted: #666666;
    --error-color: #dc3545;
    --success-color: #28a745;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--light-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--text-light);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: 'Cairo', cursive;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-wrapper {
    position: relative;
}

.search-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
}

.search-wrapper button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 1.5rem;
    background: var(--secondary-color);
    color: var(--dark-bg);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.search-wrapper button:hover {
    background: var(--secondary-dark);
}

/* Filters */
.filters {
    padding: 2rem 0;
    background: white;
    box-shadow: var(--box-shadow);
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: var(--light-bg);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Nasheeds Grid */
.nasheeds-grid {
    padding: 3rem 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.nasheed-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.nasheed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-cover {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.card-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.nasheed-card:hover .card-overlay {
    opacity: 1;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.play-btn i {
    color: white;
    font-size: 1.5rem;
}

.play-btn:hover {
    transform: scale(1.1);
}

.card-content {
    padding: 1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.card-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.card-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-en {
    background: #4a90e2;
    color: white;
}

.badge-ar {
    background: #2d6a4f;
    color: white;
}

.badge-sw {
    background: #f39c12;
    color: white;
}

.free-badge {
    background: var(--success-color);
    color: white;
}

.premium-badge {
    background: var(--secondary-color);
    color: var(--dark-bg);
}

.card-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Detail Page */
.nasheed-detail {
    padding: 3rem 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.detail-cover img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.detail-header h1 {
    font-size: 2rem;
    margin: 0;
}

.description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--dark-bg);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

/* Audio Player */
.audio-player-section {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

#audio-player {
    margin-bottom: 1rem;
}

audio {
    width: 100%;
}

.player-controls {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Lyrics */
.lyrics-container {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.lyrics-container h3 {
    margin-bottom: 1rem;
}

.lyrics-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
}

.lyrics-content.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.lyric-line {
    padding: 0.5rem;
    transition: var(--transition);
}

.lyric-line.active {
    background: var(--secondary-color);
    color: white;
    border-radius: var(--border-radius);
}

/* Related Nasheeds */
.related-nasheeds {
    margin-top: 3rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.related-card {
    text-align: center;
}

.related-card img {
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.related-card h4 {
    font-size: 0.9rem;
}

.related-card a {
    text-decoration: none;
    color: var(--text-dark);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    background: white;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.purchase-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.option {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    text-align: center;
}

.option h3 {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-bg);
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.25rem 1rem;
        font-size: 0.9rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
}