/* Category Stories Styles - Instagram Style Circular Categories */
.category-stories-section {
  margin: 0 !important;
  padding: 10px 0;
  position: relative;
}

.category-stories-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.category-stories-wrapper {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 0 !important;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
  scroll-behavior: smooth;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.category-stories-wrapper::-webkit-scrollbar {
  display: none;
}

.category-story {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
  max-width: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.category-story:hover {
  transform: translateY(-5px);
}

.category-story-ring {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(45deg, #7c3aed, #a78bfa);
  padding: 3px;
  margin-bottom: 8px;
}

.category-story-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #fff;
  overflow: hidden;
  position: relative;
}

.category-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-story:hover .category-story-image img {
  transform: scale(1.1);
}

.category-story-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e293b;
  text-align: center;
  margin: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Category Story Modal */
.category-story-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.category-story-modal.active {
  display: flex;
}

.category-story-modal-content {
  width: 100%;
  max-width: 500px;
  height: 80vh;
  max-height: 800px;
  background-color: #fff;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.category-story-modal-header {
  padding: 15px;
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.category-story-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-story-modal-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #7c3aed;
}

.category-story-modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-story-modal-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.category-story-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.category-story-modal-close:hover {
  background-color: rgba(0, 0, 0, 0.2);
}

.category-story-modal-close svg {
  width: 18px;
  height: 18px;
  color: #1e293b;
}

.category-story-modal-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.category-story-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Modal buton alanı */
.category-story-modal-footer {
  padding: 15px;
  display: flex;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 10;
}

.category-story-modal-button {
  background-color: #7c3aed;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-story-modal-button:hover {
  background-color: #6d28d9;
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* Progress bar */
.category-story-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.3);
  z-index: 11;
}

.category-story-progress-bar {
  height: 100%;
  background-color: #7c3aed;
  width: 0;
  transition: width 5s linear;
}

/* Navigation arrows */
.category-story-modal-prev,
.category-story-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.category-story-modal-prev {
  left: 15px;
}

.category-story-modal-next {
  right: 15px;
}

.category-story-modal-prev:hover,
.category-story-modal-next:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.category-story-modal-prev svg,
.category-story-modal-next svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .category-story {
      min-width: 80px;
      max-width: 80px;
  }
  
  .category-story-ring {
      width: 70px;
      height: 70px;
  }
  
  .category-story-name {
      font-size: 0.8rem;
  }
  
  .category-story-modal-content {
      width: 90%;
      height: 70vh;
  }
  
  .category-story-modal-footer {
      padding: 12px;
  }
  
  .category-story-modal-button {
      font-size: 0.85rem;
      padding: 8px 16px;
  }
}

@media (max-width: 576px) {
  .category-story {
      min-width: 70px;
      max-width: 70px;
  }
  
  .category-story-ring {
      width: 60px;
      height: 60px;
  }
  
  .category-story-name {
      font-size: 0.75rem;
  }
  
  .category-story-modal-footer {
      padding: 10px;
  }
  
  .category-story-modal-button {
      font-size: 0.8rem;
      padding: 7px 14px;
  }
}


/* Dark mode uyumluluğu */
body.dark-mode .category-story-modal-content {
  background-color: #1e293b;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .category-story-modal-header {
  background-color: rgba(30, 41, 59, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.dark-mode .category-story-modal-footer {
  background-color: rgba(30, 41, 59, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .category-story-modal-name {
  color: #e2e8f0;
}

body.dark-mode .category-story-modal-close {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .category-story-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .category-story-modal-close svg {
  color: #e2e8f0;
}

body.dark-mode .category-story-modal-image {
  background-color: #0f172a;
}

body.dark-mode .category-story-name {
  color: #e2e8f0;
}

body.dark-mode .category-story-progress {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .category-story-progress-bar {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

body.dark-mode .category-story-modal-button {
  background-color: #6d28d9;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .category-story-modal-button:hover {
  background-color: #7c3aed;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}