/* ============================================
   COMPONENTS.CSS - Denis Casian Movie App
   ============================================ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 15px rgba(139,92,246,0.3);
}

.btn-primary:hover {
  box-shadow: var(--shadow-purple);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
}

.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border: 1px solid rgba(139,92,246,0.4);
}

.btn-outline:hover {
  background: rgba(139,92,246,0.15);
  border-color: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--error);
  border: 1px solid rgba(239,68,68,0.3);
}

.btn-danger:hover {
  background: rgba(239,68,68,0.25);
  border-color: var(--error);
}

.btn-success {
  background: rgba(16,185,129,0.15);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.3);
}

.btn-success:hover {
  background: rgba(16,185,129,0.25);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  font-size: 0.85rem;
}

.btn-icon-lg {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.3rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Movie Card ── */
.movie-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;                    /* ← SCHIMBAT din hidden */
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.35s var(--ease);
  cursor: pointer;
  group: true;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--border-hover);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(139,92,246,0.3);
  z-index: 2;
}

.card-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg-3);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;  /* ← ADAUGĂ */
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.movie-card:hover .card-poster img {
  transform: scale(1.05);
}

.card-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
}

.card-poster-placeholder span {
  font-size: 0.8rem;
  color: var(--text-3);
}

/* Card Overlay on Hover */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.95) 0%,
    rgba(0,0,0,0.6) 40%,
    rgba(0,0,0,0.1) 70%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  gap: 8px;
}

.movie-card:hover .card-overlay {
  opacity: 1;
}

.card-overlay-actions {
  display: flex;
  gap: 6px;                             /* ← SCHIMBAT din 8px */
  width: 100%;                          /* ← ADAUGĂ */
  justify-content: center;              /* ← ADAUGĂ */
}

.card-action-btn {
  flex: 1;
  min-width: 0;                         /* ← ADAUGĂ */
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;                     /* ← ADAUGĂ */
  text-overflow: ellipsis;              /* ← ADAUGĂ */
  white-space: nowrap;                  /* ← ADAUGĂ */
}

.card-action-btn:hover {
  background: rgba(139,92,246,0.5);
  border-color: var(--primary-light);
}

.card-action-btn.play-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
}

.card-action-btn.play-btn:hover {
  box-shadow: var(--shadow-purple);
  transform: scale(1.02);
}

/* Card Badges */
.card-badge {
  position: absolute;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 3;
  pointer-events: none;
}

.badge-rating {
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* TYPE badge - sub rating, tot în stânga */
.badge-type {
  top: 38px;                            /* ← SCHIMBAT din 34px */
  left: 8px;
  background: rgba(139,92,246,0.85);
  color: #fff;
  backdrop-filter: blur(8px);
}


.badge-new {
  background: rgba(239,68,68,0.85);
  color: #fff;
}

.badge-hd {
  background: rgba(16,185,129,0.85);
  color: #fff;
}

/* Progress Bar on Card */
.card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
}

.card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
  transition: width 0.3s;
}

/* Card Info */
.card-info {
  padding: 12px;
  background: var(--bg-2);                                /* ← ADAUGĂ */
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);   /* ← ADAUGĂ */
  position: relative;                                      /* ← ADAUGĂ */
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  line-height: 1.3;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-3);
  flex-wrap: nowrap;                    /* ← ADAUGĂ */
  overflow: hidden;                     /* ← ADAUGĂ */
}

.card-meta-sep {
  opacity: 0.4;
}

.card-meta-rating {
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Wishlist/Favorite Toggle */
.card-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0;
  z-index: 5;
  color: #ef4444;                       /* ← ADAUGĂ: roșu mereu */
}

.movie-card:hover .card-fav-btn {
  opacity: 1;
}

.card-fav-btn.active,
.card-fav-btn:hover {
  background: rgba(239,68,68,0.5);
  border-color: var(--error);
  opacity: 1;
  color: #fff;                          /* ← ADAUGĂ: alb când activ/hover */
}
/* Mobile - carduri mici */
@media (max-width: 480px) {
  .badge-rating {
    top: 4px;
    left: 4px;
    font-size: 0.6rem;
    padding: 3px 6px;
  }

.badge-type {
    top: 26px;
    left: 4px;
    font-size: 0.6rem;
    padding: 3px 6px;
  }

  .card-meta {
    gap: 4px;
    font-size: 0.65rem;
  }

  .card-meta-sep {
    font-size: 0.5rem;
  }

  /* ── FIX: butoane overlay centrate ── */
  .card-overlay {
    padding: 8px;
  }

  .card-overlay-actions {
    gap: 4px;
  }

  .card-action-btn {
    padding: 6px 4px;
    font-size: 0.65rem;
    gap: 2px;
  }

  .card-fav-btn {
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .movies-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 6px;                       /* ← ADAUGĂ */
    margin: -6px;                       /* ← ADAUGĂ */
  }
}

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.05) 0%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
}

.skeleton-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.05);
}

