/*
Theme Name: TopcityJam Flix
Theme URI: https://topcityjam.xyz
Author: Your Name
Description: Dark-mode movie & series theme with performance mode.
Version: 1.0
License: GPL v2 or later
Text Domain: cinedark
*/

:root {
  --primary: #ffc000;
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-elevated: #1c1c1c;
  --text-primary: #f0f0f0;
  --text-secondary: #999;
  --border: #2a2a2a;
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { opacity: 0.85; }

img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-search input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius);
  width: 240px;
  outline: none;
}
.header-search input:focus { border-color: var(--primary); }

/* Layout */
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.content-sidebar-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; padding: 32px 0; }

/* Horizontal scroll sections */
.scroll-section { margin: 32px 0; }
.scroll-section h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  border-left: 3px solid var(--primary);
  padding-left: 12px;
}
.scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.scroll-row::-webkit-scrollbar { height: 6px; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Movie cards */
.movie-card {
  min-width: 160px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s;
}
.movie-card:hover { transform: translateY(-4px); }
.movie-card img { aspect-ratio: 2/3; object-fit: cover; }
.movie-card .card-info { padding: 10px; }
.movie-card .card-title { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Sidebar */
.widget { background: var(--bg-card); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.widget-title { font-size: 1rem; margin-bottom: 12px; color: var(--primary); }

/* Single post */
.single-movie-header { display: grid; grid-template-columns: 300px 1fr; gap: 32px; margin: 32px 0; }
.single-movie-poster img { border-radius: var(--radius); width: 100%; }
.meta-list { list-style: none; }
.meta-list li { margin: 8px 0; color: var(--text-secondary); }
.meta-list strong { color: var(--text-primary); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: #000; }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }

/* Download / Subtitle buttons */
.download-group { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.masked-link {
  position: relative;
  display: inline-block;
  padding: 12px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  color: var(--primary);
  cursor: pointer;
}
.masked-link.countdown-active { opacity: 0.6; pointer-events: none; }

/* Comments */
.comment-list { list-style: none; }
.comment-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.comment-flag { font-size: 1.2rem; }
.comment-spoiler { filter: blur(5px); cursor: pointer; transition: filter 0.2s; }
.comment-spoiler.revealed { filter: none; }
.comment-votes { display: flex; gap: 12px; margin-top: 8px; }
.vote-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; gap: 4px; }
.vote-btn.liked { color: var(--primary); }

/* Responsive */
@media (max-width: 900px) {
  .content-sidebar-layout { grid-template-columns: 1fr; }
  .single-movie-header { grid-template-columns: 1fr; }
  .header-search input { width: 140px; }
}

/* Performance mode: disables animations & heavy effects */
.performance-mode * {
  animation: none !important;
  transition: none !important;
  backdrop-filter: none !important;
}
.mobile-menu-toggle { display: none; background: none; border: none; flex-direction: column; gap: 4px; cursor: pointer; }
.mobile-menu-toggle span { width: 24px; height: 2px; background: var(--primary); }
.header-nav .nav-menu { display: flex; gap: 24px; list-style: none; }
.header-nav .nav-menu a { color: var(--text-primary); font-weight: 500; }
.header-nav .nav-menu a:hover { color: var(--primary); }
@media (max-width: 900px) {
  .mobile-menu-toggle { display: flex; }
  .header-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); padding: 16px; }
  .header-nav.open { display: block; }
  .header-nav .nav-menu { flex-direction: column; }
}
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 48px 0 24px; margin-top: 64px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 0.875rem; }
.footer-menu { display: flex; gap: 16px; list-style: none; }
@media (max-width: 600px) { .footer-bottom { flex-direction: column; gap: 12px; text-align: center; } }
.trending-list { list-style: none; }
.trending-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.trending-item:last-child { border-bottom: none; }
.trending-rank { font-size: 1.25rem; font-weight: 800; color: var(--primary); min-width: 24px; }
.trending-thumb img { width: 48px; height: 72px; object-fit: cover; border-radius: 4px; }
.trending-title { font-size: 0.9rem; font-weight: 600; display: block; }
.trending-meta { font-size: 0.75rem; color: var(--text-secondary); }
.card-poster { position: relative; }
.card-rating { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.8); color: var(--primary); padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }
.card-placeholder { aspect-ratio: 2/3; background: var(--bg-elevated); }
.card-year { font-size: 0.75rem; color: var(--text-secondary); }
.single-title { font-size: 2rem; margin-bottom: 16px; }
.star-rating { color: var(--primary); font-size: 1.1rem; margin-bottom: 16px; }
.star-rating .stars { font-weight: 700; }
.main-cast { margin: 24px 0; }
.cast-list { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.cast-item { background: var(--bg-elevated); padding: 8px 14px; border-radius: var(--radius); font-size: 0.9rem; }
.cast-role { color: var(--text-secondary); font-size: 0.8rem; margin-left: 4px; }
.action-buttons { display: flex; gap: 12px; margin: 24px 0; flex-wrap: wrap; }
.download-section { background: var(--bg-card); border-radius: var(--radius); padding: 24px; margin: 32px 0; }
.download-section h2 { font-size: 1.25rem; margin-bottom: 12px; color: var(--primary); }
.download-note { color: var(--text-secondary); margin-bottom: 16px; font-size: 0.9rem; }
.single-content { margin: 32px 0; line-height: 1.8; }
.section-title { font-size: 1.25rem; margin: 32px 0 16px; border-left: 3px solid var(--primary); padding-left: 12px; }
.hero-banner { position: relative; min-height: 380px; background-size: cover; background-position: center; border-radius: var(--radius); overflow: hidden; margin: 32px 0; display: flex; align-items: flex-end; }
.hero-overlay { background: linear-gradient(to top, rgba(0,0,0,0.95), transparent); padding: 40px 24px 24px; width: 100%; }
.hero-label { color: var(--primary); text-transform: uppercase; font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; }
.hero-overlay h1 { font-size: 2.2rem; margin: 8px 0 16px; }
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.genre-chip { display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); border: 1px solid var(--border); padding: 10px 14px; border-radius: var(--radius); color: var(--text-primary); font-size: 0.9rem; }
.genre-chip:hover { border-color: var(--primary); }
.genre-count { color: var(--primary); font-size: 0.75rem; font-weight: 700; }
.grid-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.load-more-wrap { text-align: center; margin-top: 24px; }
@media (max-width: 600px) { .hero-overlay h1 { font-size: 1.4rem; } }
.archive-header { margin: 32px 0 24px; }
.archive-title { font-size: 1.8rem; border-left: 4px solid var(--primary); padding-left: 16px; }
.archive-desc { color: var(--text-secondary); margin-top: 8px; }
.pagination { margin: 32px 0; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: 8px 14px; margin: 0 4px; background: var(--bg-card); border-radius: var(--radius); color: var(--text-primary); }
.pagination .current { background: var(--primary); color: #000; }
.error-404 { text-align: center; padding: 80px 0; }
.error-404 h1 { font-size: 6rem; color: var(--primary); line-height: 1; }
.error-404 p { color: var(--text-secondary); margin: 16px 0 24px; }
.error-404 .search-form { margin: 24px auto; max-width: 400px; display: flex; gap: 8px; }
.error-404 .search-field { flex: 1; padding: 10px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-primary); }
.comment-sort { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; color: var(--text-secondary); font-size: 0.9rem; }
.comment-sort a.active { color: var(--primary); font-weight: 700; }
.comment-meta time { font-size: 0.75rem; color: var(--text-secondary); margin-left: auto; }
.comment-body { margin-top: 8px; }
.comment-votes .vote-btn { font-size: 0.85rem; }
.vote-btn:hover { color: var(--primary); }
.comment-form textarea { width: 100%; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; color: var(--text-primary); font-family: inherit; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { width: 100%; background: var(--bg-elevated); border: 1px solid var(--border); padding: 10px; border-radius: var(--radius); color: var(--text-primary); margin-bottom: 10px; }
.comment-form-spoiler { margin-bottom: 16px; color: var(--text-secondary); font-size: 0.85rem; }
.filter-bar { position: sticky; top: 70px; z-index: 100; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 24px; }
.filter-toggle { display: none; width: 100%; background: none; border: none; color: var(--primary); font-weight: 700; text-align: left; cursor: pointer; }
.filter-body { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filter-select { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-primary); padding: 8px 12px; border-radius: var(--radius); flex: 1; min-width: 140px; }
@media (max-width: 700px) {
  .filter-toggle { display: block; }
  .filter-body { display: none; flex-direction: column; margin-top: 12px; }
  .filter-bar.open .filter-body { display: flex; }
  .filter-select { width: 100%; }
}
.suggestions-section { margin: 32px 0; }
.suggestions-list { list-style: none; }
.suggestion-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.suggestion-rank { font-size: 1.1rem; font-weight: 800; color: var(--primary); min-width: 28px; }
.suggestion-arrow { font-size: 0.75rem; min-width: 16px; color: var(--text-secondary); }
.suggestion-poster { width: 44px; height: 66px; object-fit: cover; border-radius: 4px; }
.suggestion-title { font-size: 0.95rem; font-weight: 600; }
.suggestion-meta { font-size: 0.8rem; color: var(--text-secondary); }
.new-badge { background: var(--primary); color: #000; font-size: 0.6rem; padding: 2px 6px; border-radius: 3px; margin-left: 8px; vertical-align: middle; font-weight: 800; }