/**
 * style.css - الأنماط الرئيسية للموقع
 * Main stylesheet for the platform
 */

/* ========== إعادة تعيين وأساسيات ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    direction: rtl;
    line-height: 1.7;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

/* ========== الهيدر / التنقل ========== */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 1.6rem;
}

.navbar-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.navbar-links a {
    color: var(--gray-600);
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
}

.navbar-links a:hover,
.navbar-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* ========== الحاوية ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========== القسم الرئيسي (Hero) ========== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

/* ========== العنوان الفرعي ========== */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

/* ========== شبكة البطاقات ========== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 2rem;
    text-align: center;
    font-size: 2.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.card-body p {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========== الأزرار ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

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

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

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

.btn-success:hover {
    background: #059669;
}

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

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ========== نموذج الوصول (Access Code) ========== */
.access-form-wrapper {
    max-width: 500px;
    margin: 3rem auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    text-align: center;
}

.access-form-wrapper h2 {
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.access-form-wrapper p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.access-form-wrapper .form-group {
    margin-bottom: 1rem;
    text-align: right;
}

.access-form-wrapper input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    direction: ltr;
    text-align: center;
    transition: var(--transition);
}

.access-form-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ========== مشغل الفيديو ========== */
.video-player-wrapper {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 16/9;
}

.video-player-wrapper iframe,
.video-player-wrapper video {
    width: 100%;
    height: 100%;
    border: none;
}

.video-list {
    list-style: none;
}

.video-list li {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.video-list li:hover,
.video-list li.active {
    background: var(--primary-light);
    color: var(--primary);
}

.video-list li .video-number {
    background: var(--gray-200);
    color: var(--gray-600);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.video-list li.active .video-number {
    background: var(--primary);
    color: var(--white);
}

.video-type-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    background: var(--gray-100);
    color: var(--gray-500);
    margin-right: auto;
}

/* ========== مسار التنقل (Breadcrumb) ========== */
.breadcrumb {
    display: flex;
    list-style: none;
    padding: 1rem 0;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-500);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-right: 0.5rem;
    color: var(--gray-300);
}

/* ========== التنبيهات ========== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid #93c5fd;
}

/* ========== التذييل ========== */
.footer {
    background: var(--secondary);
    color: var(--gray-400);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer a {
    color: var(--primary);
}

/* ========== حالة فارغة ========== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-400);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--gray-600);
}

/* ========== صفحة الخدمة (Service Page) ========== */
.service-page {
    max-width: 900px;
    margin: 0 auto;
}

.service-hero {
    text-align: center;
    padding: 2rem 0;
}

.service-hero-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #d97706);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 1.2rem;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.service-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.service-subtitle {
    color: var(--gray-500);
    font-size: 1.1rem;
}

