/* ===================================================================
   GOAT FLIX - Shared Styles (used across all pages)
   =================================================================== */

:root {
    --bg-main: #10101a; --bg-sec: #181826; --primary: #7b5cff; --primary-hover: #6244df;
    --text-main: #ffffff; --text-muted: #a0a0b0; --hd-green: #00d26a; --badge-bg: #2a2a3c;
    --search-bg: #1e1e38; --search-header: #252545; --border: rgba(255,255,255,0.1);
    --header-bg: rgba(16,16,26,0.95);
    --logo-shadow: rgba(255,0,0,0.5);
    --input-bg: rgba(255,255,255,0.05);
    --card-bg: var(--bg-sec);
    --fs-xs: clamp(0.65rem, 1.5vw, 0.75rem);
    --fs-sm: clamp(0.75rem, 2vw, 0.85rem);
    --fs-base: clamp(0.85rem, 2.5vw, 1rem);
    --fs-lg: clamp(1rem, 3vw, 1.2rem);
    --fs-xl: clamp(1.2rem, 4vw, 1.5rem);
    --fs-2xl: clamp(1.5rem, 5vw, 2rem);
    --fs-3xl: clamp(1.8rem, 6vw, 3rem);
}


* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); overflow-x: hidden; }

/* ---- HEADER ---- */
header { display: flex; justify-content: space-between; align-items: center; padding: 15px 4%; background: var(--header-bg); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--border); }
.logo-container { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.logo-container img { height: 45px; border-radius: 50%; box-shadow: 0 0 10px var(--logo-shadow); }
.logo-text { font-size: var(--fs-xl); font-weight: 800; letter-spacing: 1px; color: #fff; }

/* ---- NAVIGATION ---- */
.nav-center { display: flex; align-items: center; flex: 1; margin-left: 30px; }
.nav-links { display: flex; align-items: center; gap: 25px; height: 100%; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 600; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.dropdown { position: relative; display: flex; align-items: center; height: 100%; padding: 10px 0; }
.dropdown-menu { position: absolute; top: 100%; left: -50px; background: var(--search-bg); border: 1px solid var(--border); border-radius: 12px; padding: 25px; min-width: 400px; box-shadow: 0 15px 40px rgba(0,0,0,0.8); opacity: 0; visibility: hidden; transition: all 0.3s ease; margin-top: 15px; z-index: 2000; }
.dropdown-menu::before { content: ''; position: absolute; top: -15px; left: 0; width: 100%; height: 15px; }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; margin-top: -5px; }
.dropdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; }
.dropdown-item { display: flex; align-items: center; gap: 12px; color: var(--text-muted) !important; font-weight: 500 !important; font-size: 0.95rem; transition: 0.2s; text-decoration: none; }
.dropdown-item i { width: 18px; text-align: center; opacity: 0.7; font-size: 1rem; }
.dropdown-item:hover { color: white !important; }
.dropdown-item:hover i { color: var(--primary); opacity: 1; }

/* ---- NAV ACTIONS ---- */
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-search { display: flex; align-items: center; background: var(--input-bg); padding: 8px 15px; border-radius: 20px; border: 1px solid var(--border); cursor: pointer; margin-left: auto; width: 250px; transition: 0.3s; min-height: 44px; }
.nav-search:hover { border-color: rgba(255,255,255,0.3); }
.nav-search input { background: transparent; border: none; color: var(--text-main); outline: none; margin-left: 10px; cursor: pointer; pointer-events: none; width: 100%; font-size: var(--fs-base); }
.icon-btn { background: var(--bg-sec); border: none; color: white; width: 40px; height: 40px; min-width: 44px; min-height: 44px; border-radius: 10px; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; }
.icon-btn:hover { background: var(--primary); }
.mobile-search-btn, .mobile-menu-btn { display: none; }

/* ---- MOBILE MENU ---- */
.mobile-menu { position: fixed; top: 76px; left: 0; width: 100%; background: var(--bg-sec); padding: 20px; flex-direction: column; gap: 15px; z-index: 999; display: none; border-bottom: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.mobile-menu.active { display: flex; }
.mobile-menu a { color: white; text-decoration: none; font-size: 1.1rem; font-weight: 600; padding: 12px; background: rgba(255,255,255,0.02); border-radius: 8px; text-align: center; border: 1px solid rgba(255,255,255,0.05); transition: 0.3s; }
.mobile-menu a:hover { background: rgba(255,255,255,0.1); color: var(--primary); }

/* ---- SEARCH OVERLAY ---- */
.search-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 2500; display: none; justify-content: center; align-items: flex-start; padding-top: 120px; backdrop-filter: blur(5px); }
.search-modal-box { background: var(--search-bg); width: 90%; max-width: 650px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.8); overflow: hidden; border: 1px solid rgba(255,255,255,0.15); }
.search-header { display: flex; align-items: center; padding: 15px 20px; background: var(--search-header); border-bottom: 1px solid rgba(255,255,255,0.1); }
.search-header svg { width: 20px; height: 20px; fill: #888; }
.search-header input { flex: 1; background: transparent; border: none; color: white; font-size: 1.1rem; outline: none; margin-left: 15px; }
.close-btn { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #aaa; padding: 4px 8px; min-width: 44px; min-height: 44px; border-radius: 6px; cursor: pointer; font-size: 1rem; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; }
.close-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.search-results { max-height: 400px; overflow-y: auto; padding: 10px 0; }
.search-empty { text-align: center; color: #888; padding: 40px 20px; font-size: 0.95rem; }
.search-item { display: flex; padding: 12px 20px; gap: 15px; align-items: center; cursor: pointer; transition: 0.2s; border-bottom: 1px solid rgba(255,255,255,0.03); }
.search-item:hover { background: rgba(255,255,255,0.08); }
.search-item img { width: 45px; height: 65px; object-fit: cover; border-radius: 6px; }
.search-item-info { display: flex; flex-direction: column; }
.search-item-title { font-weight: bold; font-size: 1rem; color: #fff; }
.search-item-meta { font-size: 0.8rem; color: #999; margin-top: 5px; }

/* ---- ADS ---- */
.goat-ad-container { width: 100%; display: flex; justify-content: center; align-items: center; margin: 30px 0; overflow: hidden; text-align: center; }
.desktop-ad { display: block; }
.mobile-ad { display: none; }

/* ---- FOOTER ---- */
footer { background: var(--bg-sec); padding: 50px 4% 20px 4%; margin-top: 50px; border-top: 1px solid rgba(255,255,255,0.05); content-visibility: auto; contain-intrinsic-size: 300px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.footer-col h3 { font-size: 1.1rem; margin-bottom: 20px; letter-spacing: 1px; }
.footer-col p { color: var(--text-muted); line-height: 1.6; font-size: 0.9rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: 0.3s; }
.footer-col ul a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); color: var(--text-muted); font-size: 0.85rem; }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: var(--text-muted); text-decoration: none; }
.footer-legal a:hover { color: var(--primary); }
.back-to-top { background: var(--primary); width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; cursor: pointer; text-decoration: none; }

/* ---- CARD SYSTEM ---- */
.card { position: relative; cursor: pointer; transition: 0.3s; display: flex; flex-direction: column; will-change: transform; }
.card:hover { transform: translateY(-8px); }
.card-img-box { position: relative; width: 100%; aspect-ratio: 2/3; border-radius: 12px; overflow: hidden; background: var(--bg-sec); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.card-img-box img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hd-badge { position: absolute; top: 8px; right: 8px; background: var(--hd-green); color: black; font-size: 0.7rem; font-weight: bold; padding: 2px 6px; border-radius: 4px; z-index: 10; }
.card-details { padding-top: 10px; }
.card-title { font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--text-muted); }
.type-badge { background: var(--badge-bg); padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; }

/* ---- PAGINATION ---- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 40px; }
.page-info { color: var(--text-muted); font-size: 0.9rem; }
.btn-next { background: var(--bg-sec); color: white; border: 1px solid rgba(255,255,255,0.1); padding: 8px 20px; min-height: 44px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
.btn-next:hover { background: var(--primary); border-color: var(--primary); }
.btn-next:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- BROWSE / TAGS ---- */
.browse-more-box { background: var(--bg-sec); border-radius: 12px; padding: 30px; margin-bottom: 30px; border: 1px solid rgba(255,255,255,0.05); }
.browse-more-box h2 { font-size: 1.2rem; margin-bottom: 20px; }
.tag-group { margin-bottom: 20px; }
.tag-group h4 { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px; font-weight: 500; }
.tags-container { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-pill { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); padding: 6px 15px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 20px; font-size: 0.85rem; cursor: pointer; transition: 0.3s; text-decoration: none; }
.tag-pill:hover { background: rgba(255,255,255,0.1); color: white; }
.tag-pill.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ---- PAGE COMMON ---- */
.page-container { padding: 20px 4%; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.page-title h1 { font-size: var(--fs-2xl); font-weight: 800; margin-bottom: 5px; }
.page-title p { color: var(--text-muted); font-size: var(--fs-sm); }

/* ---- FILTERS ---- */
.filter-bar { background: var(--bg-sec); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 15px 20px; display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; }
.filter-select { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white; padding: 10px 15px; min-height: 44px; border-radius: 6px; outline: none; cursor: pointer; font-size: 0.9rem; min-width: 150px; }
.filter-select option { background: var(--bg-sec); color: white; }

/* ---- MOVIE GRID ---- */
.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 15px; margin-bottom: 40px; }
@media (max-width: 600px) { .movie-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px 10px; } }
@media (max-width: 380px) { .movie-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px 8px; } }

/* ---- HEADER TABS ---- */
.header-tabs { display: flex; gap: 10px; }
.tab-btn { background: var(--bg-sec); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.05); padding: 10px 20px; min-height: 44px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: 0.3s; }
.tab-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ---- EMPTY STATE ---- */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .svg-icon { font-size: var(--fs-3xl); color: var(--primary); margin-bottom: 15px; }
.empty-state a { display: inline-block; margin-top: 15px; background: var(--primary); color: white; padding: 12px 25px; border-radius: 8px; text-decoration: none; font-weight: 600; }

