/*
Theme Name: CinemaFlix
Theme URI: https://example.com
Author: CinemaFlix Team
Description: Dark Movie Download & Review WordPress Theme - BollyFlix Style
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: cinemaflix
Tags: dark, movies, entertainment, responsive, custom-menu, featured-images
*/

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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #1a1a24;
    --bg-hover: #22222f;
    --accent: #e50914;
    --accent-hover: #ff1a26;
    --accent-2: #f5a623;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #666677;
    --border: #2a2a3a;
    --badge-hd: #1a73e8;
    --badge-cam: #e67e22;
    --badge-new: #27ae60;
    --nav-bg: #0d0d15;
    --header-height: 65px;
}

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

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--text-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =============================================
   SCROLLBAR
============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* =============================================
   HEADER & TOP BAR
============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--nav-bg);
    border-bottom: 2px solid var(--accent);
    box-shadow: 0 2px 20px rgba(229,9,20,0.3);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: var(--header-height);
    gap: 20px;
}

/* Logo */
.site-branding .site-title {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
}
.site-branding .site-title a {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search Bar */
.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}
.header-search form { display: flex; }
.header-search input {
    width: 100%;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 25px 0 0 25px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.header-search input:focus { border-color: var(--accent); }
.header-search input::placeholder { color: var(--text-muted); }
.header-search button {
    padding: 8px 16px;
    background: var(--accent);
    border: none;
    border-radius: 0 25px 25px 0;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
.header-search button:hover { background: var(--accent-hover); }

/* Hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: auto;
}

/* =============================================
   NAVIGATION MEGA MENU
============================================= */
.main-navigation { flex: 1; }

.main-navigation ul { display: flex; gap: 2px; }

.main-navigation > ul > li {
    position: relative;
}

.main-navigation > ul > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    white-space: nowrap;
    color: var(--text-primary);
    transition: all 0.2s;
}

.main-navigation > ul > li > a:hover,
.main-navigation > ul > li.current-menu-item > a {
    background: var(--accent);
    color: white;
}

/* Dropdown */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: 0 0 8px 8px;
    min-width: 200px;
    flex-direction: column;
    gap: 0;
    z-index: 9998;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.main-navigation ul ul li a {
    display: block;
    padding: 10px 18px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}
.main-navigation ul ul li:last-child a { border-bottom: none; }
.main-navigation ul ul li a:hover {
    background: var(--bg-hover);
    color: var(--accent);
    padding-left: 24px;
}

.main-navigation li:hover > ul { display: flex; }

/* =============================================
   TICKER / ANNOUNCEMENT BAR
============================================= */
.ticker-bar {
    background: var(--accent);
    padding: 6px 0;
    overflow: hidden;
    font-size: 0.82rem;
    font-weight: 600;
}
.ticker-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.ticker-label {
    background: rgba(0,0,0,0.3);
    padding: 2px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.75rem;
    text-transform: uppercase;
}
.ticker-content { overflow: hidden; flex: 1; }
.ticker-scroll {
    display: flex;
    gap: 40px;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}
@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* =============================================
   QUICK LINKS BAR
============================================= */
.quick-links-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    overflow-x: auto;
}
.quick-links-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 8px;
    align-items: center;
}
.quick-link {
    padding: 5px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.2s;
}
.quick-link:hover, .quick-link.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* =============================================
   MAIN LAYOUT
============================================= */
.site-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 25px;
}

/* Full width pages */
.full-width .site-main {
    grid-template-columns: 1fr;
}

/* =============================================
   SECTION HEADERS
============================================= */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    position: relative;
}
.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
}
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title .icon { color: var(--accent); }
.view-all {
    font-size: 0.8rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}
.view-all:hover { background: var(--accent); color: white; }

/* =============================================
   MOVIE CARDS GRID
============================================= */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.movie-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
    position: relative;
}
.movie-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(229,9,20,0.2);
}

.movie-card-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}
.movie-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.movie-card:hover .movie-card-poster img { transform: scale(1.05); }

/* Overlay on hover */
.movie-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 15px;
}
.movie-card:hover .movie-card-overlay { opacity: 1; }
.movie-download-btn {
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    width: 100%;
    text-align: center;
    transition: background 0.2s;
}
.movie-download-btn:hover { background: var(--accent-hover); color: white; }