.skeleton-poster {
  aspect-ratio: 2/3;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.05) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.05) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-line.short  { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-line.full   { width: 100%; }

/* ── Carousel / Slider ── */
.carousel-wrapper {
  position: relative;
  margin: 0 -24px;
  padding: 10px 24px 20px;             /* ← SCHIMBAT: adăugat sus/jos */
  overflow: visible;                    /* ← ADAUGĂ */
}

.carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible;                  /* ← ADAUGĂ */
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 10px 0 20px 0;              /* ← SCHIMBAT: padding vertical */
}

.carousel::-webkit-scrollbar { display: none; }

.carousel .movie-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.carousel-arrow:hover {
  background: rgba(139,92,246,0.5);
  border-color: var(--primary-light);
}

.carousel-arrow.prev { left: 4px; }
.carousel-arrow.next { right: 4px; }

.carousel-arrow.hidden { opacity: 0; pointer-events: none; }

/* ── Grid Layouts ── */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 100%;
  overflow: visible;                    /* ← ADAUGĂ */
  padding: 10px;                        /* ← ADAUGĂ */
  margin: -10px;                        /* ← ADAUGĂ */
}

.movies-grid-lg {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 0.82rem;
  color: var(--text-3);
  white-space: nowrap;
}

.filter-select {
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.filter-select:focus,
.filter-select:hover {
  border-color: var(--primary);
  background-color: rgba(255,255,255,0.08);
}

.filter-select option {
  background: #1a1a2e;
  color: var(--text);
}

.filter-tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-2);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: var(--font);
}

.filter-tag:hover,
.filter-tag.active {
  background: rgba(139,92,246,0.25);
  border-color: var(--primary-light);
  color: #fff;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: rgba(15,15,30,0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s var(--ease);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text-2);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(239,68,68,0.25);
  color: var(--error);
  transform: rotate(90deg);
}

.modal-body {
  padding: 20px 24px 24px;
}

/* Trailer Modal */
.trailer-modal .modal {
  max-width: 900px;
}

.trailer-wrapper {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 16px;
}

.trailer-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Confirm Modal */
.confirm-modal .modal {
  max-width: 420px;
}

.confirm-text {
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ── Star Rating ── */
.star-rating {
  display: flex;
  gap: 4px;
  align-items: center;
}

.star {
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.15s, color 0.15s;
  color: rgba(255,255,255,0.2);
  line-height: 1;
}

.star:hover,
.star.active {
  color: var(--gold);
  transform: scale(1.2);
}

.star.half {
  color: var(--gold);
  opacity: 0.6;
}

.star-rating-display {
  display: flex;
  gap: 2px;
  align-items: center;
}

.star-display {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.2);
}

.star-display.filled {
  color: var(--gold);
}

.rating-value {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  margin-left: 6px;
}

/* ── Tags / Badges ── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.tag-genre {
  background: rgba(139,92,246,0.2);
  color: var(--primary-light);
  border: 1px solid rgba(139,92,246,0.3);
}

.tag-genre:hover {
  background: rgba(139,92,246,0.35);
  cursor: pointer;
}

.tag-year {
  background: rgba(255,255,255,0.08);
  color: var(--text-2);
}

.tag-status-ongoing {
  background: rgba(16,185,129,0.15);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.3);
}

.tag-status-ended {
  background: rgba(239,68,68,0.15);
  color: var(--error);
  border: 1px solid rgba(239,68,68,0.3);
}

/* ── Progress Bar ── */
.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  transition: width 0.5s var(--ease);
}

.progress-bar-lg {
  height: 8px;
}

/* ── Input Fields ── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: all 0.3s var(--ease);
  -webkit-user-select: text;
  user-select: text;
}

.input-field::placeholder { color: var(--text-3); }

.input-field:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

.input-field.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.input-field.success {
  border-color: var(--success);
}

.input-error-msg {
  font-size: 0.8rem;
  color: var(--error);
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 1rem;
  pointer-events: none;
}

.input-field.with-icon {
  padding-left: 42px;
}

.input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s;
}

.input-toggle:hover { color: var(--text); }

/* ── Cast Row ── */
.cast-row-wrapper {
  position: relative;
  overflow: visible;
}

#playerCastContainer {
  overflow: visible;
}

.cast-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 10px 0;           /* ← FIX: fără padding lateral */
  scrollbar-width: none;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
}

.cast-row::-webkit-scrollbar { 
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.cast-row-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cast-row-arrow:hover {
  background: rgba(139,92,246,0.5);
  border-color: var(--primary-light);
}

.cast-row-arrow.prev { left: 8px; }
.cast-row-arrow.next { right: 8px; }

.cast-row-arrow.hidden { 
  opacity: 0; 
  pointer-events: none; 
}

@media (min-width: 769px) {
  .cast-row-wrapper.has-overflow .cast-row-arrow {
    display: flex;
  }
  
  .cast-row {
    overflow-x: hidden;
  }
  
  .cast-row-wrapper.has-overflow .cast-row {
    overflow-x: scroll;
  }
}

.cast-card {
  flex: 0 0 100px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.cast-card:hover { transform: translateY(-4px); }

.cast-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 8px;
  border: 2px solid var(--border);
  background: var(--bg-3);
  transition: border-color 0.2s;
}

.cast-card:hover .cast-avatar {
  border-color: var(--primary-light);
}

.cast-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cast-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
}

