/* ============================================
   Genel Stiller ve Reset
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Premium Color Palette */
    --primary-color: #1a4d2e; /* Deep Islamic Green */
    --primary-light: #4f6f52;
    --secondary-color: #d4ad60; /* Gold/Sand Accent */
    --secondary-light: #eaddca;
    --accent-color: #c0392b;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #3498db;
    
    /* Neutral Colors */
    --bg-primary: #fdfdfb;
    --bg-secondary: #f4f1ea;
    --bg-card: #ffffff;
    --bg-hover: #f0ede5;
    
    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #5d5d5d;
    --text-light: #9a9a9a;
    
    /* UI Elements */
    --border-color: #e2dfd2;
    --border-radius: 16px;
    --border-radius-small: 10px;
    --border-radius-full: 50px;
    
    /* Sophisticated Shadows */
    --shadow-sm: 0 2px 8px rgba(26, 77, 46, 0.05);
    --shadow-md: 0 8px 16px rgba(26, 77, 46, 0.08);
    --shadow-lg: 0 16px 32px rgba(26, 77, 46, 0.12);
    --shadow-xl: 0 24px 48px rgba(26, 77, 46, 0.15);
    
    /* Typography */
    --font-arabic: 'Amiri', serif;
    --font-body: 'Cairo', sans-serif;
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #242424;
    --bg-hover: #2c2c2c;
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --text-light: #707070;
    --border-color: #333333;
    --primary-color: #2e7d32;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: var(--transition);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   Header Stilleri
   ============================================ */

.main-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    color: white;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.main-title {
    font-family: var(--font-arabic);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.main-title .icon {
    font-size: 3rem;
    margin-left: 15px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.description {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 10px;
}

/* ============================================
   Arama Bölümü
   ============================================ */

.search-section {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 15px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: var(--transition);
    font-family: var(--font-body);
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-btn {
    padding: 15px 25px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.clear-btn {
    padding: 15px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.clear-btn:hover {
    background: #c0392b;
}

.search-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.search-tab {
    padding: 8px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.search-tab:hover {
    background: var(--bg-hover);
    border-color: var(--secondary-color);
}

.search-tab.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.search-results-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin: 20px 0;
    max-height: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.search-results-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.btn-close-results {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 600;
}

.btn-close-results:hover {
    background: #c0392b;
}

.search-results-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.search-result-item {
    padding: 15px;
    margin: 10px 0;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: var(--transition);
    border-right: 3px solid transparent;
}

.search-result-item:hover {
    background: var(--bg-hover);
    border-right-color: var(--secondary-color);
    transform: translateX(-5px);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-sura {
    font-family: var(--font-arabic);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.result-sura-en {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.result-page {
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: var(--border-radius-small);
    font-size: 0.85rem;
    font-weight: 600;
}

.result-ayet {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0;
}

.ayet-number-badge {
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.ayet-text {
    font-family: var(--font-arabic);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    flex: 1;
}

.result-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ============================================
   Quick Actions
   ============================================ */

.quick-actions {
    margin: 30px 0;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.action-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-color);
}

.action-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary-color);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.action-card:hover::after {
    transform: scaleX(1);
}

.action-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
}

.action-card h3 {
    font-family: var(--font-arabic);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.action-card > p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 5px 0;
}

.action-desc {
    font-size: 0.9rem !important;
    color: var(--text-light) !important;
    margin-top: 12px !important;
}

/* ============================================
   Kıraat Grid
   ============================================ */

.qiraat-section {
    margin-bottom: 50px;
}

.qiraat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.qiraat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.qiraat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-color);
}

.qiraat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.qiraat-number {
    background: var(--bg-secondary);
    color: var(--primary-color);
    width: 45px;
    height: 45px;
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
}

.qiraat-icon {
    font-size: 2.8rem;
    opacity: 0.8;
}

.qiraat-title {
    font-family: var(--font-arabic);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.qiraat-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 20px;
}

.qiraat-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-view {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-family: var(--font-body);
}

.btn-view:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* ============================================
   Premium UI Components
   ============================================ */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.premium-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    color: white;
    position: relative;
}

.premium-header h1 {
    font-family: var(--font-arabic);
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.premium-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Styled Inputs & Buttons */
.search-input-premium {
    flex: 1;
    padding: 15px 25px;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-full);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input-premium:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 77, 46, 0.1);
}

.btn-premium {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-premium:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Standard Back Button */
.btn-back-floating {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.btn-back-floating:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Premium Card (Ayet, Sura, etc.) */
.premium-card, .search-result-card, .sura-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.premium-card:hover, .search-result-card:hover, .sura-card:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.search-result-card {
    border-right: 4px solid var(--secondary-color);
}

.sura-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.sura-card:hover::before {
    transform: scaleX(1);
}

.result-header, .sura-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.result-sura-name, .sura-title {
    font-family: var(--font-arabic);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.result-page-badge, .sura-info-badge {
    background: var(--secondary-light);
    color: var(--primary-color);
    padding: 6px 15px;
    border-radius: var(--border-radius-small);
    font-weight: 700;
    font-size: 0.9rem;
}

.result-ayet-text, .sura-info {
    font-family: var(--font-arabic);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin: 10px 0;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
}

.ayet-number-badge, .sura-number {
    background: var(--primary-color);
    color: var(--secondary-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.sura-number {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
}

.highlight {
    background: rgba(212, 173, 96, 0.3);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
    border-bottom: 2px solid var(--secondary-color);
}

/* ============================================
   Footer
   ============================================ */

.main-footer {
    background: var(--bg-card);
    padding: 40px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    margin-top: 50px;
    border: 1px solid var(--border-color);
}

.footer-content p {
    color: var(--text-secondary);
    margin: 5px 0;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ============================================
   Loading Overlay
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 1.1rem;
    margin-top: 10px;
}

/* ============================================
   Responsive Utilities
   ============================================ */

@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .qiraat-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