/* Badges */
.movie-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-hd { background: var(--badge-hd); }
.badge-cam { background: var(--badge-cam); }
.badge-new { background: var(--badge-new); }
.badge-hdts { background: #8e44ad; }
.badge-dvd { background: #16a085; }

/* Rating badge */
.movie-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--accent-2);
    color: var(--accent-2);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* Card Info */
.movie-card-info {
    padding: 10px;
}
.movie-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.movie-card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.movie-year {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.movie-quality-tag {
    font-size: 0.68rem;
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: 1px 6px;
    border-radius: 3px;
}

/* =============================================
   FEATURED / HERO SECTION
============================================= */
.hero-section {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(229,9,20,0.05) 0%, transparent 70%);
}

/* =============================================
   SINGLE POST / MOVIE DETAIL
============================================= */
.movie-detail-header {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 25px;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid var(--border);
    margin-bottom: 25px;
}
.movie-poster-large {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.movie-poster-large img { width: 100%; }

.movie-detail-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}
.movie-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}
.meta-chip {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.meta-chip strong { color: var(--accent); }

.movie-description {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Download Buttons */
.download-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.download-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--accent);
    text-transform: uppercase;
}
.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s;
    text-transform: uppercase;
}
.dl-btn-primary { background: var(--accent); color: white; }
.dl-btn-primary:hover { background: var(--accent-hover); color: white; }
.dl-btn-secondary { background: var(--badge-hd); color: white; }
.dl-btn-secondary:hover { opacity: 0.85; color: white; }
.dl-btn-gdrive { background: #fbbc04; color: #000; }
.dl-btn-gdrive:hover { opacity: 0.85; color: #000; }

/* =============================================
   SIDEBAR
============================================= */
.sidebar { min-width: 0; }

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
}
.widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    color: var(--text-primary);
}

/* Recent Posts Widget */
.widget ul li {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}
.widget ul li:last-child { border-bottom: none; }
.widget-thumb {
    width: 60px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
.widget-thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-item-title {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
    transition: color 0.2s;
}
.widget-item-title:hover { color: var(--accent); }

/* Category Widget */
.widget .cat-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}
.widget .cat-list li a { font-size: 0.85rem; color: var(--text-secondary); }
.widget .cat-list li a:hover { color: var(--accent); }
.cat-count {
    background: var(--accent);
    color: white;
    font-size: 0.72rem;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 700;
}

/* =============================================
   PAGINATION
============================================= */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* =============================================
   FOOTER
============================================= */
.site-footer {
    background: var(--nav-bg);
    border-top: 2px solid var(--accent);
    margin-top: 40px;
    padding: 40px 0 20px;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: var(--accent);
    letter-spacing: 1px;
}
.footer-widget p, .footer-widget li {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.footer-widget li a { color: var(--text-muted); transition: color 0.2s; }
.footer-widget li a:hover { color: var(--accent); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.footer-bottom a { color: var(--accent); }

.disclaimer {
    background: rgba(229,9,20,0.08);
    border: 1px solid rgba(229,9,20,0.2);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* =============================================
   NOTICES & ALERTS
============================================= */
.site-notice {
    background: var(--bg-card);
    border-left: 3px solid var(--accent);
    padding: 10px 16px;
    margin: 15px 0;
    font-size: 0.85rem;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.notice-close { cursor: pointer; color: var(--text-muted); background: none; border: none; font-size: 1.2rem; }

/* =============================================
   TAG CLOUD
============================================= */
.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tagcloud a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.78rem !important;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.tagcloud a:hover { background: var(--accent); border-color: var(--accent); color: white; }

/* =============================================
   BREADCRUMB
============================================= */
.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb-sep { color: var(--text-muted); }

/* =============================================
   SEARCH RESULTS
============================================= */
.search-header {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.search-header strong { color: var(--accent); }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1200px) {
    .movies-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
}

@media (max-width: 992px) {
    .site-main { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .movie-detail-header { grid-template-columns: 170px 1fr; }
}

@media (max-width: 768px) {
    .main-navigation { display: none; }
    .main-navigation.toggled { display: block; }
    .main-navigation ul { flex-direction: column; padding: 10px 0; }
    .main-navigation ul ul { position: static; border: none; box-shadow: none; background: var(--bg-hover); }
    .menu-toggle { display: block; }
    .header-search { max-width: 100%; }
    .movie-detail-header { grid-template-columns: 1fr; }
    .movie-poster-large { max-width: 200px; margin: 0 auto; }
    .movies-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
    .site-main { padding: 15px; }
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 15px; gap: 10px; }
}

@media (max-width: 480px) {
    .movies-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .site-branding .site-title { font-size: 1.4rem; }
}