.cast-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 2px;
}

.cast-role {
  font-size: 0.7rem;
  color: var(--text-3);
  line-height: 1.3;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 0;
  flex-wrap: wrap;
}

.page-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}

.page-btn:hover {
  background: rgba(139,92,246,0.2);
  border-color: var(--primary);
  color: #fff;
}

.page-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn.disabled:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}

/* ── Info Panel (movie details) ── */
.info-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.info-row {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.88rem;
}

.info-row:last-child { border-bottom: none; }

.info-row-label {
  flex: 0 0 110px;
  color: var(--text-3);
  font-weight: 500;
}

.info-row-value {
  color: var(--text-2);
  flex: 1;
  line-height: 1.5;
}

/* ── Avatar Upload ── */
.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--border);
  overflow: hidden;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s;
}

.avatar-preview:hover {
  border-color: var(--primary-light);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.avatar-preview:hover .avatar-overlay {
  opacity: 1;
}

/* ── Stats Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  transition: all 0.3s;
}

.stat-card:hover {
  background: rgba(139,92,246,0.1);
  border-color: rgba(139,92,246,0.3);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-3);
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-icon {
  font-size: 4rem;
  opacity: 0.5;
}

.empty-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.empty-text {
  font-size: 0.95rem;
  color: var(--text-2);
  max-width: 360px;
  line-height: 1.6;
}

/* ── Search Input Large ── */
.search-bar-lg {
  position: relative;
  width: 100%;
}

.search-bar-lg input {
  width: 100%;
  padding: 16px 56px 16px 20px;
  background: rgba(255,255,255,0.08);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text);
  font-size: 1.05rem;
  font-family: var(--font);
  outline: none;
  transition: all 0.3s var(--ease);
  -webkit-user-select: text;
  user-select: text;
}

.search-bar-lg input::placeholder { color: var(--text-3); }

.search-bar-lg input:focus {
  border-color: var(--primary-light);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 30px rgba(139,92,246,0.2);
}

.search-bar-lg .search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.search-bar-lg .search-icon:hover {
  box-shadow: var(--shadow-purple);
  transform: translateY(-50%) scale(1.05);
}

/* ── Continue Watching Card ── */
.continue-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  flex: 0 0 220px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.continue-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.continue-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-3);
}

.continue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.continue-card:hover .continue-thumb img {
  transform: scale(1.05);
}

.continue-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.continue-card:hover .continue-play-icon {
  opacity: 1;
}

.continue-info {
  padding: 10px 12px;
}

.continue-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-meta {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-bottom: 8px;
}

.continue-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-2);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s;
}

.continue-card:hover .continue-remove {
  opacity: 1;
}

.continue-remove:hover {
  background: rgba(239,68,68,0.5);
  color: #fff;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 10px 18px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font);
  background: none;
}

.tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.tab.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary-light);
  background: rgba(139,92,246,0.08);
}

/* ── Cast Button ── */
.cast-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font);
}

.cast-btn:hover,
.cast-btn.active {
  background: rgba(16,185,129,0.2);
  border-color: rgba(16,185,129,0.4);
  color: var(--success);
}

.cast-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }

  .movies-grid-lg {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }

  .carousel .movie-card {
    flex: 0 0 140px;
  }

  .cast-card { flex: 0 0 80px; }

  .cast-avatar {
    width: 64px;
    height: 64px;
  }

  .modal {
    border-radius: var(--radius-lg);
  }

  .modal-body {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-bar {
    gap: 8px;
  }

  .filter-select {
    font-size: 0.8rem;
    padding: 7px 28px 7px 10px;
  }

  .continue-card {
    flex: 0 0 180px;
  }
}

@media (max-width: 480px) {
  .movies-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .card-info { padding: 8px; }

  .card-title { font-size: 0.8rem; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .tabs { gap: 2px; }

  .tab {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
}

/* ══════════════════════════════════════════
   STAR RATING - ESTETIC
   ══════════════════════════════════════════ */

.star-rating {
  display: flex;
  gap: 6px;
  align-items: center;
}

.star {
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, color 0.15s ease;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}

.star:hover {
  color: var(--gold);
  transform: scale(1.35);
  filter: drop-shadow(0 0 8px rgba(255, 200, 0, 0.7));
}

.star.active {
  color: var(--gold);
  filter: drop-shadow(0 0 4px rgba(255, 200, 0, 0.4));
}

.star.active:hover {
  transform: scale(1.35);
  filter: drop-shadow(0 0 10px rgba(255, 200, 0, 0.8));
}