/* استایل‌های اصلی مشابه قرآن */
:root {
    --primary: #2c5faa;
    --primary-dark: #1e4a8a;
    --secondary: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --bg-dark: #1a1a2e;
    --bg-darker: #16213e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tahoma', 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-darker));
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 350px;
    flex-shrink: 0;
}

.panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header {
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.surah-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: white;
}

.surah-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.surah-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
}

/* استایل آیات */
.verse {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.verse.playing {
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.3);
    background: rgba(39, 174, 96, 0.1);
}

.verse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.verse-number {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.verse-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.audio-btn, .control-btn, .btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.audio-btn:hover, .control-btn:hover, .btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.audio-btn.playing {
    background: var(--success);
}

.verse-content {
    margin-bottom: 15px;
}

.arabic-text {
    font-size: 1.4rem;
    text-align: right;
    line-height: 2;
    margin-bottom: 15px;
    color: #f8f9fa;
    font-family: 'Traditional Arabic', 'Times New Roman', serif;
}

.translation {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--light);
    border-right: 3px solid var(--primary);
    padding-right: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
}

/* استایل‌های حفظ */
.memorization-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.btn-memorized {
    background: rgba(39, 174, 96, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.btn-memorized.active, .btn-memorized:hover {
    background: var(--success);
    color: white;
}

.btn-reviewing {
    background: rgba(243, 156, 18, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.btn-reviewing.active, .btn-reviewing:hover {
    background: var(--warning);
    color: white;
}

.btn-learning {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-learning.active, .btn-learning:hover {
    background: var(--danger);
    color: white;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-memorized { background: var(--success); color: white; }
.badge-reviewing { background: var(--warning); color: white; }
.badge-learning { background: var(--danger); color: white; }

/* استایل‌های انتخاب سریع */
.quick-selection-panel {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.quick-selection-title {
    color: white;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.quick-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.quick-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.quick-examples {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.example-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.example-code {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.btn-warning {
    background: var(--warning);
}

.btn-info {
    background: #3498db;
}

.btn-success {
    background: var(--success);
}

/* استایل‌های کنترل پخش */
.playback-controls {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.repeat-section {
    margin-bottom: 15px;
}

.repeat-title {
    color: white;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.repeat-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.repeat-option {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.repeat-option:hover {
    background: rgba(255, 255, 255, 0.15);
}

.repeat-option.active {
    border-color: var(--primary);
    background: rgba(44, 95, 170, 0.3);
}

.repeat-count-control {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.repeat-count-input {
    width: 60px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
}

/* استایل‌های سایدبار */
.reciter-selector, .surah-selector {
    margin-bottom: 20px;
}

select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

option {
    background: var(--bg-darker);
    color: white;
}

/* استایل‌های پیشرفت حفظ */
.progress-section {
    margin-bottom: 20px;
}

.progress-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.1);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, var(--success), #2ecc71);
    height: 100%;
    transition: width 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-total { color: var(--primary); }
.stat-memorized { color: var(--success); }
.stat-reviewing { color: var(--warning); }
.stat-learning { color: var(--danger); }

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.action-section {
    display: flex;
    gap: 10px;
}

/* استایل‌های انتخاب آیات */
.verse-selection-panel {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.selection-title {
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.selection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.selection-count {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.verses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.verse-checkbox {
    display: none;
}

.verse-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.verse-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.2);
}

.verse-checkbox:checked + .verse-checkbox-label {
    background: var(--primary);
    border-color: var(--primary-dark);
}

.verse-checkbox-label.memorized {
    border-color: var(--success);
}

.verse-checkbox-label.reviewing {
    border-color: var(--warning);
}

.verse-checkbox-label.learning {
    border-color: var(--danger);
}

.selection-info {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* کنترل‌های سراسری */
.global-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* دکمه توقف سیار */
.floating-stop-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--danger);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1000;
    opacity: 0;
    transform: scale(0);
}

.floating-stop-btn.visible {
    opacity: 1;
    transform: scale(1);
}

.floating-stop-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* رسپانسیو */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .surah-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .repeat-options {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .action-section {
        flex-direction: column;
    }
    
    .global-controls {
        flex-direction: column;
    }
    
    .verse-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .verse-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* انیمیشن‌ها */
@keyframes pulse-playing {
    0% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(39, 174, 96, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

.verse.playing {
    animation: pulse-playing 2s infinite;
}

/* اسکرول نرم */
html {
    scroll-behavior: smooth;
}