/* style.css */

/* تحميل الخط من Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

/* تعيين الخط العام للجسم */
body {
    font-family: 'Cairo', sans-serif;
}

/* نص بتدرج لوني (يُستخدم للعناوين) */
.gradient-text {
    background: linear-gradient(90deg, #EC4899, #06B6D4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* تأثير تكبير عند التحويم */
.hover-scale:hover,
.download-btn:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease, background 0.3s ease;
}

/* تأثير زر التنزيل عند التحويم */
.download-btn:hover {
    background: linear-gradient(90deg, #CC1444, #5AA8B8);
}

/* تأثير تركيز على حقول الإدخال */
.input-focus:focus {
    border-color: #EC4899 !important;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1) !important;
}

/* تأثير الارتفاع عند التحويم على البطاقات */
.feature-card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

/* حاوية معاينة الفيديو */
.video-preview-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 400px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    background: #000;
}

/* صورة الفيديو */
.video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* زر التشغيل في وسط الصورة */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    border: 2px solid white;
}

/* إظهار زر التشغيل عند التحويم */
.video-preview-container:hover .play-button {
    opacity: 1;
}

/* معلومات الفيديو أسفل الصورة */
.video-info {
    text-align: center;
    margin-top: 16px;
}

.video-title {
    font-size: 16px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 4px;
}

.video-author {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.video-stats {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* حالة التحميل */
.loading {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 20px 0;
}

/* سبينر التحميل */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #EC4899;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* شريط تقدم التحميل (متحرك) */
.loading-wave {
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #EE1D52, #69C9D0, #EE1D52);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.loading-wave::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: wave 1.5s ease-in-out infinite;
}

@keyframes wave {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* رسالة الخطأ */
.error-message {
    display: none;
    padding: 12px 16px;
    background-color: #fee2e2;
    color: #dc2626;
    font-size: 14px;
    border-radius: 0.5rem;
    text-align: center;
    margin: 10px 0;
    border: 1px solid #fecaca;
}

.error-message.show {
    display: block;
}