/* =======================
   Coverflow Responsive Fixed
======================= */

@import url('https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css');

html, body {
  width: 100%;
  overflow-x: hidden;
  font-family: 'Vazir', sans-serif;
}

* {
  box-sizing: border-box;
}

.coverflow-wrapper {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  overflow: hidden; /* جلوگیری از بیرون زدن آیتم‌ها */
}

.coverflow-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  position: relative;
  overflow: hidden;
}

.coverflow {
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 400px;
  overflow: visible;
}

.coverflow-item {
  position: absolute;
  width: 300px;
  height: 300px;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
  user-select: none;
  will-change: transform;
}

.coverflow-item .cover {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
  background: #333;
}

.coverflow-item .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.coverflow-item .reflection {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scaleY(-1);
  opacity: 0.2;
  filter: blur(2px);
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,1) 100%);
}

.coverflow-item.active {
  z-index: 100;
  transform: translateX(0) translateZ(0) rotateY(0deg);
}

/* Navigation */
.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 200;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.nav-button.prev { left: 2%; }
.nav-button.next { right: 2%; }

/* Dots indicator */
.dots-container {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.dot.active {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.3);
}

/* Info */
.info {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
}

.info h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

.info p {
  font-size: 16px;
  opacity: 0.7;
}

/* Play/Pause Button */
.play-pause-button {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 200;
}

.play-pause-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-50%) scale(1.1);
}

/* =======================
   RESPONSIVE DESIGN FIXED
======================= */

@media (max-width: 992px) {
  .coverflow { height: 320px; }
  .coverflow-item { width: 240px; height: 240px; }
  .info h2 { font-size: 26px; }
}

@media (max-width: 768px) {
  .coverflow-wrapper {
    height: 85vh;
    padding-top: 60px;
  }
  .coverflow { height: 240px; }
  .coverflow-item { width: 180px; height: 180px; }
  .nav-button.prev { left: 5%; }
  .nav-button.next { right: 5%; }
  .info { top: 90px; }
  .info h2 { font-size: 22px; }
  .dots-container { bottom: 40px; }
  .play-pause-button { bottom: 70px; }
}

@media (max-width: 480px) {
  .coverflow-wrapper {
    height: 75vh;
    padding-top: 40px;
  }
  .coverflow-item {
    width: 130px;
    height: 130px;
  }
  .nav-button {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .info h2 { font-size: 18px; }
  .info p { font-size: 12px; }
  .dots-container { bottom: 30px; gap: 6px; }
  .dot { width: 8px; height: 8px; }
  .play-pause-button {
    width: 38px;
    height: 38px;
    font-size: 14px;
    bottom: 55px;
  }
}
