/* ============================================================
   Haruby Kinofilme – Frontend CSS v1.0.0
   Cinema Premium Design · Dark + Light Mode
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
.hkf-wrap.hkf-design-dark {
  --hkf-bg:            #0d0f14;
  --hkf-bg2:           #13161d;
  --hkf-bg3:           #1a1e28;
  --hkf-card-bg:       #161b26;
  --hkf-card-hover:    #1e2435;
  --hkf-border:        #2a2f42;
  --hkf-accent:        #e8b84b;
  --hkf-accent2:       #c0392b;
  --hkf-text:          #e8eaf0;
  --hkf-text-muted:    #8892a4;
  --hkf-text-dim:      #4a5568;
  --hkf-month-num:     #e8b84b;
  --hkf-star-full:     #e8b84b;
  --hkf-star-empty:    #2a2f42;
  --hkf-badge-bg:      rgba(232,184,75,0.15);
  --hkf-modal-bg:      rgba(0,0,0,0.92);
  --hkf-genre-bg:      rgba(232,184,75,0.12);
  --hkf-genre-color:   #e8b84b;
  --hkf-shadow:        0 8px 32px rgba(0,0,0,0.6);
  --hkf-radius:        12px;
  --hkf-radius-sm:     8px;
}

.hkf-wrap.hkf-design-light {
  --hkf-bg:            #f0f2f7;
  --hkf-bg2:           #e8eaf0;
  --hkf-bg3:           #dde0ea;
  --hkf-card-bg:       #ffffff;
  --hkf-card-hover:    #f7f8fc;
  --hkf-border:        #d0d5e0;
  --hkf-accent:        #c0392b;
  --hkf-accent2:       #e8b84b;
  --hkf-text:          #1a1e28;
  --hkf-text-muted:    #5a6070;
  --hkf-text-dim:      #a0a8b8;
  --hkf-month-num:     #c0392b;
  --hkf-star-full:     #e8b84b;
  --hkf-star-empty:    #d0d5e0;
  --hkf-badge-bg:      rgba(192,57,43,0.1);
  --hkf-modal-bg:      rgba(0,0,0,0.85);
  --hkf-genre-bg:      rgba(192,57,43,0.08);
  --hkf-genre-color:   #c0392b;
  --hkf-shadow:        0 4px 20px rgba(0,0,0,0.1);
  --hkf-radius:        12px;
  --hkf-radius-sm:     8px;
}

/* ── Base ── */
html body .hkf-wrap {
  all: initial !important;
  display: block !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: var(--hkf-text) !important;
  background: var(--hkf-bg) !important;
  background-color: var(--hkf-bg) !important;
  -webkit-text-fill-color: var(--hkf-text) !important;
  border-radius: var(--hkf-radius) !important;
  padding: 0 !important;
  margin: 0 0 2rem 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  transition: background 0.3s ease !important;
}

html body .hkf-wrap *, html body .hkf-wrap *::before, html body .hkf-wrap *::after {
  box-sizing: border-box !important;
}

/* ── Header ── */
html body .hkf-wrap .hkf-header {
  background: var(--hkf-bg2) !important;
  background-color: var(--hkf-bg2) !important;
  border-bottom: 1px solid var(--hkf-border) !important;
  padding: 0 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
}

html body .hkf-wrap .hkf-header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 1.2rem 1.5rem !important;
  gap: 1rem !important;
  flex-wrap: wrap !important;
}

html body .hkf-wrap .hkf-title-block {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

html body .hkf-wrap .hkf-icon {
  font-size: 2rem !important;
  line-height: 1 !important;
}

html body .hkf-wrap .hkf-main-title {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: 2rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.08em !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--hkf-text) !important;
  -webkit-text-fill-color: var(--hkf-text) !important;
  line-height: 1 !important;
  border: none !important;
  background: none !important;
  background-color: transparent !important;
}

html body .hkf-wrap .hkf-year-label {
  color: var(--hkf-accent) !important;
  -webkit-text-fill-color: var(--hkf-accent) !important;
}

