/* ============================================================
   FocusTube — Global Styles
   Dark theme, minimal, distraction-free learning aesthetic
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colour palette */
  --bg-primary: #0c0c14;
  --bg-secondary: #13131f;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --bg-input: #1a1a2e;
  --bg-sidebar: #111120;

  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.25);
  --accent-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);

  --success: #00cec9;
  --success-dim: rgba(0, 206, 201, 0.15);
  --warning: #fdcb6e;
  --danger: #ff7675;

  --text-primary: #edf0f5;
  --text-secondary: #9a9cb8;
  --text-muted: #5c5e78;

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-xs: 0.75rem;
  --font-sm: 0.875rem;
  --font-base: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.5rem;
  --font-2xl: 2rem;
  --font-3xl: 2.5rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ---------- Hero / Paste Section ---------- */
.hero {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.hero h1 {
  font-size: var(--font-3xl);
  font-weight: 800;
  margin-bottom: var(--space-md);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: var(--font-lg);
  max-width: 550px;
  margin: 0 auto var(--space-xl);
}

.input-group {
  display: flex;
  max-width: 640px;
  margin: 0 auto;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border: 1px solid var(--border-hover);
  transition: border-color var(--transition-base);
}

.input-group:focus-within {
  border-color: var(--accent);
}

.input-group input {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-base);
  font-family: var(--font-family);
  background: var(--bg-input);
  color: var(--text-primary);
  border: none;
  outline: none;
}

.input-group input::placeholder {
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-family);
  font-size: var(--font-sm);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-xs);
}

.btn-danger {
  background: rgba(255, 118, 117, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 118, 117, 0.25);
}

.btn-danger:hover {
  background: rgba(255, 118, 117, 0.25);
}

.btn-success {
  background: rgba(0, 206, 201, 0.15);
  color: var(--success);
  border: 1px solid rgba(0, 206, 201, 0.25);
}

.btn-success:hover {
  background: rgba(0, 206, 201, 0.25);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-2xl) 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.section-title {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: var(--font-sm);
  color: var(--text-muted);
}

/* ---------- Course Grid ---------- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* ---------- Card ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.card-body {
  padding: var(--space-lg);
}

.card-title {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-channel {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.card-description {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

/* ---------- Progress Bar ---------- */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-top: var(--space-sm);
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width var(--transition-slow);
}

.progress-text {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* ---------- Continue Learning Card ---------- */
.continue-card {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
}

.continue-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.continue-card .card-thumb {
  width: 200px;
  min-width: 200px;
  aspect-ratio: 16 / 9;
}

.continue-card .card-body {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
}

.continue-card .card-footer {
  padding: 0 var(--space-lg) var(--space-md);
}

/* ============================================================
   PLAYER PAGE
   ============================================================ */

.player-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top bar */
.player-topbar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-secondary);
  font-size: var(--font-sm);
  font-weight: 500;
}

.back-link:hover {
  color: var(--accent-light);
}

.player-course-title {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main content area */
.player-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Video panel */
.video-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  min-width: 0;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  /* Modern aspect-ratio */
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 1;
}

.distraction-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 12, 20, 0.98);
  /* Near opaque to hide suggestions */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.distraction-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay-content {
  text-align: center;
  padding: var(--space-xl);
  max-width: 450px;
  animation: fadeInOverlay 0.5s ease-out;
}