.service-description {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.service-description h2 {
    font-size: 1.2rem;
    color: var(--gray-900);
    margin-bottom: 0.8rem;
}

.service-description p {
    color: var(--gray-600);
    line-height: 1.8;
}

/* بطاقات التواصل */
.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 2px solid var(--gray-200);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.contact-card.whatsapp-card:hover { border-color: #25d366; }
.contact-card.email-card:hover    { border-color: #0078d4; }
.contact-card.phone-card:hover    { border-color: var(--primary); }
.contact-card.meeting-card:hover  { border-color: var(--accent); }

.contact-card-icon {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.whatsapp-card .contact-card-icon { background: #25d366; }
.email-card .contact-card-icon    { background: #0078d4; }
.phone-card .contact-card-icon    { background: var(--primary); }
.meeting-card .contact-card-icon  { background: var(--accent); }

.contact-card-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.3rem;
}

.contact-card-body p {
    color: var(--gray-500);
    font-size: 0.9rem;
    line-height: 1.5;
}

.contact-number {
    display: inline-block;
    margin-top: 0.4rem;
    font-weight: 700;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.contact-card-action {
    margin-top: auto;
    padding-top: 0.5rem;
}

/* بطاقة الخدمة المميزة في الصفحة الرئيسية */
.service-highlight-card .card-icon {
    position: relative;
}

.service-highlight-card .card-icon::after {
    content: 'جديد';
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }

    .service-hero h1 {
        font-size: 1.5rem;
    }
}

/* ========== التصميم المتجاوب ========== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .navbar-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }

    .navbar-links.show {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .navbar .container {
        flex-wrap: wrap;
        position: relative;
    }
}

/* ========== أنماط لوحة التحكم (Admin) ========== */

/* تخطيط لوحة التحكم */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--secondary);
    color: var(--white);
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 200;
    transition: var(--transition);
}

.admin-sidebar .sidebar-brand {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--gray-700);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-sidebar .sidebar-brand i {
    font-size: 1.4rem;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    color: var(--gray-400);
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left: 3px solid var(--primary);
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
}

.admin-content {
    flex: 1;
    margin-right: 260px;
    padding: 2rem;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.admin-header h1 {
    font-size: 1.5rem;
    color: var(--gray-900);
}

/* بطاقات الإحصائيات */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--gray-200);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--white);
}

.stat-card .stat-icon.bg-primary { background: var(--primary); }
.stat-card .stat-icon.bg-success { background: var(--success); }
.stat-card .stat-icon.bg-warning { background: var(--warning); }
.stat-card .stat-icon.bg-danger  { background: var(--danger); }

.stat-card .stat-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
}

.stat-card .stat-info p {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* جداول لوحة التحكم */
.admin-table-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.admin-table-wrapper .table-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
}

.admin-table-wrapper .table-header h2 {
    font-size: 1.1rem;
    color: var(--gray-900);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--gray-50);
    padding: 0.8rem 1.5rem;
    text-align: right;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--gray-200);
}

.admin-table td {
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.admin-table tr:hover {
    background: var(--gray-50);
}

.admin-table .actions {
    display: flex;
    gap: 0.5rem;
}

/* نماذج الإدارة */
.admin-form {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--gray-200);
    max-width: 700px;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    direction: rtl;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* صفحة الدخول للمشرف */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--gray-800) 100%);
}

.login-box {
    background: var(--white);
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    text-align: center;
}

.login-box h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.login-box p {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.login-box .form-group {
    text-align: right;
}

/* شارات الحالة */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active { background: #d1fae5; color: #065f46; }
.badge-used   { background: #fef3c7; color: #92400e; }
.badge-expired { background: #fee2e2; color: #991b1b; }

/* زر التبديل للشريط الجانبي في الجوال */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 300;
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

/* تصميم متجاوب للوحة التحكم */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-content {
        margin-right: 0;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-table {
        font-size: 0.85rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== نظام التعليقات (Comments) ========== */
.comments-section {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
}

.comments-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-count-badge {
    background: var(--primary);
    color: var(--white);
    padding: 0.1rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.comment-form-wrapper {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.comment-form-wrapper input,
.comment-form-wrapper textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    direction: rtl;
}

.comment-form-wrapper input:focus,
.comment-form-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.comment-form-wrapper textarea {
    min-height: 70px;
    resize: vertical;
}

.reply-indicator {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.cancel-reply-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
}

/* تعليق واحد */
.comment-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.comment-meta {
    flex: 1;
}

.comment-username {
    font-weight: 700;
    color: var(--gray-800);
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-right: 0.5rem;
}

.comment-body {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.7;
    padding-right: 2.8rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-actions {
    padding-right: 2.8rem;
    margin-top: 0.4rem;
}

.reply-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.2rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.reply-btn:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* الردود المتداخلة */
.comment-replies {
    margin-right: 2rem;
    padding-right: 1rem;
    border-right: 2px solid var(--gray-200);
}

.comment-replies .comment-replies {
    margin-right: 1.5rem;
}

.comments-loading {
    text-align: center;
    padding: 2rem;
    color: var(--gray-400);
}

.no-comments {
    text-align: center;
    padding: 2rem;
    color: var(--gray-400);
    font-size: 0.95rem;
}

/* ========== عنوان فيديو حالي ========== */
.video-title-text {
    flex: 1;
}
