/* ============================================
   تذكيراتي — التنسيقات الرئيسية
   RTL-first, CSS Variables, Dark/Light Mode
   ============================================ */

/* ===== CSS Variables ===== */
:root {
    --color-primary: #2563EB;
    --color-primary-dark: #1D4ED8;
    --color-primary-light: #DBEAFE;
    --color-accent: #059669;
    --color-warning: #D97706;
    --color-danger: #DC2626;

    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-card: #FFFFFF;

    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;

    --border: #E5E7EB;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --radius: 12px;

    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Inter', sans-serif;
}

[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-card: #1E293B;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border: #334155;
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ===== Base ===== */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-ar);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Dark mode body override */
[data-theme="dark"] body {
    background-color: var(--bg-primary);
}

[data-theme="dark"] .bg-white {
    background-color: var(--bg-card);
}

[data-theme="dark"] .bg-gray-50 {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .text-gray-900 {
    color: var(--text-primary);
}

[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-400 {
    color: var(--text-secondary);
}

[data-theme="dark"] .border,
[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-gray-100 {
    border-color: var(--border);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ar);
    font-weight: 700;
    line-height: 1.3;
}

[lang="en"] body,
[lang="en"] h1,
[lang="en"] h2,
[lang="en"] h3 {
    font-family: var(--font-en);
}

/* ===== Focus ===== */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

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

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ===== Card hover ===== */
.hover-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===== Channel Card (subscribe) ===== */
.channel-card {
    border-color: var(--border);
    transition: all 0.2s;
}

.channel-card:has(.channel-checkbox:checked) {
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 20px;
    end: 20px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 500;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.toast-success {
    background: #059669;
    color: white;
}

.toast-error {
    background: #DC2626;
    color: white;
}

/* ===== Print ===== */
@media print {
    nav, footer, .no-print { display: none; }
}
