/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-elevated: #1a1a1a;
  --accent: #e8003d;
  --accent-hover: #ff1a53;
  --text: #f0f0f0;
  --text-muted: #888;
  --radius: 10px;
  --radius-sm: 6px;
  --gold: #ffd700;
  --green: #22c55e;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.text-accent { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--text); border: 1px solid #333; }
.btn--outline:hover { border-color: var(--text); }
.btn--lg { padding: 0.85rem 2rem; font-size: 1.05rem; }
.btn--sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn--lucky { border-color: var(--gold); color: var(--gold); }
.btn--lucky:hover { background: var(--gold); color: #000; }

/* ── Badge ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
}
.badge--gold { background: var(--gold); color: #000; }
.badge--accent { background: var(--accent); color: #fff; }

/* ── Age Gate ────────────────────────────────────────────────────────────── */
.age-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
}
.age-gate__box {
  background: var(--bg-elevated); border: 1px solid #222;
  border-radius: var(--radius); padding: 2.5rem; max-width: 420px; text-align: center;
}
.age-gate__box h2 { font-size: 1.8rem; margin-bottom: 0.75rem; }
.age-gate__box p { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; }
.age-gate__buttons { display: flex; gap: 1rem; justify-content: center; }
.age-gate__buttons .btn { flex: 1; }

/* ── Navigation ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid #1a1a1a; padding: 0.7rem 0;
}
.nav__inner { display: flex; align-items: center; gap: 1rem; }
.nav__logo { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; letter-spacing: 0.04em; flex-shrink: 0; }
.nav__logo-jav { color: #fff; }
.nav__logo-bucks { color: var(--accent); }

.nav__search-wrap { flex: 1; max-width: 480px; position: relative; }
.nav__search {
  display: flex; background: var(--bg-card); border: 1px solid #222;
  border-radius: var(--radius-sm); overflow: hidden; transition: border-color 0.2s;
}
.nav__search:focus-within { border-color: var(--accent); }
.nav__search input {
  flex: 1; background: none; border: none; color: var(--text);
  padding: 0.55rem 0.8rem; font-size: 0.9rem; outline: none; font-family: inherit;
}
.nav__search input::placeholder { color: #555; }
.nav__search button {
  background: none; border: none; color: var(--text-muted); padding: 0 0.7rem; cursor: pointer;
}
.nav__search button:hover { color: var(--accent); }
.nav__cta { flex-shrink: 0; }

@media (max-width: 640px) {
  .nav__cta { display: none; }
  .nav__search-wrap { max-width: none; }
}

/* ── Autocomplete Dropdown ───────────────────────────────────────────────── */
.autocomplete-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: var(--bg-elevated); border: 1px solid #222;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 400px; overflow-y: auto; display: none;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.autocomplete-dropdown.active { display: block; }
.ac-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.8rem; cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid #1a1a1a; text-decoration: none; color: var(--text);
}
.ac-item:hover, .ac-item.ac-active { background: var(--bg-card); }
.ac-item__thumb {
  width: 40px; height: 55px; border-radius: 4px; object-fit: cover; flex-shrink: 0; background: #111;
}
.ac-item__avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #111;
}
.ac-item__info { flex: 1; min-width: 0; }
.ac-item__code { font-weight: 700; font-size: 0.85rem; }
.ac-item__actress { font-size: 0.78rem; color: var(--text-muted); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 4rem 0 3rem; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(232,0,61,0.08) 0%, transparent 60%);
}
.hero__title { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 0.5rem; }
.hero__sub { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; }
.hero__search {
  display: flex; max-width: 560px; margin: 0 auto 1.2rem;
  background: var(--bg-card); border: 1px solid #222;
  border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s;
}
.hero__search:focus-within { border-color: var(--accent); }
.hero__search input {
  flex: 1; background: none; border: none; color: var(--text);
  padding: 0.85rem 1.2rem; font-size: 1rem; outline: none; font-family: inherit;
}
.hero__search input::placeholder { color: #555; }
.hero__search .btn { border-radius: 0; padding: 0.85rem 1.6rem; }

.hero__actions {
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; margin-bottom: 1.2rem; flex-wrap: wrap;
}

.hero__tags {
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted);
}
.hero__tags a {
  color: var(--text); background: var(--bg-card); padding: 0.25rem 0.7rem;
  border-radius: 99px; border: 1px solid #222; transition: all 0.2s;
}
.hero__tags a:hover { border-color: var(--accent); color: var(--accent); }

