/*
Theme Name: Aflamecoz
Theme URI: https://aflamecoz.com
Author: Aflamecoz Team
Author URI: https://aflamecoz.com
Description: قالب أفلاميكوز - قالب ووردبريس مخصص لمواقع الأفلام والمسلسلات العربية مع تكامل TMDB API
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aflamecoz
Tags: movies, arabic, rtl, dark, entertainment
*/

/* ============================================
   AFLAMECOZ THEME - MAIN STYLESHEET
   ============================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary:    #0f0f0f;
    --bg-secondary:  #1a1a1a;
    --bg-card:       #222222;
    --bg-hover:      #2a2a2a;
    --accent:        #e50000;
    --accent-hover:  #c00000;
    --accent-light:  #ff4444;
    --gold:          #f5c518;
    --text-primary:  #ffffff;
    --text-secondary:#b3b3b3;
    --text-muted:    #777777;
    --border:        #333333;
    --border-light:  #444444;
    --badge-hd:      #1a73e8;
    --badge-dubbed:  #2ecc71;
    --badge-new:     #e50000;
    --radius:        6px;
    --radius-lg:     12px;
    --shadow:        0 4px 20px rgba(0,0,0,0.5);
    --transition:    0.2s ease;
    --font-ar:       'Cairo', 'Tajawal', 'Noto Sans Arabic', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-ar);
    font-size: 15px;
    line-height: 1.7;
    direction: rtl;
    min-height: 100vh;
}

a { color: var(--text-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; outline: none; background: none; font-family: var(--font-ar); }
input, select, textarea { font-family: var(--font-ar); }

/* ---------- CONTAINER ---------- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- HEADER ---------- */
#site-header {
    background: #111111;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 60px;
}
.site-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.site-logo span { color: var(--text-primary); }

/* Main Nav */
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav > li { position: relative; }
.main-nav > li > a {
    display: flex; align-items: center; gap: 4px;
    padding: 0 12px; height: 60px;
    font-size: 14px; font-weight: 600;
    color: var(--text-secondary);
    transition: color var(--transition);
    white-space: nowrap;
}
.main-nav > li > a:hover,
.main-nav > li.current-menu-item > a { color: var(--text-primary); }
.main-nav > li > a .arrow { font-size: 10px; }

/* Dropdown */
.main-nav .dropdown {
    position: absolute; top: 100%; right: 0;
    background: #1e1e1e; border: 1px solid var(--border);
    border-radius: var(--radius); min-width: 180px;
    box-shadow: var(--shadow);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
    z-index: 200;
}
.main-nav > li:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
    display: block; padding: 10px 16px;
    font-size: 13px; color: var(--text-secondary);
    border-bottom: 1px solid #2a2a2a;
}
.dropdown a:hover { color: var(--text-primary); background: var(--bg-hover); }
.dropdown li:last-child a { border-bottom: none; }

/* Header Search */
.header-search { position: relative; margin-right: auto; }
.header-search input {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 20px; padding: 7px 36px 7px 14px;
    color: var(--text-primary); font-size: 13px; width: 220px;
    transition: border-color var(--transition);
}
.header-search input:focus { border-color: var(--accent); outline: none; width: 280px; }
.header-search button {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 15px; padding: 0;
}
.header-search .search-results-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0; left: 0;
    background: #1e1e1e; border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    max-height: 400px; overflow-y: auto; display: none; z-index: 300;
}
.header-search .search-results-dropdown.active { display: block; }
.search-result-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-bottom: 1px solid #2a2a2a;
    transition: background var(--transition);
}
.search-result-item:hover { background: var(--bg-hover); }
.search-result-item img { width: 40px; height: 58px; object-fit: cover; border-radius: 3px; }
.search-result-info .title { font-size: 13px; font-weight: 600; }
.search-result-info .meta { font-size: 11px; color: var(--text-muted); }

/* Mobile Nav Toggle */
.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    width: 28px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.3s; }

