/* Hide app until Vue is ready */
[v-cloak] { display: none; }

/* Scrollbar custom */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2e2e3e; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #3e3e5e; }

/* Hide scrollbar utility */
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* Movie card */
.movie-card {
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s ease;
}
.movie-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  z-index: 2;
}
.movie-card img {
  transition: transform 0.4s ease;
}

/* Spinner */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #1e1e2e;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton pulse */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #1e1e2e 25%, #252535 50%, #1e1e2e 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Modal transition */
.modal-enter-active, .modal-leave-active { transition: opacity 0.25s ease; }
.modal-enter-active .modal-box, .modal-leave-active .modal-box { transition: transform 0.25s cubic-bezier(.4,0,.2,1), opacity 0.25s ease; }
.modal-enter-from, .modal-leave-to { opacity: 0; }
.modal-enter-from .modal-box, .modal-leave-to .modal-box { transform: scale(0.95) translateY(10px); opacity: 0; }

/* Toast transition */
.toast-enter-active { transition: all 0.3s cubic-bezier(.4,0,.2,1); }
.toast-leave-active { transition: all 0.25s ease; }
.toast-enter-from { opacity: 0; transform: translateX(16px); }
.toast-leave-to { opacity: 0; transform: translateX(16px); }

/* Tab active underline */
.tab-active { position: relative; }
.tab-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: #f59e0b;
  border-radius: 2px 2px 0 0;
}

/* Cast horizontal scroll */
.cast-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }

/* Genre badge */
.genre-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.2);
  white-space: nowrap;
}

/* Rating badge */
.rating-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Add button */
.add-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  /* Taille tactile minimum 44px via padding invisible */
  padding: 0;
  position: relative;
}
/* Zone de tap élargie pour mobile */
.add-btn::before {
  content: '';
  position: absolute;
  inset: -7px;
}
.add-btn.in-library {
  background: #f59e0b;
  color: #000;
  opacity: 1 !important;
}
.add-btn.not-in-library {
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}
/* Desktop : masqué sauf hover */
@media (hover: hover) {
  .add-btn.not-in-library { opacity: 0; }
  .movie-card:hover .add-btn.not-in-library { opacity: 1; }
}
/* Mobile (pas de hover) : toujours visible */
@media (hover: none) {
  .add-btn.not-in-library { opacity: 1; }
}
.add-btn.not-in-library:hover,
.add-btn.not-in-library:active { background: #f59e0b; color: #000; transform: scale(1.1); border-color: #f59e0b; }

/* Modal slide-up sur mobile */
@media (max-width: 639px) {
  .modal-enter-from .modal-box,
  .modal-leave-to .modal-box { transform: translateY(100%); opacity: 1; }
  .modal-enter-active .modal-box,
  .modal-leave-active .modal-box { transition: transform 0.3s cubic-bezier(.4,0,.2,1); }
}

/* movie-card : pas d'élévation sur mobile (performance) */
@media (hover: none) {
  .movie-card:hover { transform: none; box-shadow: none; }
}

/* Input focus ring */
.input-field:focus { outline: none; border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,0.15); }

/* Backdrop blur for modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 50;
}

/* Line clamp */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Select custom */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px !important;
}

/* Hero gradient */
.hero-gradient {
  background: linear-gradient(180deg, transparent 0%, #111118 100%);
}

/* Actor card hover */
.actor-card { transition: transform 0.2s ease; cursor: pointer; }
.actor-card:hover { transform: translateY(-2px); }
.actor-card:hover .actor-name { color: #f59e0b; }

/* Dashboard */
.stat-card {
  background: #111118;
  border: 1px solid #1e1e2e;
  border-radius: 16px;
  padding: 20px 24px;
}
.stat-card .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 6px;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: #f59e0b;
}
.stat-card .stat-sub {
  font-size: 11px;
  color: #4b5563;
  margin-top: 4px;
}
.chart-card {
  background: #111118;
  border: 1px solid #1e1e2e;
  border-radius: 16px;
  padding: 20px 24px;
}
.chart-card .chart-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 16px;
  font-weight: 600;
}
.chart-h-xs { height: 200px; }
.chart-h-sm { height: 260px; }
.chart-h-md { height: 320px; }
.chart-h-lg { height: 380px; }
