/* Past Livestreams Page Specific Styles */

.past-lives-container {
  max-width: 1200px;
}

.header {
  position: relative;
}

.back-link {
  position: absolute;
  top: 20px;
  left: 20px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.back-link:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: translateX(-4px);
}

/* Filters */
.filters-card {
  padding: 24px;
  position: relative;
  z-index: 100;
  overflow: visible !important;
}

.filters-card:hover {
  transform: none;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.filters-header h2 {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-reset {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-reset:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  position: relative;
  z-index: 100;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.filter-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.filter-group select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Custom Month/Year Picker */
.custom-month-picker {
  position: relative;
}

.custom-month-picker input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.custom-month-picker input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.custom-month-picker input:hover {
  border-color: var(--primary);
}

.custom-month-picker input::placeholder {
  color: var(--text-secondary);
}

.picker-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  transition: transform 0.3s ease;
}

.custom-month-picker.open .picker-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.month-picker-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  z-index: 9999;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: none;
  animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-month-picker.open .month-picker-dropdown {
  display: block;
}

.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.picker-year {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.picker-nav {
  width: 36px;
  height: 36px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.picker-nav:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.picker-months {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.picker-months button {
  padding: 12px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.picker-months button:hover {
  background: rgba(255, 0, 0, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.picker-months button.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.picker-months button.current {
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(6, 95, 212, 0.2);
}

.picker-clear {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.picker-clear:hover {
  border-color: var(--error);
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* View Toggle */
.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: 10px;
}

.view-btn {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.view-btn:hover {
  color: var(--text-primary);
}

.view-btn.active {
  background: var(--primary);
  color: white;
}

/* Stats Bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 16px 24px;
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.stat-item i {
  color: var(--primary);
}

.stat-item span {
  font-weight: 700;
  color: var(--text-primary);
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 80px 20px;
}

.loading-state p {
  margin-top: 20px;
  color: var(--text-secondary);
}

.spinner.large {
  width: 48px;
  height: 48px;
  margin: 0 auto;
}

/* Error State */
.error-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.error-state i {
  font-size: 48px;
  color: var(--error);
  margin-bottom: 16px;
}

.error-state h3 {
  margin-bottom: 8px;
}

.error-state p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.error-state .btn {
  max-width: 200px;
  margin: 0 auto;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.empty-state i {
  font-size: 48px;
  color: var(--text-secondary);
  opacity: 0.3;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
}

/* Videos Grid */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* Video Card */
.video-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255, 0, 0, 0.2);
  border-color: var(--primary);
}

.video-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-input);
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.05);
}

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.video-live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-live-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 0, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.play-overlay i {
  color: white;
  font-size: 24px;
  margin-left: 4px;
}

.video-card:hover .play-overlay {
  opacity: 1;
}

.video-info {
  padding: 16px;
}

.video-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.video-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* List View */
.videos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-list-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-list-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.video-list-item .video-thumbnail {
  width: 180px;
  flex-shrink: 0;
  border-radius: 8px;
}

.video-list-item .video-info {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.video-list-item .video-title {
  font-size: 16px;
  margin-bottom: 8px;
}

/* Calendar View */
.calendar-view {
  padding: 24px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.calendar-header h3 {
  font-size: 20px;
  font-weight: 600;
}

.calendar-nav {
  width: 40px;
  height: 40px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.calendar-nav:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.calendar-weekdays div {
  text-align: center;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-height: 60px;
}

.calendar-day:hover {
  border-color: var(--primary);
}

.calendar-day.empty {
  background: transparent;
  border: none;
  cursor: default;
}

.calendar-day.today {
  border-color: var(--secondary);
  background: rgba(6, 95, 212, 0.1);
}

.calendar-day.has-video {
  background: rgba(255, 0, 0, 0.1);
  border-color: var(--primary);
}

.calendar-day.has-video:hover {
  background: rgba(255, 0, 0, 0.2);
}

.calendar-day .day-number {
  font-size: 14px;
  font-weight: 600;
}

.calendar-day .video-count {
  font-size: 10px;
  color: var(--primary);
  margin-top: 2px;
}

.calendar-day-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-width: 250px;
  max-width: 300px;
  z-index: 100;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  display: none;
}

.calendar-day.has-video:hover .calendar-day-popup {
  display: block;
}

.calendar-popup-item {
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
  display: flex;
  gap: 10px;
  align-items: center;
}

.calendar-popup-item:hover {
  background: var(--bg-input);
}

.calendar-popup-item img {
  width: 60px;
  height: 34px;
  object-fit: cover;
  border-radius: 4px;
}

.calendar-popup-item .title {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  flex: 1;
}

/* Video Modal */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.modal-close:hover {
  background: var(--primary);
  transform: rotate(90deg);
}

.modal-video {
  aspect-ratio: 16/9;
  background: black;
}

.modal-video iframe {
  width: 100%;
  height: 100%;
}

.modal-info {
  padding: 24px;
}

.modal-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal-meta {
  display: flex;
  gap: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Load More */
.load-more {
  text-align: center;
  padding: 32px 0;
}

.btn-secondary {
  background: var(--bg-input);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--primary);
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
}

/* YouTube Link */
.youtube-link {
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.youtube-link:hover {
  color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .back-link {
    position: static;
    margin-bottom: 16px;
    display: inline-flex;
  }

  .header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .header-content {
    width: 100%;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    gap: 20px;
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .video-list-item {
    flex-direction: column;
  }

  .video-list-item .video-thumbnail {
    width: 100%;
  }

  .calendar-day {
    min-height: 50px;
  }

  .calendar-day .day-number {
    font-size: 12px;
  }

  .modal-content {
    width: 95%;
    border-radius: 16px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
  }
}

@media (max-width: 480px) {
  .calendar-weekdays div {
    font-size: 11px;
    padding: 8px 4px;
  }

  .calendar-day {
    min-height: 40px;
    border-radius: 6px;
  }
}