/* ---------- HERO / SLIDER ---------- */
.hero-slider {
    position: relative; overflow: hidden;
    background: #000; height: 460px;
}
.hero-slide {
    position: absolute; inset: 0; opacity: 0;
    transition: opacity 0.6s ease; display: flex; align-items: flex-end;
}
.hero-slide.active { opacity: 1; }
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center top;
    filter: brightness(0.4);
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.9) 40%, transparent 100%),
                linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
}
.hero-content {
    position: relative; z-index: 2;
    padding: 0 0 40px 0; max-width: 520px;
}
.hero-badges { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.hero-title { font-size: 28px; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.hero-meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; flex-wrap: wrap; }
.hero-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-watch {
    background: var(--accent); color: #fff; padding: 10px 24px;
    border-radius: 4px; font-size: 14px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 8px;
    transition: background var(--transition);
}
.btn-watch:hover { background: var(--accent-hover); color: #fff; }
.btn-outline {
    border: 1px solid #555; color: var(--text-primary);
    padding: 10px 20px; border-radius: 4px; font-size: 14px;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all var(--transition);
}
.btn-outline:hover { border-color: var(--text-primary); background: rgba(255,255,255,0.05); }

/* Slider Poster */
.hero-poster {
    position: absolute; left: 60px; bottom: 30px;
    width: 140px; height: 210px; border-radius: var(--radius);
    overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }

/* Slider Controls */
.slider-dots {
    position: absolute; bottom: 14px; right: 50%; transform: translateX(50%);
    display: flex; gap: 6px; z-index: 10;
}
.slider-dot {
    width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3);
    transition: all var(--transition); cursor: pointer;
}
.slider-dot.active { background: var(--accent); width: 22px; border-radius: 4px; }
.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); color: #fff; width: 40px; height: 40px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 18px; z-index: 10; transition: background var(--transition);
}
.slider-btn:hover { background: var(--accent); }
.slider-btn.prev { right: 12px; }
.slider-btn.next { left: 12px; }

/* ---------- SECTIONS ---------- */
.section { padding: 28px 0; }
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px;
}
.section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 17px; font-weight: 700;
}
.section-title::before {
    content: ''; display: block; width: 4px; height: 20px;
    background: var(--accent); border-radius: 2px;
}
.section-title .badge-live {
    background: var(--accent); color: #fff; font-size: 10px;
    padding: 2px 7px; border-radius: 3px; font-weight: 700; letter-spacing: 0.5px;
}
.section-more {
    font-size: 12px; color: var(--text-muted);
    border: 1px solid var(--border); padding: 5px 14px;
    border-radius: 20px; transition: all var(--transition);
}
.section-more:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- MOVIE GRID ---------- */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
}
.movies-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
.movies-grid.cols-7 { grid-template-columns: repeat(7, 1fr); }

/* ---------- MOVIE CARD ---------- */
.movie-card {
    position: relative; border-radius: var(--radius);
    overflow: hidden; background: var(--bg-card);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.movie-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.movie-card:hover .card-overlay { opacity: 1; }

.card-poster {
    position: relative; padding-top: 148%;  /* 2:3 ratio */
    overflow: hidden;
}
.card-poster img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform 0.4s ease;
}
.movie-card:hover .card-poster img { transform: scale(1.05); }

.card-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.55);
    opacity: 0; transition: opacity var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.card-play-btn {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; transform: scale(0.8);
    transition: transform var(--transition);
}
.movie-card:hover .card-play-btn { transform: scale(1); }

