@import url("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css");


*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: #020617;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.5); border-radius: 4px; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.skeleton {
  background: linear-gradient(90deg, rgba(30,41,59,0.5) 0%, rgba(51,65,85,0.5) 50%, rgba(30,41,59,0.5) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
  border-radius: 12px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.navbar { background: rgba(2, 6, 23, 0.95); border-bottom: 1px solid rgba(255,255,255,0.06); }

/* Card System */
.card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s ease;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 40%, rgba(2,6,23,0.9) 100%);
  z-index: 1;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.6);
}
.card:active { transform: scale(0.98); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover img { transform: scale(1.08); }

.card-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; z-index: 2; }
.card-score {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background: rgba(0,0,0,0.75);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
}
.card-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  background: rgba(99,102,241,0.15);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  color: #a5b4fc;
  text-transform: uppercase;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 8px;
}
.card-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 11px; color: rgba(255,255,255,0.5); }

.card-sm .card-content { padding: 10px; }
.card-sm .card-score { top: 8px; left: 8px; padding: 4px 6px; font-size: 10px; }
.card-sm .card-title { font-size: 11px; margin-top: 6px; }
.card-sm .card-meta { font-size: 10px; margin-top: 4px; }
.card-sm .card-badge { padding: 3px 6px; font-size: 9px; }

.card-rank {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.card-sm .card-rank { width: 24px; height: 24px; font-size: 10px; top: 8px; right: 8px; }

/* Character */
.char-card { position: relative; border-radius: 14px; overflow: hidden; background: #1e293b; transition: transform 0.3s ease; }
.char-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(2,6,23,0.95) 100%); z-index: 1; }
.char-card:hover { transform: translateY(-4px); }
.char-card img { width: 100%; height: 100%; object-fit: cover; }
.char-card .info { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px; z-index: 2; }

/* Schedule */
.schedule-item { display: flex; gap: 12px; padding: 12px; background: #1e293b; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; transition: all 0.2s ease; }
.schedule-item:hover { background: #263548; border-color: rgba(99,102,241,0.3); }
.schedule-item:active { transform: scale(0.99); }
.schedule-item img { width: 50px; height: 70px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }

/* UI */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; background: linear-gradient(135deg, #6366f1, #8b5cf6); border-radius: 10px; font-size: 14px; font-weight: 600; color: #fff; transition: all 0.2s ease; box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,0.4); }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; font-size: 14px; font-weight: 500; color: #fff; transition: all 0.2s ease; }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

.btn-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: #fff; transition: all 0.2s ease; }
.btn-icon:hover { background: rgba(255,255,255,0.1); }

.chip { display: inline-flex; align-items: center; padding: 6px 12px; background: rgba(99,102,241,0.12); border-radius: 6px; font-size: 12px; font-weight: 500; color: #a5b4fc; transition: all 0.2s ease; }
.chip:hover { background: rgba(99,102,241,0.2); }

.tab { padding: 10px 16px; background: rgba(255,255,255,0.04); border-radius: 8px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.5); transition: all 0.2s ease; white-space: nowrap; }
.tab:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.tab.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }

.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-header .icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(99,102,241,0.15); border-radius: 10px; color: #a5b4fc; }
.section-header h2 { font-size: 18px; font-weight: 700; color: #fff; }
.section-header p { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 2px; }

/* Swiper containment fix */
.swiper-container { overflow: hidden; margin: 0 -16px; padding: 0 16px; }
@media (min-width: 640px) { .swiper-container { margin: 0 -24px; padding: 0 24px; } }
.swiper { overflow: hidden; padding-bottom: 40px; }
.swiper-pagination { bottom: 0 !important; }
.swiper-pagination-bullet { width: 8px; height: 8px; background: rgba(255,255,255,0.3); opacity: 1; }
.swiper-pagination-bullet-active { width: 24px; border-radius: 4px; background: #6366f1; }
.swiper-button-next, .swiper-button-prev { width: 40px; height: 40px; background: #1e293b; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: #fff; }
.swiper-button-next:hover, .swiper-button-prev:hover { background: #334155; }
.swiper-button-next::after, .swiper-button-prev::after { font-size: 14px; font-weight: 600; }
@media (max-width: 768px) { .swiper-button-next, .swiper-button-prev { display: none; } }

/* Menu Anim */
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideOut { from { transform: translateX(0); } to { transform: translateX(100%); } }
.slide-in { animation: slideIn 0.3s ease forwards; }
.slide-out { animation: slideOut 0.3s ease forwards; }

/* Detail Page (fullscreen) */
.detail-page { position: fixed; inset: 0; z-index: 50; background: #020617; overflow-y: auto; }
.detail-hero { position: relative; min-height: 50vh; }
.detail-hero-bg { position: absolute; inset: 0; }
.detail-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.detail-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, #020617 0%, rgba(2,6,23,0.8) 50%, rgba(2,6,23,0.35) 100%); }
.detail-content { position: relative; z-index: 10; }

.stat-card { background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 16px; text-align: center; }
.stat-card .value { font-size: 24px; font-weight: 700; color: #fff; }
.stat-card .label { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; }

.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.info-row:last-child { border-bottom: none; }
.info-row .label { color: rgba(255,255,255,0.5); font-size: 14px; }
.info-row .value { color: #fff; font-size: 14px; font-weight: 500; text-align: right; }

/* Detail animations */
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.slide-up { animation: slideUp 0.5s ease forwards; }