/* ========================================
   Cima Now - Main Stylesheet
   ======================================== */

:root {
    --background: #0b0221;
    --background-secondary: #150a30;
    --primary: #ffb800;
    --primary-foreground: #0b0221;
    --accent: #6c2cf5;
    --text-primary: #ffffff;
    --text-secondary: #b9b1cc;
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.05);
    --card-bg: #150a30;
    --header-height: 70px;
    --container-max: 1440px;
    --radius: 10px;
    --transition: 0.3s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: color var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 15px; width: 100%; }

/* Header */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--header-height);
    background: rgba(11, 2, 33, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}
.header-content {
    max-width: var(--container-max); margin: 0 auto; padding: 0 5%;
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.header-right { display: flex; align-items: center; gap: 32px; height: 100%; }
.header-left { display: flex; align-items: center; gap: 20px; }
.logo img { height: 35px; width: auto; }
.nav-menu ul { display: flex; align-items: center; gap: 24px; height: 100%; }
.nav-menu a { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); }
.kids-link { display: flex; align-items: center; gap: 8px; }
.kids-icon { width: 20px; height: 20px; border-radius: 50%; }
.premium-btn {
    display: flex; align-items: center; gap: 8px;
    background: var(--primary); color: var(--primary-foreground);
    padding: 8px 16px; border-radius: 50px; font-size: 13px; font-weight: 800;
}
.premium-btn:hover { box-shadow: 0 0 20px rgba(255, 184, 0, 0.5); }
.search-box { position: relative; display: flex; align-items: center; }
.search-box input {
    background: rgba(255, 255, 255, 0.1); border: none; border-radius: 50px;
    padding: 8px 40px 8px 16px; font-size: 13px; color: var(--text-primary);
    width: 250px; outline: none; font-family: 'Cairo', sans-serif;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus { background: rgba(255, 255, 255, 0.2); box-shadow: 0 0 0 1px var(--primary); }
.search-box button { position: absolute; right: 12px; color: var(--text-muted); }
.search-box button:hover { color: var(--primary); }

/* Hero Slider */
.hero-slider {
    position: relative; width: 100%; height: 700px; overflow: hidden;
    background: var(--background); margin-top: var(--header-height);
}
.slides-container { position: relative; width: 100%; height: 100%; }
.slide {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 1s ease-in-out; z-index: 0;
}
.slide.active { opacity: 1; z-index: 10; }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.slide-bg img { width: 100%; height: 100%; object-fit: cover; }
.slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--background), transparent 50%, rgba(0, 0, 0, 0.3));
}
.slide-overlay-side {
    position: absolute; inset: 0;
    background: linear-gradient(to left, rgba(11, 2, 33, 0.8), rgba(11, 2, 33, 0.4) 50%, transparent);
}
.slide-content {
    position: relative; z-index: 10;
    max-width: var(--container-max); margin: 0 auto; padding: 0 5%;
    height: 100%; display: flex; align-items: center; justify-content: flex-end;
}
.slide-info { max-width: 650px; text-align: right; }
.slide-logo {
    max-height: 140px; margin-bottom: 24px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    animation: fadeInRight 0.7s ease;
}
.slide-meta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
    gap: 16px; margin-bottom: 16px; font-size: 13px; font-weight: 600;
}
.slide-meta .category { background: var(--accent); padding: 2px 8px; border-radius: 2px; }
.slide-meta .year { background: rgba(255, 255, 255, 0.1); padding: 2px 8px; border-radius: 2px; }
.slide-description { color: var(--text-secondary); font-size: 15px; line-height: 1.8; margin-bottom: 16px; }
.slide-actors { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; font-size: 14px; margin-bottom: 32px; }
.slide-actors a:hover { color: var(--primary); }
.slide-actors .divider { color: rgba(255, 255, 255, 0.3); }
.slide-buttons { display: flex; flex-direction: row-reverse; align-items: center; gap: 16px; }
.btn-watch {
    display: flex; align-items: center; gap: 8px;
    background: var(--primary); color: var(--primary-foreground);
    padding: 12px 32px; border-radius: 6px; font-size: 16px; font-weight: 700;
    box-shadow: 0 0 20px rgba(255, 184, 0, 0.3);
}
.btn-watch:hover { filter: brightness(1.1); transform: scale(1.02); }
.btn-list {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, 0.1); color: var(--text-primary);
    padding: 12px 32px; border-radius: 6px; font-size: 16px; font-weight: 700;
    border: 1px solid var(--border-color); backdrop-filter: blur(10px);
}
.btn-list:hover { background: rgba(255, 255, 255, 0.2); }
.slider-nav {
    position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 20;
    display: flex; flex-direction: row-reverse; gap: 24px; overflow-x: auto; max-width: 90vw; padding-bottom: 8px;
}
.slider-nav::-webkit-scrollbar { display: none; }
.slider-thumb {
    flex-shrink: 0; width: 120px; height: 45px; border-radius: 6px; overflow: hidden;
    border: 2px solid transparent; opacity: 0.6; filter: grayscale(1); cursor: pointer;
    transition: all var(--transition); background: rgba(255, 255, 255, 0.2);
}
.slider-thumb:hover { opacity: 1; filter: grayscale(0); }
.slider-thumb.active {
    border-color: var(--primary); opacity: 1; filter: grayscale(0);
    transform: scale(1.1); box-shadow: 0 4px 20px rgba(255, 184, 0, 0.2);
}
.slider-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }

/* Sections */
.section { padding: 40px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-title { display: flex; align-items: center; gap: 8px; }
.section-title h2 { font-size: 22px; font-weight: 750; color: var(--text-primary); }
.title-bar { width: 6px; height: 24px; background: var(--primary); border-radius: 50px; }
.badge-new {
    background: var(--primary); color: var(--primary-foreground);
    font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 2px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.view-all {
    font-size: 13px; color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05); padding: 4px 12px; border-radius: 4px;
}
.view-all:hover { background: var(--primary); color: var(--primary-foreground); }
.ramadan-hint { color: var(--primary); font-size: 14px; font-weight: 600; margin-bottom: 24px; }

/* Movies Grid */
.movies-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 15px; }
.movie-card {
    position: relative; display: block; border-radius: var(--radius); overflow: hidden;
    background: var(--card-bg); transition: transform var(--transition), box-shadow var(--transition);
}
.movie-card:hover { transform: scale(1.05); z-index: 10; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.movie-poster { position: relative; aspect-ratio: 2/3; overflow: hidden; }
.movie-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.movie-card:hover .movie-poster img { transform: scale(1.1); }
.movie-badges {
    position: absolute; top: 0; left: 0; right: 0; padding: 8px;
    display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none;
}
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 2px; }
.badge-quality { background: var(--accent); color: var(--text-primary); }
.badge-year { background: var(--primary); color: var(--primary-foreground); font-weight: 700; }
.badge-episode {
    position: absolute; bottom: 8px; left: 8px;
    background: var(--accent); color: var(--text-primary); padding: 2px 6px; border-radius: 2px;
    display: flex; flex-direction: column; align-items: center; min-width: 32px;
}
.badge-episode .label { font-size: 9px; opacity: 0.8; line-height: 1; }
.badge-episode .number { font-size: 11px; font-weight: 700; line-height: 1; margin-top: 2px; }
.movie-title {
    padding: 8px; font-size: 13px; font-weight: 600; text-align: center; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.movie-card:hover .movie-title { color: var(--primary); }
.movie-card::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg); transition: left 0.5s ease; pointer-events: none;
}
.movie-card:hover::after { left: 100%; }

