/* ===== فیری مووی - استایل سراسری ===== */

:root {
    --accent: #f59e0b;       /* amber-500 */
    --accent-2: #fbbf24;
}

/* تم تیره (پیش‌فرض) */
body.dark {
    --bg: #020617;            /* slate-950 */
    --bg-soft: #0f172a;       /* slate-900 */
    --surface: #1e293b;       /* slate-800 */
    --surface-2: #334155;     /* slate-700 */
    --border: #334155;
    --text: #f1f5f9;          /* slate-100 */
    --text-muted: #94a3b8;    /* slate-400 */
    --header-bg: rgba(15, 23, 42, 0.85);
}

/* تم روشن */
body:not(.dark) {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #e2e8f0;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --header-bg: rgba(255, 255, 255, 0.85);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Vazirmatn', 'Vazir', sans-serif;
    direction: rtl;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.3s, color 0.3s;
}

a { text-decoration: none; }

/* ===== نوار پیشرفت بالای صفحه ===== */
#loading-bar {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    width: 0;
    z-index: 9999;
    transition: width 0.3s ease;
}

/* ===== هدر ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.6rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    transition: color 0.2s, background-color 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface);
}

/* ===== هیرو ===== */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 400px at 80% -10%, rgba(245, 158, 11, 0.18), transparent 60%),
        radial-gradient(900px 400px at 10% 0%, rgba(56, 189, 248, 0.15), transparent 60%),
        linear-gradient(180deg, var(--bg-soft), var(--bg));
    border-bottom: 1px solid var(--border);
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 0.8rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.hero-btn:hover { transform: translateY(-2px); }

.hero-btn-primary {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #1a1a2e;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.hero-btn-ghost {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

/* ===== اطلاعیه‌ها ===== */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.7;
    border: 1px solid var(--border);
}

.notice p { margin: 0; flex: 1; }
.notice a { color: var(--accent-2); text-decoration: underline; }
.notice a:hover { opacity: 0.85; }

.notice-info { background: var(--surface); color: var(--text); }
.notice-warn { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.35); }

.notice-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.15rem;
    flex-shrink: 0;
}
.notice-close:hover { color: var(--text); }

/* ===== سرتیتر بخش‌ها ===== */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.section-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s;
}
.section-link:hover { color: var(--accent-2); }

/* ===== گرید کارت‌ها ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; } }
@media (min-width: 768px) { .cards-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; } }

/* ===== کارت فیلم/سریال ===== */
.movie-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.poster-wrap {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: var(--surface-2);
    overflow: hidden;
}

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.movie-card:hover .poster-img { transform: scale(1.05); }

/* overlay فقط روی دستگاه‌های دارای hover (دسکتاپ) */
.poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2,6,23,0.1), rgba(2,6,23,0.9));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 1rem;
    gap: 0.6rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-text {
    color: #e2e8f0;
    font-size: 0.8rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.overlay-btn {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: 0.6rem;
}

@media (hover: hover) {
    .movie-card:hover .poster-overlay { opacity: 1; }
}

/* badge وضعیت (اکران/در حال پخش/به‌زودی) */
.poster-wrap .homepage-status-badge { top: 8px; right: 8px; }

/* اطلاعات کارت - همیشه نمایش داده می‌شود (مهم برای موبایل) */
.card-info {
    padding: 0.65rem 0.75rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: auto;
}

.card-rating { color: var(--accent-2); font-weight: 700; }
.card-rating i { font-size: 0.7rem; }

.card-btn {
    text-align: center;
    background: var(--surface-2);
    color: var(--text);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.45rem;
    border-radius: 0.6rem;
    transition: background-color 0.2s, color 0.2s;
}

.card-btn:hover {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #1a1a2e;
}

/* ===== اسکلتون لودینگ ===== */
.skeleton-card {
    aspect-ratio: 2 / 3;
    border-radius: 0.9rem;
    background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== فوتر ===== */
.site-footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
}

.footer-link { color: var(--text-muted); transition: color 0.2s; }
.footer-link:hover { color: var(--accent-2); }