.overlay-title {
  font-size: var(--font-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.overlay-text {
  color: var(--text-secondary);
  font-size: var(--font-base);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-info {
  margin-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.video-progress-text {
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.video-progress-text span {
  color: var(--accent-light);
  font-weight: 600;
}

.player-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.player-progress-section {
  margin-top: var(--space-md);
}

.player-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.player-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.player-error-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  text-align: center;
  padding: var(--space-xl);
}

.error-content {
  max-width: 400px;
  animation: fadeIn 0.4s ease-out;
}

.error-content h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.error-content p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  line-height: 1.6;
}

.player-progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 4px;
  transition: width var(--transition-base);
}

/* Playlist sidebar */
.playlist-sidebar {
  width: 380px;
  min-width: 380px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.sidebar-title {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.sidebar-count {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.playlist-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm) 0;
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-left: 3px solid transparent;
}

.playlist-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.playlist-item.active {
  background: rgba(108, 92, 231, 0.1);
  border-left-color: var(--accent);
}

.playlist-item.completed .item-title {
  color: var(--text-muted);
}

.item-index {
  font-size: var(--font-xs);
  color: var(--text-muted);
  min-width: 24px;
  text-align: center;
}

.item-check {
  color: var(--success);
  font-size: var(--font-sm);
}

.item-title {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-item.active .item-title {
  color: var(--text-primary);
  font-weight: 500;
}

/* Keyboard shortcuts tooltip */
.shortcuts-hint {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  font-size: var(--font-xs);
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.shortcuts-hint kbd {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: 11px;
  border: 1px solid var(--border-hover);
  color: var(--text-secondary);
}

/* ============================================================
   UTILITIES
   ============================================================ */

.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn var(--transition-slow) ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.text-muted {
  color: var(--text-muted);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  color: var(--text-primary);
  font-size: var(--font-sm);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: slideInUp 300ms ease;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state p {
  font-size: var(--font-sm);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .player-content {
    flex-direction: column;
  }

  .playlist-sidebar {
    width: 100%;
    min-width: 100%;
    max-height: 350px;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .course-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* Mobile */
@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero h1 {
    font-size: var(--font-2xl);
  }

  .hero p {
    font-size: var(--font-base);
  }

  .input-group {
    flex-direction: column;
    border-radius: var(--radius-sm);
  }

  .input-group input {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }

  .input-group .btn {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  }

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

  .continue-card {
    flex-direction: column;
  }

  .continue-card .card-thumb {
    width: 100%;
    min-width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .video-panel {
    padding: var(--space-sm);
  }

  .player-topbar {
    padding: var(--space-md);
  }

  .nav-links {
    display: none;
  }
}

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 200ms ease;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h2 {
  font-size: var(--font-lg);
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--font-lg);
  cursor: pointer;
  padding: var(--space-xs);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.modal-hint {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.modal-input {
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-family);
  font-size: var(--font-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.modal-input:focus {
  border-color: var(--accent);
}

.modal-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

/* ============================================================
   TOPIC CHIPS
   ============================================================ */

.topic-chips-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: var(--space-xl);
  padding: 0 40px;
  /* Space for arrows */
}

.topic-chips {
  display: flex;
  flex-wrap: nowrap;
  /* Force single line */
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
  padding: 4px 0;
}

.topic-chips::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  font-family: var(--font-family);
  font-size: var(--font-xs);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.topic-chip:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.topic-chip.active {
  background: rgba(108, 92, 231, 0.2);
  border-color: var(--accent);
  color: var(--accent-light);
  font-weight: 600;
}

.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
  font-size: 20px;
  opacity: 0;
  pointer-events: none;
}

.scroll-arrow:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.scroll-arrow-left {
  left: 0;
}

.scroll-arrow-right {
  right: 0;
}

/* ============================================================
   SHIMMER LOADING
   ============================================================ */

.shimmer {
  background: linear-gradient(90deg,
      var(--bg-card) 25%,
      var(--bg-card-hover) 50%,
      var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmerAnim 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.shimmer-card {
  pointer-events: none;
}

.shimmer-card .card-thumb {
  aspect-ratio: 16 / 9;
}

.shimmer-line {
  display: block;
}

@keyframes shimmerAnim {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================================================
   BADGES
   ============================================================ */

.trusted-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--warning);
  background: rgba(253, 203, 110, 0.12);
  padding: 2px 8px;
  border-radius: 12px;
  vertical-align: middle;
  margin-left: 4px;
}

.card-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ============================================================
   MAGIC EFFECTS — Border Glow, Spotlight, Particles
   ============================================================ */

.magic-glow {
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-intensity: 0;
  --glow-radius: 400px;
  --glow-color: 108, 92, 231;
}

/* Border glow pseudo-element — follows cursor */
.magic-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 4px;
  background: radial-gradient(var(--glow-radius) circle at var(--glow-x) var(--glow-y),
      rgba(var(--glow-color), calc(var(--glow-intensity) * 0.8)) 0%,
      rgba(var(--glow-color), calc(var(--glow-intensity) * 0.4)) 30%,
      transparent 60%);
  border-radius: inherit;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.magic-glow:hover {
  box-shadow:
    0 4px 20px rgba(46, 24, 78, 0.3),
    0 0 30px rgba(108, 92, 231, 0.15);
}

/* Particle soft glow */
.magic-particle::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: rgba(108, 92, 231, 0.2);
  border-radius: 50%;
  z-index: -1;
}

/* Global spotlight cursor follower */
.global-spotlight {
  mix-blend-mode: screen;
  will-change: transform, opacity;
  z-index: 200 !important;
  pointer-events: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--font-xs);
}