html body .hkf-wrap .hkf-subtitle {
  font-size: 11px !important;
  color: var(--hkf-text-muted) !important;
  -webkit-text-fill-color: var(--hkf-text-muted) !important;
  margin: 0.2rem 0 0 0 !important;
  padding: 0 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

/* ── Controls ── */
html body .hkf-wrap .hkf-controls {
  display: flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
}

html body .hkf-wrap .hkf-year-select {
  background: var(--hkf-bg3) !important;
  background-color: var(--hkf-bg3) !important;
  color: var(--hkf-text) !important;
  -webkit-text-fill-color: var(--hkf-text) !important;
  border: 1px solid var(--hkf-border) !important;
  border-radius: var(--hkf-radius-sm) !important;
  padding: 0.45rem 0.75rem !important;
  font-size: 14px !important;
  font-family: 'Inter', sans-serif !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  outline: none !important;
  transition: border-color 0.2s !important;
  min-width: 90px !important;
}

html body .hkf-wrap .hkf-year-select:focus {
  border-color: var(--hkf-accent) !important;
}

html body .hkf-wrap .hkf-theme-toggle {
  background: var(--hkf-bg3) !important;
  background-color: var(--hkf-bg3) !important;
  border: 1px solid var(--hkf-border) !important;
  border-radius: var(--hkf-radius-sm) !important;
  padding: 0.45rem 0.6rem !important;
  cursor: pointer !important;
  font-size: 16px !important;
  line-height: 1 !important;
  transition: background 0.2s, border-color 0.2s !important;
}

html body .hkf-wrap .hkf-theme-toggle:hover {
  background: var(--hkf-border) !important;
  background-color: var(--hkf-border) !important;
}

/* ── Month Nav ── */
html body .hkf-wrap .hkf-month-nav {
  display: flex !important;
  gap: 0 !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  border-top: 1px solid var(--hkf-border) !important;
  padding: 0 1.5rem !important;
}

html body .hkf-wrap .hkf-month-nav::-webkit-scrollbar { display: none !important; }

html body .hkf-wrap .hkf-month-btn {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--hkf-text-muted) !important;
  -webkit-text-fill-color: var(--hkf-text-muted) !important;
  border: none !important;
  padding: 0.7rem 1rem !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  font-family: 'Inter', sans-serif !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  border-bottom: 3px solid transparent !important;
  transition: color 0.2s, border-color 0.2s !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

html body .hkf-wrap .hkf-month-btn:hover,
html body .hkf-wrap .hkf-month-btn.active {
  color: var(--hkf-accent) !important;
  -webkit-text-fill-color: var(--hkf-accent) !important;
  border-bottom-color: var(--hkf-accent) !important;
}

/* ── Content ── */
html body .hkf-wrap .hkf-content {
  padding: 0 !important;
}

/* ── Month Section ── */
html body .hkf-wrap .hkf-month-section {
  padding: 2rem 1.5rem !important;
  border-bottom: 1px solid var(--hkf-border) !important;
}

html body .hkf-wrap .hkf-month-header {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  margin-bottom: 1.5rem !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
}

html body .hkf-wrap .hkf-month-title {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: 1.8rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.1em !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--hkf-text) !important;
  -webkit-text-fill-color: var(--hkf-text) !important;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
}

html body .hkf-wrap .hkf-month-num {
  color: var(--hkf-month-num) !important;
  -webkit-text-fill-color: var(--hkf-month-num) !important;
  font-size: 1.1rem !important;
  opacity: 0.7 !important;
}

html body .hkf-wrap .hkf-month-year {
  font-size: 1rem !important;
  color: var(--hkf-text-muted) !important;
  -webkit-text-fill-color: var(--hkf-text-muted) !important;
}

html body .hkf-wrap .hkf-film-count {
  font-size: 11px !important;
  color: var(--hkf-text-dim) !important;
  -webkit-text-fill-color: var(--hkf-text-dim) !important;
  background: var(--hkf-bg3) !important;
  background-color: var(--hkf-bg3) !important;
  padding: 0.25rem 0.6rem !important;
  border-radius: 20px !important;
  letter-spacing: 0.04em !important;
}

/* ── Cards Grid ── */
html body .hkf-wrap .hkf-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 1.2rem !important;
}

/* ── Film Card ── */
html body .hkf-wrap .hkf-card {
  background: var(--hkf-card-bg) !important;
  background-color: var(--hkf-card-bg) !important;
  border: 1px solid var(--hkf-border) !important;
  border-radius: var(--hkf-radius) !important;
  overflow: hidden !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease !important;
  cursor: pointer !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
}

html body .hkf-wrap .hkf-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--hkf-shadow) !important;
  background: var(--hkf-card-hover) !important;
  background-color: var(--hkf-card-hover) !important;
  border-color: var(--hkf-accent) !important;
}

