.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.event-modal {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-overlay.active .event-modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #a3c4f3 0%, #bee1e6 50%, #fcd5ce 100%);
}

.modal-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ========Images======== */
.media-slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

/* ========Single Image======== */
.media-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========Media======== */
.media-slide img,
.media-slide video {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.modal-image:hover {
  transform: scale(1.02);
}

.modal-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
  opacity: 0.8;
}

/* ========Carousel Nav======== */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: white;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 20;
  transition: all 0.2s ease;
  font-family: Arial, sans-serif;
}

.carousel-nav:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
  left: 16px;
}

.carousel-nav.next {
  right: 16px;
}

.carousel-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-nav:disabled:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1);
}

/* ========Media Controls======== */
.media-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.media-control-btn {
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.media-control-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

/* ========Carousel Indicator======== */
.carousel-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-indicator.active {
  background: white;
  transform: scale(1.2);
}

.media-counter {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  z-index: 10;
}

/* ========Zoom modal======== */
.zoom-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.zoom-modal.active {
  display: flex;
  opacity: 1;
}

.zoom-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.zoom-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.zoom-video {
  max-width: 100%;
  max-height: 90vh;
}

.zoom-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.zoom-btn {
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.zoom-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.modal-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ========Badge======== */
.modal-badge.ts {
  background: rgba(205, 234, 192, 0.9);
  color: #2d5016;
}

.modal-badge.season {
  background: rgba(252, 213, 206, 0.9);
  color: #8b2635;
}

.modal-badge.special {
  background: rgba(190, 225, 230, 0.9);
  color: #0f4c75;
}

.modal-badge.shards {
  background: rgba(240, 239, 235, 0.9);
  color: #5a5a5a;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(85vh - 200px);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 20px 0;
  line-height: 1.3;
}

/* ========Summary======== */
.quick-info-summary {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border-left: 4px solid #a3c4f3;
}

.quick-info-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-icon {
  margin-right: 8px;
  font-size: 1rem;
  width: 20px;
  flex-shrink: 0;
}

.info-label {
  font-weight: 600;
  color: #555;
  margin-right: 6px;
  min-width: fit-content;
}

.info-value {
  color: #333;
  flex: 1;
}

.info-value.na {
  color: #999;
  font-style: italic;
}

/* ========Descrition======== */
.modal-description {
  margin-bottom: 20px;
}

.description-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.description-content {
  color: #555;
  line-height: 1.6;
  font-size: 0.95rem;
}

.description-content.na {
  color: #999;
  font-style: italic;
}

/* ========Notes======== */
.modal-note {
  background: rgba(163, 196, 243, 0.1);
  border: 1px solid rgba(163, 196, 243, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 24px;
}

.note-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f4c75;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-note-content {
  font-size: 0.9rem;
  color: #0f4c75;
  line-height: 1.4;
}

/* ========Actions======== */
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 0;
}

.modal-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
}

.modal-btn.share {
  background: #f1f3f4;
  color: #333;
  border: 1px solid #ddd;
}

.modal-btn.share:hover {
  background: #e8eaed;
  transform: translateY(-1px);
}

.modal-btn.calendar {
  background: #4285f4;
  color: white;
}

.modal-btn.calendar:hover {
  background: #3367d6;
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 1rem;
}

.media-error {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* ========Responsive======== */
@media (max-width: 768px) {
  .event-modal {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    height: 160px;
  }

  .modal-body {
    padding: 20px;
    max-height: calc(90vh - 160px);
  }

  .modal-title {
    font-size: 1.3rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .info-item {
    font-size: 0.9rem;
  }

  .modal-btn {
    font-size: 0.85rem;
    padding: 10px 14px;
  }

  .carousel-nav {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .carousel-nav.prev {
    left: 12px;
  }

  .carousel-nav.next {
    right: 12px;
  }
}