/* ===========================
   CSS Variables & Theme
   =========================== */
:root {
    /* Colors - Light Mode */
    --primary-color: #1a5f3f;
    --primary-dark: #0f3d28;
    --primary-light: #2d8659;
    --secondary-color: #d4af37;
    --accent-color: #c9a961;
    
    --bg-primary: #f5f5f0;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fafaf8;
    --bg-hover: #e8e8e3;
    
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6a6a6a;
    
    --border-color: #d0d0c8;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    
    /* Typography */
    --font-arabic: 'Amiri Quran', 'Amiri', serif;
    --font-body: 'Readex Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Sizes */
    --header-height: 70px;
    --player-height: 90px;
    --sidebar-width: 320px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --primary-color: #2d8659;
    --primary-dark: #1a5f3f;
    --primary-light: #3ea371;
    
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2d2d2d;
    --bg-hover: #333333;
    
    --text-primary: #e8e8e8;
    --text-secondary: #c0c0c0;
    --text-muted: #999999;
    
    --border-color: #3a3a3a;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.5);
}

/* ===========================
   Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Arabic Text Styling */
.arabic-text {
    font-family: var(--font-arabic);
    font-size: var(--arabic-font-size, 28px);
    line-height: 2;
    text-align: right;
    direction: rtl;
    color: var(--text-primary);
}

.arabic-text.large {
    font-size: calc(var(--arabic-font-size, 28px) * 1.3);
}

/* ===========================
   Loading Screen
   =========================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
}

.islamic-pattern {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.3)" stroke-width="2"/><circle cx="50" cy="50" r="30" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="2"/><circle cx="50" cy="50" r="20" fill="none" stroke="rgba(255,255,255,0.7)" stroke-width="2"/></svg>') center/contain no-repeat;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================
   Header
   =========================== */
.main-header {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    height: var(--header-height);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 20px;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    color: var(--primary-color);
    font-weight: 600;
}

.logo i {
    font-size: 28px;
}

.logo-text-ar {
    font-family: var(--font-arabic);
    font-size: 24px;
}

.logo-text-en {
    font-size: 14px;
    color: var(--text-secondary);
}

.main-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.nav-btn.active {
    background: var(--primary-color);
    color: white;
}