/* Ad Banner */
.ad-banner { padding: 40px 0; }
.banner-content {
    position: relative; width: 100%; height: 250px; border-radius: var(--radius); overflow: hidden;
    background-color: #a80000; background-position: center; background-size: cover; display: flex; align-items: center;
}
.banner-text { position: relative; z-index: 10; padding: 24px 48px; max-width: 50%; text-align: center; }
.banner-text h2 { font-size: 34px; font-weight: 800; color: var(--text-primary); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); margin-bottom: 8px; }
.banner-text .desktop-only { font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, 0.9); margin-bottom: 16px; }
.subscribe-btn {
    display: inline-block; background: var(--primary); color: var(--primary-foreground);
    padding: 10px 32px; border-radius: 50px; font-size: 18px; font-weight: 800;
    box-shadow: 0 0 20px rgba(255, 184, 0, 0.4);
}
.subscribe-btn:hover { transform: scale(1.05); }
.banner-features { font-size: 11px; color: rgba(255, 255, 255, 0.8); margin-top: 12px; }

/* Category Tiles */
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.category-tile {
    position: relative; height: 150px; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(135deg, #1c0f45, var(--background));
    border: 1px solid var(--border-color);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.category-tile:hover { transform: scale(1.03); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.category-tile::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%) skewX(-25deg); transition: transform 1s ease;
}
.category-tile:hover::after { transform: translateX(100%) skewX(-25deg); }
.category-name { font-size: 32px; font-weight: 800; color: var(--text-primary); }
.category-name.english { font-weight: 900; letter-spacing: -1px; }
.kids-dots { display: flex; gap: 4px; margin-bottom: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.blue { background: #60a5fa; }
.dot.yellow { background: #fbbf24; }

/* News Grid */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.news-card {
    position: relative; display: block; border-radius: var(--radius); overflow: hidden;
    background: var(--card-bg); min-height: 200px;
}
.news-card:hover { transform: scale(1.02); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.news-image { width: 100%; height: 200px; overflow: hidden; }
.news-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.news-card:hover .news-image img { transform: scale(1.1); }
.news-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--background), transparent 60%); opacity: 0.8;
}
.news-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 15px; z-index: 10; }
.news-title {
    font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card:hover .news-title { color: var(--primary); }

/* Footer */
.footer { padding: 40px 15px; border-top: 1px solid var(--border-color); text-align: center; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 20px; margin-bottom: 15px; }
.footer-nav a { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.footer-nav a:hover { color: #ff3d00; }
.footer-nav .divider { color: rgba(255, 255, 255, 0.1); font-size: 12px; }
.copyright { font-size: 12px; color: var(--text-secondary); }
.copyright span { color: var(--text-primary); }

/* Animations */
.shine-effect { position: relative; overflow: hidden; }
.shine-effect::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg); animation: shine 3s infinite;
}
@keyframes shine { from { left: -100%; } to { left: 100%; } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--card-bg) 25%, #1f1245 50%, var(--card-bg) 75%);
    background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: var(--radius);
}
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Responsive */
@media (max-width: 1200px) { .movies-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 992px) {
    .nav-menu { display: none; }
    .movies-grid { grid-template-columns: repeat(4, 1fr); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-slider { height: 500px; }
    .slide-info { max-width: 100%; padding: 0 20px; }
    .banner-text { max-width: 100%; text-align: center; }
}
@media (max-width: 768px) {
    .movies-grid { grid-template-columns: repeat(3, 1fr); }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .search-box { display: none; }
    .hero-slider { height: 450px; }
    .slide-logo { max-height: 80px; }
    .slide-description, .slide-actors { display: none; }
    .banner-content { height: 180px; }
    .banner-text h2 { font-size: 22px; }
}
@media (max-width: 576px) {
    .movies-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .news-grid { grid-template-columns: 1fr; }
    .categories-grid { gap: 10px; }
    .category-tile { height: 100px; }
    .category-name { font-size: 24px; }
    .section-title h2 { font-size: 18px; }
    .slide-buttons { flex-direction: column; gap: 8px; }
    .btn-watch, .btn-list { padding: 10px 24px; font-size: 14px; }
}