/* === SpectroChip Video Wall — Custom Styles === */

:root {
  --primary: #258cf4;
  --primary-rgb: 37, 140, 244;
  --dark-bg: #101922;
  --dark-card: #1a2332;
  --dark-surface: #243040;
  --glass-bg: rgba(26, 35, 50, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* === Base === */
body {
  font-family: "Spline Sans", sans-serif;
  background: var(--dark-bg);
  color: #e2e8f0;
}

/* === Glass-morphism === */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

/* === Scrollbar === */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.custom-scrollbar::-webkit-scrollbar {
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--dark-surface);
  border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

/* === Featured Player === */
.video-glow {
  box-shadow: 0 0 60px -12px rgba(var(--primary-rgb), 0.3);
}

.player-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #000;
  border: 1px solid var(--glass-border);
}

.player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* === Video Cards === */
.video-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(var(--primary-rgb), 0.15);
}

.video-card .thumb-container {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  background: var(--dark-card);
  border: 1px solid var(--glass-border);
  transition: border-color 0.3s ease;
}

.video-card:hover .thumb-container {
  border-color: rgba(var(--primary-rgb), 0.5);
}

.video-card .thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.video-card:hover .thumb-img {
  transform: scale(1.08);
}

.video-card .play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--primary-rgb), 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.video-card.active .thumb-container {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3);
}

/* Duration badge */
.duration-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.85);
  font-size: 0.625rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

/* Progress indicator on card */
.card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 0 0.75rem;
  transition: width 0.3s ease;
}

/* === Sort Buttons === */
.sort-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.sort-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.sort-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

/* === Filter Buttons === */
.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
  font-weight: 500;
  color: #e2e8f0;
  transition: all 0.2s ease;
  cursor: pointer;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.filter-btn select {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* === Dropdown option fix (dark mode) === */
select option {
  background: #1a2332;
  color: #e2e8f0;
}

select {
  color-scheme: dark;
}

/* === Sidebar Navigation === */
#sidebar {
  position: fixed;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem;
  border-radius: 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-btn {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.sidebar-divider {
  width: 2rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.25rem auto;
}

/* === Action Buttons (like, share, save) === */
.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.action-btn.liked {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.3);
}

/* === Search Input === */
.search-wrapper {
  position: relative;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  transition: color 0.2s;
}

.search-wrapper:focus-within .search-icon {
  color: var(--primary);
}

.search-input {
  width: 100%;
  height: 2.75rem;
  padding-left: 2.75rem;
  padding-right: 1rem;
  border-radius: 0.5rem;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: #64748b;
}

.search-input:focus {
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.5);
}

/* === Badge === */
.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: rgba(var(--primary-rgb), 0.2);
  color: var(--primary);
}

.badge-trending {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* === Section Headers === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scroll-btn {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  transition: all 0.2s ease;
}

.scroll-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* === Notification Dropdown === */
#notif-dropdown {
  animation: fade-in 0.15s ease;
}

/* === Loading Skeleton === */
.skeleton {
  background: linear-gradient(90deg, var(--dark-card) 25%, var(--dark-surface) 50%, var(--dark-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === Responsive === */
@media (max-width: 1535px) {
  #sidebar {
    display: none;
  }
}

@media (max-width: 1024px) {
  .header-filters {
    display: none;
  }
}

@media (max-width: 768px) {
  .video-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .action-buttons {
    width: 100%;
    justify-content: flex-start;
  }
}

/* === Animations === */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fade-in 0.3s ease forwards;
}

/* === Empty State === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: #64748b;
  text-align: center;
}

.empty-state .material-symbols-outlined {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}
