/* ═══════════════════════════════════════════════════════════════════════════════
   MangaOku — Modern UI/UX CSS (Sadscans Tarzı)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Animasyonlar ─────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(124, 109, 255, 0.3); }
  50% { box-shadow: 0 0 40px rgba(124, 109, 255, 0.6); }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ─── Global Animasyon Sınıfları ──────────────────────────────────────────────── */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.4s ease-out;
}

/* ─── Manga Kartları — Geliştirilmiş Hover ─────────────────────────────────────── */
.manga-card-modern {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #13161f;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.manga-card-modern:hover {
  transform: translateY(-8px);
  border-color: rgba(124, 109, 255, 0.3);
  box-shadow: 0 20px 40px rgba(124, 109, 255, 0.15);
}

.manga-card-modern .card-image {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3/4;
  background: #0a0c13;
}

.manga-card-modern .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.manga-card-modern:hover .card-image img {
  transform: scale(1.1);
}

.manga-card-modern .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 12, 19, 0.8) 60%, rgba(10, 12, 19, 0.95) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.manga-card-modern:hover .card-overlay {
  opacity: 1;
}

.manga-card-modern .card-overlay-content {
  animation: slideInUp 0.4s ease-out;
}

.manga-card-modern .card-overlay-content h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #f0f0f5;
}

.manga-card-modern .card-overlay-content p {
  font-size: 12px;
  color: #9395a8;
  margin-bottom: 12px;
  line-height: 1.4;
}

.manga-card-modern .card-overlay-btn {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #7c6dff, #5a4de0);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.manga-card-modern .card-overlay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(124, 109, 255, 0.4);
}

/* ─── Slider/Carousel Geliştirilmesi ───────────────────────────────────────────── */
.slider-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #0a0c13;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.slide {
  flex: 0 0 100%;
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 12, 19, 0.98) 0%, rgba(10, 12, 19, 0.6) 40%, transparent 100%);
}

.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  animation: slideInUp 0.6s ease-out;
}

.slide-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.slide-content p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
  max-width: 600px;
  line-height: 1.6;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-size: 20px;
  z-index: 10;
}

.slider-btn:hover {
  background: rgba(124, 109, 255, 0.6);
  border-color: rgba(124, 109, 255, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.slider-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider-dot.active {
  background: #7c6dff;
  width: 28px;
  border-radius: 5px;
  border-color: #7c6dff;
}

.slider-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
}

/* ─── Dropdown Menüsü Animasyonu ───────────────────────────────────────────────── */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #13161f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  min-width: 200px;
  padding: 8px 0;
  margin-top: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a,
.dropdown-menu button {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: #9395a8;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: rgba(124, 109, 255, 0.15);
  color: #7c6dff;
  padding-left: 20px;
}

.dropdown-menu a:first-child {
  border-radius: 12px 12px 0 0;
}

.dropdown-menu a:last-child {
  border-radius: 0 0 12px 12px;
}

/* ─── Buton Animasyonları ──────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #7c6dff, #5a4de0);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 109, 255, 0.4);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.08);
  color: #9395a8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(124, 109, 255, 0.15);
  border-color: rgba(124, 109, 255, 0.3);
  color: #7c6dff;
}

/* ─── Favorilerim Butonu ───────────────────────────────────────────────────────── */
.favorite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9395a8;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 20px;
}

.favorite-btn:hover {
  background: rgba(255, 66, 77, 0.15);
  border-color: rgba(255, 66, 77, 0.3);
  color: #ff424d;
}

.favorite-btn.favorited {
  background: rgba(255, 66, 77, 0.2);
  border-color: rgba(255, 66, 77, 0.4);
  color: #ff424d;
  animation: pulse-soft 0.6s ease-out;
}

.favorite-btn.loading {
  animation: pulse-soft 0.8s ease-in-out infinite;
}

/* ─── Sayfa Geçişi Animasyonu ──────────────────────────────────────────────────── */
.page-transition {
  animation: fadeInUp 0.5s ease-out;
}

/* ─── Loading Spinner ──────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(124, 109, 255, 0.2);
  border-top-color: #7c6dff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── Tooltip ──────────────────────────────────────────────────────────────────── */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #13161f;
  color: #f0f0f5;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: 135%;
}

/* ─── Scroll Animasyonu ────────────────────────────────────────────────────────── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive Ayarlamalar ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .slide-content {
    padding: 24px;
  }

  .slide-content h2 {
    font-size: 1.5rem;
  }

  .slide-content p {
    font-size: 12px;
  }

  .slider-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .manga-card-modern .card-overlay {
    opacity: 1;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 12, 19, 0.9) 50%, rgba(10, 12, 19, 0.98) 100%);
  }

  .btn-primary,
  .btn-secondary {
    font-size: 12px;
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .slide {
    min-height: 300px;
  }

  .slider-dots {
    bottom: 12px;
  }

  .slider-dot {
    width: 8px;
    height: 8px;
  }

  .slider-dot.active {
    width: 24px;
  }
}
