html, body {
  background-color: #090d0b;
  color: #f1f5f9;
}

body {
  animation: appSmoothFadeIn 0.18s ease-out;
}

@keyframes appSmoothFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body, button, input, select, textarea {
  font-family: 'Inter', sans-serif !important;
}

button, input, select, textarea {
  background-color: #121a16;
  color: inherit;
}

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 32px !important;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.custom-scroll::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.35);
  border-radius: 8px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.6);
}

/* ==========================================
   SPINNERS & LOADERS ANIMATI
   ========================================== */
.anime-spinner {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  border: 3.5px solid rgba(16, 185, 129, 0.18);
  border-top-color: #10b981;
  border-right-color: #34d399;
  animation: animeSpin 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.anime-spinner-sm {
  width: 24px;
  height: 24px;
  border-width: 2.5px;
}

@keyframes animeSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================
   LETTERBOXD HOMEPAGE & LEADERBOARD STYLES
   ========================================== */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.lb-poster-card {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #121a16;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease, box-shadow 0.25s ease;
}

.lb-poster-card:hover {
  transform: translateY(-4px);
  border-color: #10b981;
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.85), 0 0 0 2px rgba(16, 185, 129, 0.6);
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 5.5rem;
  padding: 0.75rem 1rem;
  background: rgba(18, 26, 22, 0.75);
  border: 1px solid rgba(16, 185, 129, 0.12);
  border-radius: 0.85rem;
  transition: all 0.2s ease;
}

.leaderboard-row:hover {
  background: rgba(24, 36, 30, 0.95);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateX(4px);
}

.rank-badge-1 { color: #fbbf24; text-shadow: 0 0 12px rgba(251, 191, 36, 0.35); }
.rank-badge-2 { color: #cbd5e1; text-shadow: 0 0 12px rgba(203, 213, 225, 0.25); }
.rank-badge-3 { color: #d97706; text-shadow: 0 0 12px rgba(217, 119, 6, 0.3); }

/* ==========================================
   PROFILO UTENTE E COMPONENTI LISTA
   ========================================== */
.lb-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  background: rgba(18, 26, 22, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 1rem;
  min-width: 72px;
  transition: all 0.2s ease;
}

.lb-stat-pill:hover {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(18, 26, 22, 1);
}

.profile-feed-scrollbox {
  scrollbar-gutter: stable;
}

.mal-feed-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem;
  background: #121a16;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 1rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.mal-feed-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  transform: translateX(2px);
}

.rating-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}

.rating-bar-track {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 2px;
}

.rating-bar-fill {
  width: 100%;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  background: linear-gradient(to top, rgba(16, 185, 129, 0.45), #34d399);
  transition: height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease;
  min-height: 4px;
}

.rating-bar-col:hover .rating-bar-fill {
  background: #fbbf24;
}

/* ==========================================
   CROPPER.JS AVATAR STYLES
   ========================================== */
.cropper-view-box,
.cropper-face {
  border-radius: 50%;
}
.cropper-view-box {
  outline: 2px solid #10b981;
  outline-color: rgba(16, 185, 129, 0.75);
}