/* ── Poster ── */
html body .hkf-wrap .hkf-card-poster-wrap {
  position: relative !important;
  aspect-ratio: 2/3 !important;
  overflow: hidden !important;
  background: var(--hkf-bg3) !important;
  background-color: var(--hkf-bg3) !important;
  flex-shrink: 0 !important;
}

html body .hkf-wrap .hkf-card-poster {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s ease, filter 0.3s ease !important;
  border: none !important;
}

html body .hkf-wrap .hkf-card:hover .hkf-card-poster {
  transform: scale(1.04) !important;
  filter: brightness(0.75) !important;
}

html body .hkf-wrap .hkf-no-poster {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 3rem !important;
  color: var(--hkf-text-dim) !important;
  -webkit-text-fill-color: var(--hkf-text-dim) !important;
  background: var(--hkf-bg3) !important;
  background-color: var(--hkf-bg3) !important;
}

/* ── Rating Badge ── */
html body .hkf-wrap .hkf-rating-badge {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  background: rgba(0,0,0,0.82) !important;
  background-color: rgba(0,0,0,0.82) !important;
  border-radius: 6px !important;
  padding: 3px 7px !important;
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  backdrop-filter: blur(6px) !important;
}

html body .hkf-wrap .hkf-rating-num {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html body .hkf-wrap .hkf-rating-star {
  font-size: 11px !important;
  color: var(--hkf-star-full) !important;
  -webkit-text-fill-color: var(--hkf-star-full) !important;
}

/* ── Play Button ── */
html body .hkf-wrap .hkf-play-btn {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  transition: opacity 0.25s ease !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body .hkf-wrap .hkf-card:hover .hkf-play-btn {
  opacity: 1 !important;
}

html body .hkf-wrap .hkf-play-icon {
  width: 56px !important;
  height: 56px !important;
  background: var(--hkf-accent) !important;
  background-color: var(--hkf-accent) !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  padding-left: 4px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
  transition: transform 0.2s ease !important;
}

html body .hkf-wrap .hkf-play-btn:hover .hkf-play-icon {
  transform: scale(1.1) !important;
}

/* ── Card Info ── */
html body .hkf-wrap .hkf-card-info {
  padding: 1rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  flex: 1 !important;
}

html body .hkf-wrap .hkf-card-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--hkf-text) !important;
  -webkit-text-fill-color: var(--hkf-text) !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
}

html body .hkf-wrap .hkf-card-tagline {
  font-size: 11px !important;
  color: var(--hkf-accent) !important;
  -webkit-text-fill-color: var(--hkf-accent) !important;
  margin: 0 !important;
  padding: 0 !important;
  font-style: italic !important;
  line-height: 1.3 !important;
}

html body .hkf-wrap .hkf-card-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.4rem !important;
}

html body .hkf-wrap .hkf-meta-item {
  font-size: 11px !important;
  color: var(--hkf-text-muted) !important;
  -webkit-text-fill-color: var(--hkf-text-muted) !important;
  background: transparent !important;
  background-color: transparent !important;
}

html body .hkf-wrap .hkf-genres {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.3rem !important;
}

html body .hkf-wrap .hkf-genre-tag {
  font-size: 10px !important;
  font-weight: 600 !important;
  color: var(--hkf-genre-color) !important;
  -webkit-text-fill-color: var(--hkf-genre-color) !important;
  background: var(--hkf-genre-bg) !important;
  background-color: var(--hkf-genre-bg) !important;
  border: 1px solid var(--hkf-genre-color) !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

html body .hkf-wrap .hkf-card-overview {
  font-size: 12px !important;
  color: var(--hkf-text-muted) !important;
  -webkit-text-fill-color: var(--hkf-text-muted) !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.5 !important;
  flex: 1 !important;
}

/* ── Stars ── */
html body .hkf-wrap .hkf-card-stars {
  display: flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
  flex-wrap: wrap !important;
}

html body .hkf-wrap .hkf-stars {
  display: inline-flex !important;
  gap: 1px !important;
}

html body .hkf-wrap .hkf-star {
  font-size: 12px !important;
}

html body .hkf-wrap .hkf-star-full,
html body .hkf-wrap .hkf-star-half {
  color: var(--hkf-star-full) !important;
  -webkit-text-fill-color: var(--hkf-star-full) !important;
}

html body .hkf-wrap .hkf-star-empty {
  color: var(--hkf-star-empty) !important;
  -webkit-text-fill-color: var(--hkf-star-empty) !important;
}

html body .hkf-wrap .hkf-votes {
  font-size: 10px !important;
  color: var(--hkf-text-dim) !important;
  -webkit-text-fill-color: var(--hkf-text-dim) !important;
}

/* ── Trailer Button ── */
html body .hkf-wrap .hkf-trailer-btn {
  margin-top: auto !important;
  background: var(--hkf-accent) !important;
  background-color: var(--hkf-accent) !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  border: none !important;
  border-radius: var(--hkf-radius-sm) !important;
  padding: 0.5rem 0.9rem !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  font-family: 'Inter', sans-serif !important;
  cursor: pointer !important;
  transition: opacity 0.2s, transform 0.15s !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  width: 100% !important;
}

html body .hkf-wrap .hkf-trailer-btn:hover {
  opacity: 0.88 !important;
  transform: translateY(-1px) !important;
}

/* ── Empty Month ── */
html body .hkf-wrap .hkf-empty-month {
  text-align: center !important;
  padding: 2.5rem !important;
  color: var(--hkf-text-dim) !important;
  -webkit-text-fill-color: var(--hkf-text-dim) !important;
  background: var(--hkf-bg2) !important;
  background-color: var(--hkf-bg2) !important;
  border-radius: var(--hkf-radius) !important;
  border: 1px dashed var(--hkf-border) !important;
}

html body .hkf-wrap .hkf-empty-icon {
  font-size: 2.5rem !important;
  display: block !important;
  margin-bottom: 0.5rem !important;
}

/* ── Modal ── */
html body .hkf-wrap .hkf-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
}