.search-header { padding: 2rem 0 0; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { padding: 3rem 0; }
.section--dark { background: var(--bg-card); }
.section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.section__title { font-size: 1.6rem; }
.section__desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.6; }

/* ── Movie Grid ──────────────────────────────────────────────────────────── */
.movie-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem;
}
.movie-grid--sm { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.7rem; }
@media (max-width: 480px) {
  .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .movie-grid--sm { grid-template-columns: repeat(3, 1fr); }
}

.movie-card {
  background: var(--bg-elevated); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
}
.movie-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(232,0,61,0.15); }
.movie-card__img {
  position: relative; aspect-ratio: 2/3; overflow: hidden; background: #111;
}
.movie-card__img img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s, opacity 0.3s;
}
.movie-card:hover .movie-card__img img { transform: scale(1.05); }

.movie-card__badge {
  position: absolute; top: 0.5rem; left: 0.5rem;
  background: var(--accent); color: #fff; font-size: 0.7rem;
  font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 99px; z-index: 2;
}
.movie-card__rank {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: var(--gold); color: #000; font-size: 0.65rem;
  font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 99px; z-index: 2;
  font-family: 'DM Sans', sans-serif;
}
.movie-card__info { padding: 0.6rem 0.7rem; }
.movie-card__code {
  font-family: 'DM Sans', sans-serif; font-size: 0.85rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.movie-card__actress {
  font-size: 0.78rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Like / Dislike on Cards ─────────────────────────────────────────────── */
.movie-card__actions {
  display: flex; gap: 0.5rem; margin-top: 0.3rem;
}
.like-btn {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 0.72rem; font-family: inherit;
  padding: 0.15rem 0; transition: color 0.2s;
}
.like-btn:hover { color: var(--text); }
.like-btn.active[data-action="like"] { color: var(--green); }
.like-btn.active[data-action="dislike"] { color: var(--accent); }
.like-count { font-weight: 600; }

/* ── Vote buttons on detail page ─────────────────────────────────────────── */
.movie-detail__votes {
  display: flex; gap: 0.75rem; margin-bottom: 1.2rem;
}
.vote-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1.2rem; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid #222;
  color: var(--text-muted); cursor: pointer; font-family: inherit;
  font-size: 0.9rem; font-weight: 600; transition: all 0.2s;
}
.vote-btn:hover { border-color: #444; color: var(--text); }
.vote-btn.active.vote-btn--like { border-color: var(--green); color: var(--green); background: rgba(34,197,94,0.08); }
.vote-btn.active.vote-btn--dislike { border-color: var(--accent); color: var(--accent); background: rgba(232,0,61,0.08); }

/* ── Collection Check ────────────────────────────────────────────────────── */
.collection-check {
  position: absolute; top: 0.4rem; right: 0.4rem;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #444; background: rgba(0,0,0,0.5); z-index: 2;
}
.collection-check.watched {
  border-color: var(--green); background: var(--green);
}
.collection-check.watched::after {
  content: ''; position: absolute; top: 3px; left: 6px;
  width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── Progress Bar ────────────────────────────────────────────────────────── */
.collection-progress { margin-bottom: 1.2rem; }
.progress-bar {
  height: 8px; background: #222; border-radius: 99px; overflow: hidden; margin-bottom: 0.4rem;
}
.progress-bar__fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 99px; transition: width 0.5s ease;
}
.progress-text { font-size: 0.85rem; color: var(--text-muted); }

/* ── Actress Carousel ────────────────────────────────────────────────────── */
.actress-carousel {
  display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; padding-bottom: 0.5rem;
  scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.actress-carousel::-webkit-scrollbar { height: 4px; }
.actress-carousel::-webkit-scrollbar-track { background: transparent; }
.actress-carousel::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.actress-chip {
  flex-shrink: 0; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  width: 110px; text-align: center; transition: transform 0.2s;
}
.actress-chip:hover { transform: translateY(-2px); }
.actress-chip img {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 2px solid #222; transition: border-color 0.2s;
}
.actress-chip:hover img { border-color: var(--accent); }
.actress-chip__name {
  font-size: 0.8rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.actress-chip__count { font-size: 0.7rem; color: var(--text-muted); }

/* ── Genre Grid ──────────────────────────────────────────────────────────── */
.genre-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.7rem;
}
.genre-card {
  background: var(--bg-elevated); border: 1px solid #222; border-radius: var(--radius-sm);
  padding: 0.9rem 1rem; text-align: center; font-weight: 600; font-size: 0.88rem;
  transition: all 0.2s;
}
.genre-card:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ── Featured Embed ──────────────────────────────────────────────────────── */
.featured-embed { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.featured-embed__card {
  background: linear-gradient(135deg, #1a1a1a, #0f0f0f); border: 1px solid #222;
  border-radius: var(--radius); padding: 2rem;
}
.featured-embed__card h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.featured-embed__card p { color: var(--text-muted); margin-bottom: 1.2rem; font-size: 0.95rem; }

/* ── Movie Detail Page ───────────────────────────────────────────────────── */
.movie-detail { padding: 2rem 0 3rem; }
.movie-detail__layout { display: grid; grid-template-columns: 400px 1fr; gap: 2.5rem; margin-bottom: 3rem; }
@media (max-width: 768px) { .movie-detail__layout { grid-template-columns: 1fr; gap: 1.5rem; } }

.movie-detail__cover { border-radius: var(--radius); overflow: hidden; background: #111; }
.movie-detail__cover img { width: 100%; height: auto; }
.movie-detail__code { font-size: 2.2rem; margin-bottom: 0.5rem; }
.movie-detail__desc { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; line-height: 1.7; }

.movie-detail__meta { margin-bottom: 1.5rem; border-top: 1px solid #1a1a1a; }
.meta-row { display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid #1a1a1a; font-size: 0.9rem; }
.meta-label { color: var(--text-muted); }

.movie-detail__genres { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.tag {
  background: var(--bg-card); border: 1px solid #222; padding: 0.3rem 0.75rem;
  border-radius: 99px; font-size: 0.8rem; font-weight: 500; transition: all 0.2s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

.movie-detail__cta { display: block; text-align: center; margin-bottom: 1.2rem; }

.movie-detail__share { display: flex; align-items: center; gap: 0.7rem; font-size: 0.85rem; color: var(--text-muted); }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg-card);
  border: 1px solid #222; color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

.movie-detail__section { margin-bottom: 3rem; }
.movie-detail__section .section__title { margin-bottom: 1.2rem; }

/* Actress list in detail */
.actress-list { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.actress-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem; transition: transform 0.2s;
}
.actress-card:hover { transform: translateY(-2px); }
.actress-card img {
  width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
  border: 2px solid #222; transition: border-color 0.2s;
}
.actress-card:hover img { border-color: var(--accent); }
.actress-card span { font-weight: 600; font-size: 0.9rem; }

/* Sample images grid */
.sample-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.7rem; }
.sample-img { border-radius: var(--radius-sm); overflow: hidden; background: #111; }
.sample-img img { width: 100%; height: auto; transition: transform 0.3s; cursor: pointer; }
.sample-img:hover img { transform: scale(1.05); }

/* Bottom CTA */
.movie-detail__bottom-cta {
  text-align: center; padding: 3rem 1rem;
  background: linear-gradient(135deg, rgba(232,0,61,0.08), transparent);
  border-radius: var(--radius); border: 1px solid #1a1a1a;
}
.movie-detail__bottom-cta h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.movie-detail__bottom-cta p { color: var(--text-muted); margin-bottom: 1.2rem; }

/* ── Actress Profile Page ────────────────────────────────────────────────── */
.actress-profile { padding: 2rem 0 3rem; }
.actress-profile__layout {
  display: flex; gap: 2.5rem; align-items: flex-start; margin-bottom: 3rem;
}
@media (max-width: 768px) { .actress-profile__layout { flex-direction: column; align-items: center; text-align: center; } }

.actress-profile__avatar { position: relative; flex-shrink: 0; }
.actress-profile__avatar img {
  width: 180px; height: 180px; border-radius: 50%; object-fit: cover;
  border: 3px solid #222;
}
.actress-profile__avatar .badge { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }
.actress-profile__name { font-size: 2.4rem; margin-bottom: 0.3rem; }
.actress-profile__count { color: var(--text-muted); font-size: 1rem; margin-bottom: 1.2rem; }
.actress-profile__bio { margin-bottom: 1.5rem; }

.bio-row {
  display: flex; justify-content: space-between; padding: 0.5rem 0;
  border-bottom: 1px solid #1a1a1a; font-size: 0.9rem; gap: 2rem;
}
.bio-label { color: var(--text-muted); flex-shrink: 0; }

.actress-profile__movies { margin-top: 2rem; }
.actress-profile__movies .section__title { margin-bottom: 1.5rem; }

/* ── Comments ────────────────────────────────────────────────────────────── */
.comments { margin-bottom: 1.2rem; }
.comment {
  display: flex; gap: 0.75rem; padding: 0.8rem 0;
  border-bottom: 1px solid #1a1a1a;
}
.comment__avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--accent); flex-shrink: 0;
  border: 1px solid #222;
}
.comment__body { flex: 1; min-width: 0; }
.comment__name { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.15rem; }
.comment__text { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }
.comment__time { font-size: 0.72rem; color: #555; margin-top: 0.2rem; }

.comment-form {
  display: flex; flex-direction: column; gap: 0.6rem;
  padding-top: 1rem;
}
.comment-form input, .comment-form textarea {
  background: var(--bg-card); border: 1px solid #222; border-radius: var(--radius-sm);
  color: var(--text); padding: 0.6rem 0.8rem; font-family: inherit; font-size: 0.9rem;
  outline: none; resize: vertical; transition: border-color 0.2s;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); }
.comment-form .btn { align-self: flex-start; }

/* ── Infinite Scroll ─────────────────────────────────────────────────────── */
.infinite-loader {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  padding: 2rem 0; color: var(--text-muted); font-size: 0.9rem;
}
.spinner {
  width: 24px; height: 24px; border: 3px solid #222; border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  background: #050505; border-top: 1px solid #1a1a1a; padding: 3rem 0 1.5rem; margin-top: 2rem;
}
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr; gap: 2rem; margin-bottom: 2rem;
}
@media (max-width: 768px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__brand p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }
.footer__links h4 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.footer__links a { display: block; color: var(--text-muted); font-size: 0.85rem; padding: 0.2rem 0; transition: color 0.2s; }
.footer__links a:hover { color: var(--accent); }
.footer__cta h4 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.footer__cta p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.8rem; }
.footer__bottom { border-top: 1px solid #1a1a1a; padding-top: 1rem; text-align: center; font-size: 0.8rem; color: var(--text-muted); }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.empty-state { color: var(--text-muted); font-size: 0.9rem; }
.loading-text { color: var(--text-muted); font-size: 0.9rem; }

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius); }