.nav-btn i {
    font-size: 16px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

/* ===========================
   Container & Layout
   =========================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    min-height: calc(100vh - var(--header-height) - var(--player-height));
    padding-bottom: 120px;
}

.view {
    display: none;
    padding: 30px 0;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 30px;
    align-items: start;
}

/* ===========================
   Surah List Sidebar
   =========================== */
.surah-list-sidebar {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    max-height: calc(100vh - var(--header-height) - 40px);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    background: var(--bg-hover);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.surah-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.surah-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 8px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.surah-item:hover {
    background: var(--bg-hover);
    transform: translateX(-3px);
}

.surah-item.active {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-color);
}

.surah-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.surah-item.active .surah-number {
    background: white;
    color: var(--primary-color);
}

.surah-info {
    flex: 1;
}

.surah-name-ar {
    font-family: var(--font-arabic);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.surah-name-en {
    font-size: 13px;
    color: var(--text-muted);
}

.surah-item.active .surah-name-en {
    color: rgba(255,255,255,0.9);
}

.surah-meta {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

.surah-item.active .surah-meta {
    color: rgba(255,255,255,0.8);
}

/* ===========================
   Surah Content
   =========================== */
.surah-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 30px;
    min-height: 500px;
}

.surah-header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.surah-header h1 {
    font-family: var(--font-arabic);
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.surah-header .surah-name-translation {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.surah-details {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.surah-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.surah-detail-item i {
    color: var(--primary-color);
}

.bismillah {
    text-align: center;
    font-family: var(--font-arabic);
    font-size: 36px;
    color: var(--primary-color);
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

/* ===========================
   Verses
   =========================== */
.verse {
    padding: 25px;
    margin-bottom: 20px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition-fast);
}

.verse:hover {
    background: var(--bg-hover);
    box-shadow: var(--shadow-sm);
}

.verse.playing {
    background: var(--primary-light);
    color: white;
    border-left-color: var(--secondary-color);
}

.verse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.verse-number {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--primary-color);
}

.verse.playing .verse-number {
    color: white;
}

.verse-number-badge {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 14px;
}

.verse.playing .verse-number-badge {
    background: var(--secondary-color);
    color: var(--primary-dark);
}

.verse-actions {
    display: flex;
    gap: 8px;
}

.verse-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.verse-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.verse.playing .verse-action-btn {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    color: white;
}

.verse.playing .verse-action-btn:hover {
    background: rgba(255,255,255,0.3);
}

.verse-action-btn.bookmarked {
    background: var(--secondary-color);
    color: var(--primary-dark);
    border-color: var(--secondary-color);
}

.verse-text {
    margin-bottom: 15px;
}

.verse-translation {
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: var(--translation-font-size, 16px);
    line-height: 1.8;
    border-left: 3px solid var(--secondary-color);
}

.verse.playing .verse-translation {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.95);
}

/* ===========================
   Modals
   =========================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 20px;
    color: var(--primary-color);
}

.close-modal {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: all var(--transition-fast);
}

.close-modal:hover {
    background: var(--primary-color);
    color: white;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

/* Search Modal */
.search-input-group {
    position: relative;
    margin-bottom: 20px;
}

.search-input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.search-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

#search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px;
    margin-bottom: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-result-item:hover {
    background: var(--bg-hover);
    transform: translateX(5px);
}

/* Settings Modal */
.settings-section {
    margin-bottom: 30px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h4 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.setting-item input[type="range"] {
    width: calc(100% - 60px);
    margin-right: 10px;
}

.setting-item .value-display {
    display: inline-block;
    width: 50px;
    text-align: right;
    color: var(--text-secondary);
    font-size: 14px;
}

.setting-item select {
    width: 100%;
    padding: 10px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.setting-item select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* ===========================
   Practice View
   =========================== */
.practice-container,
.tajweed-container,
.bookmarks-container,
.tools-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 40px;
}

.practice-container h2,
.tajweed-container h2,
.bookmarks-container h2,
.tools-container h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 16px;
}

.practice-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.practice-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.practice-selector select {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.practice-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.practice-display {
    margin-top: 30px;
}

.verse-to-practice {
    padding: 30px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.verse-to-practice h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.practice-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.audio-section,
.recording-section {
    padding: 25px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.audio-section h4,
.recording-section h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recording-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recording-status {
    margin-top: 15px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.recording-status.recording {
    background: #ffebee;
    color: #c62828;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.practice-history h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.history-item {
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===========================
   Tajweed View
   =========================== */
.tajweed-legend {
    padding: 25px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 30px;
}

.tajweed-legend h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-box {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.tajweed-selector {
    margin-bottom: 30px;
}

.tajweed-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-primary);
}

.tajweed-selector select {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
}

.tajweed-verse {
    padding: 25px;
    margin-bottom: 20px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

/* ===========================
   Bookmarks View
   =========================== */
.bookmarks-list {
    display: grid;
    gap: 20px;
}

.bookmark-item {
    padding: 25px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
    transition: all var(--transition-fast);
}

.bookmark-item:hover {
    background: var(--bg-hover);
    box-shadow: var(--shadow-sm);
}

.bookmark-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bookmark-info {
    font-weight: 600;
    color: var(--primary-color);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 20px;
}

/* ===========================
   Tools View
   =========================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.tool-card {
    padding: 30px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.tool-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.tool-card.full-width {
    grid-column: 1 / -1;
}

.tool-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 28px;
    margin-bottom: 20px;
}

.tool-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.progress-stats {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    font-size: 18px;
    color: var(--primary-color);
}

.progress-bar {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    width: 0%;
    transition: width 0.5s ease;
}

/* ===========================
   Audio Player (Fixed Bottom)
   =========================== */
.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
    height: var(--player-height);
}

.player-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 15px 30px;
    height: 100%;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 15px;
}

.playing-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    font-size: 24px;
}

.playing-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.playing-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.control-btn:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.control-btn.play-btn {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    font-size: 20px;
}

.control-btn.play-btn:hover {
    background: var(--primary-dark);
}

.control-btn.active {
    color: var(--primary-color);
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-current,
.time-total {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 45px;
    text-align: center;
}

.player-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    position: relative;
}

#progress-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
}

#progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

#progress-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-volume i {
    color: var(--text-muted);
}

#volume-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    background: var(--bg-tertiary);
    border-radius: 2px;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

#volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--primary-color);
}

.btn-success {
    background: #2e7d32;
}

.btn-success:hover {
    background: #1b5e20;
}

.btn-danger {
    background: #c62828;
}

.btn-danger:hover {
    background: #b71c1c;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 280px 1fr;
    }
    
    :root {
        --sidebar-width: 280px;
    }
}

@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .surah-list-sidebar {
        position: relative;
        top: 0;
        max-height: 400px;
    }
    
    .main-nav {
        display: none;
    }
    
    .logo-text-en {
        display: none;
    }
    
    .player-content {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .now-playing {
        justify-content: center;
    }
    
    .player-controls {
        justify-content: center;
    }
    
    .player-progress {
        order: -1;
    }
    
    .player-volume {
        justify-content: center;
    }
    
    .audio-player {
        height: auto;
    }
}

@media (max-width: 768px) {
    .practice-container,
    .tajweed-container,
    .bookmarks-container,
    .tools-container {
        padding: 25px 20px;
    }
    
    .surah-content {
        padding: 20px;
    }
    
    .verse {
        padding: 20px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .practice-actions {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
    }
    
    .logo {
        order: 1;
    }
    
    .header-actions {
        order: 2;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
        display: flex;
        overflow-x: auto;
    }
    
    .nav-btn {
        flex-shrink: 0;
    }
    
    .nav-btn span {
        display: none;
    }
}

@media (max-width: 480px) {
    .arabic-text {
        font-size: 24px;
    }
    
    .surah-header h1 {
        font-size: 36px;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 90vh;
    }
}

/* ===========================
   Utility Classes
   =========================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ===========================
   Scrollbar Styling
   =========================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .main-header,
    .audio-player,
    .verse-actions,
    .surah-list-sidebar {
        display: none !important;
    }
    
    .main-content {
        padding-bottom: 0;
    }
    
    .verse {
        page-break-inside: avoid;
    }
}