html body .hkf-wrap .hkf-modal.active {
  display: flex !important;
}

html body .hkf-wrap .hkf-modal-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: var(--hkf-modal-bg) !important;
  background-color: var(--hkf-modal-bg) !important;
  cursor: pointer !important;
}

html body .hkf-wrap .hkf-modal-inner {
  position: relative !important;
  z-index: 1 !important;
  background: var(--hkf-bg2) !important;
  background-color: var(--hkf-bg2) !important;
  border-radius: var(--hkf-radius) !important;
  border: 1px solid var(--hkf-border) !important;
  width: 100% !important;
  max-width: 860px !important;
  padding: 1.5rem !important;
  box-shadow: 0 20px 80px rgba(0,0,0,0.7) !important;
  animation: hkfModalIn 0.25s ease !important;
}

@keyframes hkfModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

html body .hkf-wrap .hkf-modal-close {
  position: absolute !important;
  top: 1rem !important;
  right: 1rem !important;
  background: var(--hkf-bg3) !important;
  background-color: var(--hkf-bg3) !important;
  color: var(--hkf-text) !important;
  -webkit-text-fill-color: var(--hkf-text) !important;
  border: 1px solid var(--hkf-border) !important;
  border-radius: 50% !important;
  width: 32px !important;
  height: 32px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s !important;
  padding: 0 !important;
  margin: 0 !important;
}

html body .hkf-wrap .hkf-modal-close:hover {
  background: var(--hkf-border) !important;
  background-color: var(--hkf-border) !important;
}

html body .hkf-wrap .hkf-modal-title {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: 1.6rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.06em !important;
  color: var(--hkf-text) !important;
  -webkit-text-fill-color: var(--hkf-text) !important;
  margin: 0 0 1rem 0 !important;
  padding: 0 2.5rem 0 0 !important;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
}

html body .hkf-wrap .hkf-iframe-wrap {
  position: relative !important;
  padding-bottom: 56.25% !important;
  height: 0 !important;
  overflow: hidden !important;
  border-radius: var(--hkf-radius-sm) !important;
  background: #000 !important;
  background-color: #000 !important;
}

html body .hkf-wrap .hkf-iframe-wrap iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  html body .hkf-wrap .hkf-header-inner {
    padding: 1rem !important;
    gap: 0.75rem !important;
  }
  html body .hkf-wrap .hkf-main-title {
    font-size: 1.5rem !important;
  }
  html body .hkf-wrap .hkf-month-section {
    padding: 1.5rem 1rem !important;
  }
  html body .hkf-wrap .hkf-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 0.8rem !important;
  }
  html body .hkf-wrap .hkf-modal-inner {
    padding: 1rem !important;
  }
}

@media (max-width: 480px) {
  html body .hkf-wrap .hkf-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }
  html body .hkf-wrap .hkf-card-info {
    padding: 0.7rem !important;
  }
  html body .hkf-wrap .hkf-card-title {
    font-size: 12px !important;
  }
  html body .hkf-wrap .hkf-month-title {
    font-size: 1.4rem !important;
  }
}