/* ---- BOTTOM NAV (mobile) ---- */
.bottom-nav { display: none; }
@media (max-width: 900px) {
    .nav-links, .nav-search { display: none; }
    .mobile-search-btn, .mobile-menu-btn { display: flex; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; width: 100%; background: var(--header-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--border); z-index: 1000; justify-content: space-around; padding: 8px 0 env(safe-area-inset-bottom, 8px) 0; }
    .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text-muted); text-decoration: none; font-size: 0.65rem; min-width: 44px; min-height: 44px; justify-content: center; transition: 0.2s; }
    .bottom-nav a .svg-icon { width: 22px; height: 22px; }
    .bottom-nav a.active { color: var(--primary); }
    .bottom-nav a.active .svg-icon { fill: var(--primary); }
    body { padding-bottom: 65px; }
}
/* Tablet vertical (portrait) = app-like (bottom nav) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .nav-links, .nav-search { display: none; }
    .mobile-search-btn, .mobile-menu-btn { display: flex; }
    .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; width: 100%; background: var(--header-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--border); z-index: 1000; justify-content: space-around; padding: 8px 0 env(safe-area-inset-bottom, 8px) 0; }
    .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text-muted); text-decoration: none; font-size: 0.65rem; min-width: 44px; min-height: 44px; justify-content: center; transition: 0.2s; }
    .bottom-nav a .svg-icon { width: 22px; height: 22px; }
    .bottom-nav a.active { color: var(--primary); }
    body { padding-bottom: 65px; }
}
/* Tablet horizontal (landscape) = PC-like (keep desktop nav) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .bottom-nav { display: none; }
    .nav-links, .nav-search { display: flex; }
    .mobile-search-btn, .mobile-menu-btn { display: flex; }
}
/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .nav-links { gap: 18px; }
    .nav-search { width: 200px; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (max-width: 768px) {
    .desktop-ad { display: none; }
    .mobile-ad { display: block; }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .page-container { padding: 15px 4%; }
    .search-overlay { padding-top: 80px; }
    .search-modal-box { width: 94%; }
    .browse-more-box { padding: 20px; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
    .content { padding: 15px 4%; }
}
@media (max-width: 380px) {
    .logo-text { font-size: var(--fs-lg); }
}

/* ---- LOAD MORE ---- */
.load-more-btn { display: block; margin: 15px auto; background: var(--bg-sec); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); padding: 10px 25px; min-height: 44px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: 0.3s; will-change: transform; }
.load-more-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.load-more-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- SVG ICONS (replaces Font Awesome) ---- */
.svg-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.svg-spin { animation: svg-spin 1.5s linear infinite; }
@keyframes svg-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
