/* ============================================
   STARTER THEME - Container Grid Layout
   Clean, modern, no sliders
   ============================================ */

:root {
  --st-bg: #111118;
  --st-bg-light: #16161f;
  --st-bg-card: #1c1c28;
  --st-bg-card-hover: #22222f;
  --st-bg-elevated: #262632;
  --st-accent: #e53e3e;
  --st-accent-hover: #f56565;
  --st-accent-glow: rgba(229, 62, 62, 0.2);
  --st-text: #e8e8f0;
  --st-text-muted: #8888a0;
  --st-text-dim: #55556a;
  --st-border: rgba(255,255,255,0.06);
  --st-border-hover: rgba(255,255,255,0.12);
  --st-radius: 12px;
  --st-radius-sm: 8px;
  --st-container: 1280px;
  --st-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --st-transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --st-shadow: 0 8px 32px rgba(0,0,0,0.4);
  --st-shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --st-navbar-height: 64px;
}

/* ---- Global ---- */
html { scroll-behavior: smooth; }

body {
  background: var(--st-bg);
  color: var(--st-text);
  font-family: 'Kanit', 'Inter', -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  padding-top: var(--st-navbar-height);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--st-accent); text-decoration: none; transition: color var(--st-transition); }
a:hover { color: var(--st-accent-hover); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--st-bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--st-accent); }

::selection { background: var(--st-accent); color: #fff; }

/* ---- Container ---- */
.st-container {
  width: 100%;
  max-width: var(--st-container);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .st-container { padding: 0 16px; }
}

/* ============================================
   NAVBAR
   ============================================ */
.st-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--st-navbar-height);
  background: rgba(17, 17, 24, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--st-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background 0.3s, box-shadow 0.3s;
}

.st-navbar.scrolled {
  background: rgba(17, 17, 24, 0.96);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.st-navbar-inner {
  width: 100%;
  max-width: var(--st-container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.st-navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  flex-shrink: 0;
}

.st-navbar-brand img {
  height: 36px;
  transition: var(--st-transition);
}

.st-navbar-brand:hover img { transform: scale(1.05); }

/* Search */
.st-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.st-search input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border-radius: 50px;
  border: 1px solid var(--st-border);
  background: var(--st-bg-light);
  color: var(--st-text);
  font-size: 0.88rem;
  outline: none;
  transition: var(--st-transition);
}

.st-search input::placeholder { color: var(--st-text-dim); }

.st-search input:focus {
  border-color: var(--st-accent);
  box-shadow: 0 0 0 3px var(--st-accent-glow);
}

.st-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--st-text-dim);
  font-size: 0.85rem;
}

/* Nav actions */
.st-navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.st-navbar-actions a {
  color: var(--st-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--st-radius-sm);
  transition: var(--st-transition);
  text-decoration: none !important;
}

.st-navbar-actions a:hover {
  color: var(--st-text);
  background: rgba(255,255,255,0.04);
}

.st-navbar-btn {
  background: var(--st-accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 8px 18px !important;
}

.st-navbar-btn:hover {
  background: var(--st-accent-hover) !important;
  box-shadow: 0 4px 12px var(--st-accent-glow);
}

@media (max-width: 768px) {
  .st-search { max-width: 200px; }
  .st-navbar-actions .st-nav-text { display: none; }
  .st-navbar-inner { padding: 0 12px; }
}

/* ============================================
   HERO SECTION (compact banner)
   ============================================ */
.st-hero {
  padding: 32px 0 24px;
}

.st-hero-inner {
  background: linear-gradient(135deg, var(--st-bg-card), var(--st-bg-elevated));
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.st-hero-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--st-accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.st-hero-text h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--st-text);
  margin: 0 0 6px;
}

.st-hero-text p {
  color: var(--st-text-muted);
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 768px) {
  .st-hero-inner { padding: 20px; flex-direction: column; align-items: flex-start; }
  .st-hero-text h1 { font-size: 1.2rem; }
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.st-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--st-border);
  position: relative;
}

.st-section-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--st-accent);
  border-radius: 2px;
}

.st-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--st-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.st-section-title i {
  color: var(--st-accent);
  font-size: 1rem;
}

.st-section-count {
  font-size: 0.75rem;
  color: var(--st-text-dim);
  background: rgba(255,255,255,0.04);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--st-border);
}

/* ============================================
   MOVIE GRID
   ============================================ */
.st-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px 14px;
}