/* Card Badges */
.card-badges {
    position: absolute; top: 6px; right: 6px;
    display: flex; flex-direction: column; gap: 3px; align-items: flex-end;
}
.badge {
    font-size: 10px; font-weight: 700; padding: 2px 6px;
    border-radius: 3px; line-height: 1.4;
}
.badge-hd     { background: var(--badge-hd); color: #fff; }
.badge-dubbed { background: var(--badge-dubbed); color: #fff; }
.badge-sub    { background: #f39c12; color: #fff; }
.badge-new    { background: var(--badge-new); color: #fff; }
.badge-series { background: #8e44ad; color: #fff; }

/* Rating Badge */
.card-rating {
    position: absolute; bottom: 50px; left: 6px;
    background: rgba(0,0,0,0.75); color: var(--gold);
    font-size: 11px; font-weight: 700; padding: 2px 6px;
    border-radius: 3px; display: flex; align-items: center; gap: 3px;
}

/* Card Info */
.card-info { padding: 8px 8px 10px; }
.card-title {
    font-size: 12px; font-weight: 600; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-year { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-muted);
    padding: 12px 0; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: #444; }

/* ---------- SINGLE MOVIE PAGE ---------- */
.movie-single { padding: 24px 0 40px; }
.movie-hero {
    display: grid; grid-template-columns: 1fr 220px;
    gap: 30px; align-items: start;
}
.movie-info-title {
    font-size: 24px; font-weight: 800; margin-bottom: 6px;
}
.movie-info-title-en { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.movie-badges-row {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; align-items: center;
}
.movie-rating-badge {
    display: flex; align-items: center; gap: 4px;
    background: rgba(245,197,24,0.15); border: 1px solid var(--gold);
    color: var(--gold); padding: 3px 10px; border-radius: 4px;
    font-size: 13px; font-weight: 700;
}
.movie-desc {
    font-size: 14px; color: var(--text-secondary);
    line-height: 1.8; margin-bottom: 20px;
}
.movie-action-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.btn-primary {
    background: var(--accent); color: #fff; padding: 10px 22px;
    border-radius: 4px; font-size: 14px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 8px;
    transition: background var(--transition);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary {
    background: var(--bg-secondary); color: var(--text-primary);
    border: 1px solid var(--border); padding: 10px 20px;
    border-radius: 4px; font-size: 14px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Social Share */
.share-row {
    display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
    flex-wrap: wrap;
}
.share-label { font-size: 13px; color: var(--text-muted); }
.share-btn {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: #fff; transition: transform var(--transition), opacity var(--transition);
}
.share-btn:hover { transform: scale(1.1); opacity: 0.9; }
.share-fb       { background: #1877f2; }
.share-tw       { background: #000; }
.share-tg       { background: #0088cc; }
.share-pt       { background: #e60023; }
.share-copy     { background: #555; }

/* User Rating */
.user-rating { margin-bottom: 18px; }
.stars-row { display: flex; gap: 4px; margin-top: 6px; }
.stars-row .star { font-size: 22px; color: #444; cursor: pointer; transition: color var(--transition); }
.stars-row .star.active,
.stars-row .star:hover { color: var(--gold); }

/* Movie Details Table */
.movie-details-table { margin-top: 18px; }
.details-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 2px; margin-bottom: 2px;
}
.detail-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-secondary); padding: 8px 12px;
    border-radius: 4px; font-size: 13px;
}
.detail-item .di-label {
    color: var(--text-muted); white-space: nowrap; min-width: 80px;
    display: flex; align-items: center; gap: 5px;
}
.detail-item .di-label svg { color: var(--accent); }
.detail-item .di-value { color: var(--text-primary); font-weight: 500; }
.detail-item .di-value a { color: var(--text-secondary); }
.detail-item .di-value a:hover { color: var(--accent); }

/* Tags */
.movie-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag-item {
    background: var(--bg-secondary); border: 1px solid var(--border);
    padding: 4px 12px; border-radius: 20px; font-size: 12px;
    color: var(--text-secondary); transition: all var(--transition);
}
.tag-item:hover { border-color: var(--accent); color: var(--accent); }

/* Poster */
.movie-poster-side { position: sticky; top: 80px; }
.movie-poster-side img {
    width: 100%; border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

/* ---------- WATCH PAGE / SERVERS ---------- */
.watch-section { padding: 20px 0 40px; }
.player-wrapper {
    background: #000; border-radius: var(--radius);
    overflow: hidden; position: relative;
    padding-top: 56.25%; /* 16:9 */
    margin-bottom: 16px;
}
.player-wrapper iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%; border: none;
}
.player-placeholder {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: #0a0a0a; color: var(--text-muted);
    font-size: 14px; gap: 10px;
}
.player-placeholder .play-icon { font-size: 50px; color: var(--accent); }

/* Server Tabs */
.servers-section { margin-bottom: 20px; }
.servers-label { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text-secondary); }
.server-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.server-tab {
    background: var(--bg-secondary); border: 1px solid var(--border);
    padding: 8px 18px; border-radius: 4px; font-size: 13px; font-weight: 600;
    color: var(--text-secondary); transition: all var(--transition);
    cursor: pointer;
}
.server-tab:hover { border-color: var(--accent); color: var(--accent); }
.server-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.server-tab .quality-badge { font-size: 10px; background: rgba(0,0,0,0.3); padding: 1px 5px; border-radius: 2px; margin-right: 5px; }

/* Download Buttons */
.download-section { margin-bottom: 20px; }
.download-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn-download {
    background: var(--bg-secondary); border: 1px solid var(--border);
    padding: 8px 18px; border-radius: 4px; font-size: 13px;
    color: var(--text-secondary); display: inline-flex; align-items: center; gap: 8px;
    transition: all var(--transition);
}
.btn-download:hover { border-color: var(--accent); color: var(--accent); }
.btn-download .dl-quality { font-size: 10px; background: var(--accent); color: #fff; padding: 1px 6px; border-radius: 2px; font-weight: 700; }

/* ---------- EPISODES (TV) ---------- */
.seasons-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.season-tab {
    background: var(--bg-secondary); border: 1px solid var(--border);
    padding: 7px 18px; border-radius: 4px; font-size: 13px;
    cursor: pointer; transition: all var(--transition);
}
.season-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.episodes-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 6px;
}
.ep-btn {
    background: var(--bg-secondary); border: 1px solid var(--border);
    padding: 8px; text-align: center; border-radius: 4px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all var(--transition);
}
.ep-btn:hover, .ep-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- TABS (Cast / Trailer) ---------- */
.content-tabs { border-bottom: 1px solid var(--border); display: flex; gap: 0; margin-bottom: 20px; }
.content-tab {
    padding: 12px 20px; font-size: 14px; font-weight: 600;
    color: var(--text-muted); border-bottom: 2px solid transparent;
    cursor: pointer; transition: all var(--transition); display: flex; align-items: center; gap: 6px;
}
.content-tab:hover { color: var(--text-primary); }
.content-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Cast Grid */
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 14px; }
.cast-card { text-align: center; }
.cast-card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; border: 2px solid var(--border); }
.cast-card .cast-name { font-size: 12px; font-weight: 600; }
.cast-card .cast-role { font-size: 11px; color: var(--text-muted); }

/* Screenshots */
.screenshots-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.screenshot-item { border-radius: var(--radius); overflow: hidden; padding-top: 56%; position: relative; cursor: pointer; }
.screenshot-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- ARCHIVE PAGE ---------- */
.archive-page { padding: 24px 0 40px; }
.archive-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.archive-title { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.archive-count { font-size: 13px; color: var(--text-muted); }

/* Filter Bar */
.filter-bar {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px;
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px;
    align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.filter-group label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.filter-select, .filter-input {
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-primary); padding: 8px 12px;
    border-radius: 4px; font-size: 13px; font-family: var(--font-ar);
}
.filter-select:focus, .filter-input:focus { border-color: var(--accent); outline: none; }
.filter-btn {
    background: var(--accent); color: #fff; padding: 8px 20px;
    border-radius: 4px; font-size: 13px; font-weight: 700;
    transition: background var(--transition); white-space: nowrap;
}
.filter-btn:hover { background: var(--accent-hover); }

/* Pagination */
.pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; margin-top: 36px; flex-wrap: wrap;
}
.page-btn {
    width: 38px; height: 38px; border-radius: 4px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 14px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ---------- ADS ---------- */
.ad-wrapper { text-align: center; margin: 16px 0; overflow: hidden; }
.ad-wrapper.ad-banner { max-height: 120px; }
.ad-wrapper.ad-square { max-width: 300px; margin: 0 auto; }
.ad-wrapper.ad-before-player { margin-bottom: 10px; }
.ad-label { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }

/* Floating Ad */
.floating-ad {
    position: fixed; bottom: 20px; left: 20px;
    z-index: 9999; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); max-width: 320px;
}
.floating-ad-close {
    position: absolute; top: -10px; left: -10px;
    width: 22px; height: 22px; background: var(--accent); color: #fff;
    border-radius: 50%; font-size: 12px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 1;
}

/* ---------- FOOTER ---------- */
#site-footer {
    background: #111; border-top: 1px solid var(--border);
    padding: 40px 0 0;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px; margin-bottom: 30px;
}
.footer-brand .logo { font-size: 20px; font-weight: 800; color: var(--accent); margin-bottom: 10px; }
.footer-brand .logo span { color: #fff; }
.footer-desc { font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: var(--text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border); padding: 16px 0;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.footer-copyright { font-size: 12px; color: var(--text-muted); }
.footer-disclaimer { font-size: 11px; color: #555; text-align: center; }

/* ---------- NOTIFICATION / TOAST ---------- */
.toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 18px;
    font-size: 13px; box-shadow: var(--shadow);
    animation: slideUp 0.3s ease; display: flex; align-items: center; gap: 8px;
}
.toast.success { border-right: 3px solid var(--badge-dubbed); }
.toast.error   { border-right: 3px solid var(--accent); }
@keyframes slideUp { from { transform: translateY(20px); opacity:0; } to { transform: translateY(0); opacity:1; } }

/* ---------- LOADING SKELETON ---------- */
.skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- SCROLL TO TOP ---------- */
.scroll-top {
    position: fixed; bottom: 24px; left: 24px; z-index: 999;
    width: 40px; height: 40px; background: var(--accent); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 18px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
    transition: all var(--transition);
}
.scroll-top.visible { opacity: 1; pointer-events: all; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
    .movies-grid.cols-6 { grid-template-columns: repeat(5, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .hero-slider { height: 380px; }
    .hero-title { font-size: 22px; }
    .hero-poster { display: none; }
    .movie-hero { grid-template-columns: 1fr; }
    .movie-poster-side { display: none; }
    .movies-grid.cols-6 { grid-template-columns: repeat(4, 1fr); }
    .screenshots-grid { grid-template-columns: repeat(2,1fr); }
    .details-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .main-nav { display: none; flex-direction: column; position: absolute; top: 60px; right: 0; left: 0; background: #111; border-bottom: 1px solid var(--border); padding: 10px 0; z-index: 999; }
    .main-nav.open { display: flex; }
    .main-nav > li > a { height: auto; padding: 12px 20px; }
    .nav-toggle { display: flex; }
    .header-search input { width: 160px; }
    .header-search input:focus { width: 200px; }
    .movies-grid.cols-6, .movies-grid.cols-7 { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-slider { height: 300px; }
    .hero-title { font-size: 18px; }
    .filter-bar { flex-direction: column; }
}
@media (max-width: 480px) {
    .movies-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .hero-slider { height: 260px; }
    .hero-desc { display: none; }
    .hero-actions { gap: 8px; }
    .btn-watch, .btn-outline { padding: 8px 14px; font-size: 13px; }
    .cast-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}

/* ---------- ADMIN PANEL CUSTOM STYLES ---------- */
.aflamecoz-admin { font-family: var(--font-ar); }
.aflamecoz-admin .wrap { max-width: 1100px; }
.tmdb-search-box { background: #fff; padding: 20px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 20px; }
.tmdb-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 14px; margin-top: 16px; }
.tmdb-result-card { border: 1px solid #ddd; border-radius: 6px; overflow: hidden; cursor: pointer; transition: border-color 0.2s; }
.tmdb-result-card:hover { border-color: #e50000; }
.tmdb-result-card img { width: 100%; display: block; }
.tmdb-result-card .rc-info { padding: 8px; font-size: 12px; }
.tmdb-result-card .rc-title { font-weight: 700; margin-bottom: 2px; }