@media (max-width: 1024px) { .st-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
@media (max-width: 768px) { .st-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (max-width: 480px) { .st-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ---- Movie Card ---- */
.st-card {
  text-decoration: none !important;
  color: inherit;
  border-radius: var(--st-radius);
  overflow: hidden;
  background: var(--st-bg-card);
  border: 1px solid var(--st-border);
  transition: all var(--st-transition);
  display: flex;
  flex-direction: column;
}

.st-card:hover {
  transform: translateY(-6px);
  border-color: var(--st-accent);
  box-shadow: var(--st-shadow), 0 0 20px var(--st-accent-glow);
}

.st-card-poster {
  position: relative;
  width: 100%;
  padding-top: 140%;
  overflow: hidden;
  background: var(--st-bg);
}

.st-card-poster img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.4s;
}

.st-card:hover .st-card-poster img {
  transform: scale(1.06);
  filter: brightness(0.6);
}

/* Play button */
.st-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 48px;
  height: 48px;
  background: var(--st-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: transform var(--st-transition-bounce);
  box-shadow: 0 4px 20px var(--st-accent-glow);
  pointer-events: none;
}

.st-card-play i { font-size: 1.1rem; color: #fff; margin-left: 2px; }

.st-card:hover .st-card-play { transform: translate(-50%, -50%) scale(1); }

/* Badges */
.st-card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  z-index: 3;
  pointer-events: none;
}

.st-badge-score {
  background: rgba(0,0,0,0.7);
  color: #fbbf24;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  backdrop-filter: blur(4px);
}

.st-badge-res {
  background: var(--st-accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Gradient overlay */
.st-card-poster::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(28,28,40,0.9));
  pointer-events: none;
  z-index: 1;
}

/* Overlay title on poster */
.st-card-overlay-title {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  z-index: 2;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s ease;
}

.st-card:hover .st-card-overlay-title {
  opacity: 1;
  transform: translateY(0);
}

/* Card body */
.st-card-body {
  padding: 12px;
  flex: 1;
}

.st-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--st-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 4px;
  transition: color 0.3s;
}

.st-card:hover .st-card-title { color: var(--st-accent); }

.st-card-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.st-card-meta-tag {
  font-size: 0.62rem;
  color: var(--st-text-dim);
  background: rgba(255,255,255,0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============================================
   FOOTER
   ============================================ */
.st-footer {
  margin-top: 60px;
  padding: 30px 0;
  border-top: 1px solid var(--st-border);
  text-align: center;
  color: var(--st-text-dim);
  font-size: 0.82rem;
}

/* ============================================
   CONTENT MAIN (with sidebar)
   ============================================ */
.nf-main-container {
  max-width: var(--st-container);
  margin: 0 auto;
  padding: 0 24px;
}

.nf-main-container > .row {
  margin: 0;
}

.nf-main-container .col-lg-15 {
  flex: 0 0 75%;
  max-width: 75%;
  padding-right: 24px;
}

.nf-main-container .col-lg-5 {
  flex: 0 0 25%;
  max-width: 25%;
  padding-left: 0;
}

/* Sidebar Styling */
.nf-main-container .col-lg-5 .content-right,
.nf-main-container .col-lg-5 > div {
  position: sticky;
  top: calc(var(--st-navbar-height, 64px) + 16px);
}

@media (max-width: 992px) {
  .nf-main-container .col-lg-15 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0;
  }
  .nf-main-container .col-lg-5 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 0;
    margin-top: 24px;
  }
}

@media (max-width: 768px) {
  .nf-main-container { padding: 0 12px; }
}

/* ============================================
   PAGINATE OVERRIDE
   ============================================ */
.nf-paginate-active a {
  background: var(--st-accent) !important;
  border-color: var(--st-accent) !important;
}

/* ============================================
   PLAYER
   ============================================ */
.nf-player-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--st-radius);
  overflow: hidden;
  box-shadow: var(--st-shadow);
  background: #000;
}

/* ============================================
   SEE ALL BUTTON
   ============================================ */
.st-see-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--st-radius-sm);
  border: 1px solid var(--st-accent);
  color: var(--st-accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all var(--st-transition);
  position: relative;
  overflow: hidden;
}

.st-see-all:hover {
  background: var(--st-accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--st-accent-glow);
  transform: translateY(-1px);
}

.st-see-all i { font-size: 0.65rem; transition: transform 0.3s; }
.st-see-all:hover i { transform: translateX(3px); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes st-fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.st-animate {
  animation: st-fadeUp 0.5s ease both;
}

.st-animate:nth-child(2) { animation-delay: 0.05s; }
.st-animate:nth-child(3) { animation-delay: 0.1s; }
.st-animate:nth-child(4) { animation-delay: 0.15s; }
