/* css/components.css — Glass Aurora Components */

/* ═══════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.4s var(--ease-out-quart);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255, 255, 255, 0.25) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(255, 62, 154, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 62, 154, 0.35),
    0 0 0 1px rgba(255, 62, 154, 0.15);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.5);
  color: var(--color-text);
  border: 1px solid rgba(255, 62, 154, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 20px rgba(255, 62, 154, 0.08);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.4);
  color: var(--color-text);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.6);
}

.btn-white {
  background: white;
  color: var(--color-primary);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 62, 154, 0.15);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  color: var(--color-text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all 0.3s var(--ease-out-quart);
  font-size: 1rem;
}

.btn-icon:hover {
  color: var(--color-primary);
  border-color: var(--color-border-hover);
  background: rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════════════
   CARDS — GLASS MORPHISM
   ═══════════════════════════════════════════════════ */
.card {
  background: var(--color-bg-card);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.4s var(--ease-out-quart);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  pointer-events: none;
}

.card:hover {
  background: var(--color-bg-card-hover);
  border-color: rgba(255, 62, 154, 0.15);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 62, 154, 0.08);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 62, 154, 0.1);
}

.badge-accent {
  background: var(--color-accent-dim);
  color: var(--color-accent);
  border-color: rgba(123, 97, 255, 0.1);
}

/* ═══════════════════════════════════════════════════
   LIVE STATUS DOT
   ═══════════════════════════════════════════════════ */
.live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s infinite;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  transition: all 0.3s;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(255, 62, 154, 0.06);
}

.live-badge:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 62, 154, 0.2);
}

/* ═══════════════════════════════════════════════════
   AVATARS
   ═══════════════════════════════════════════════════ */
.avatar-group {
  display: flex;
  align-items: center;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid white;
  margin-left: -8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.avatar:first-child {
  margin-left: 0;
}

/* ═══════════════════════════════════════════════════
   LINK CARDS
   ═══════════════════════════════════════════════════ */
.link-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.4s var(--ease-out-quart);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}

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

.link-card:hover::before {
  opacity: 1;
}

.link-card>* {
  position: relative;
  z-index: 1;
}

.link-card:hover .link-text,
.link-card:hover .link-subtext {
  color: white !important;
}

.link-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 62, 154, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: all 0.3s;
}

.link-card:hover .link-icon-wrapper {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.link-icon-wrapper.link-icon-favicon {
  background: transparent !important;
}

.link-icon-wrapper .link-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.link-text {
  font-weight: 800;
  font-size: 1rem;
  transition: color 0.3s;
}

.link-subtext {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.link-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  transition: all 0.3s;
  flex-shrink: 0;
}

.link-card:hover .link-arrow {
  background: rgba(255, 255, 255, 0.2);
  border-color: transparent;
  color: white;
}

/* ═══════════════════════════════════════════════════
   WAVEFORM BARS (decorative)
   ═══════════════════════════════════════════════════ */
.waveform {
  display: flex;
  gap: 2px;
  align-items: center;
  height: 20px;
}

.waveform-bar {
  width: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  opacity: 0.25;
}

/* ═══════════════════════════════════════════════════
   SECTION DIVIDER
   ═══════════════════════════════════════════════════ */
.section-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 62, 154, 0.06);
  position: relative;
}

.section-divider::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
  box-shadow: var(--shadow-glow);
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .card {
    padding: 1.25rem;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
  }

  .link-card {
    padding: 1.25rem;
    gap: 1rem;
  }

  .link-icon-wrapper {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}

/* ═══════════════════════════════════════════════════
   MODALS (UNIVERSAL PLAYER)
   ═══════════════════════════════════════════════════ */
.highlight-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s var(--ease-out-quart);
}

.highlight-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.highlight-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.highlight-modal-content {
  position: relative;
  width: 90%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
}

.highlight-modal.active .highlight-modal-content {
  /* No transform to prevent video aliasing */
}

.highlight-modal-content.vertical {
  aspect-ratio: 9 / 16;
  max-width: 400px;
  max-height: 85vh;
  width: auto;
}

.highlight-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.highlight-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.highlight-modal-player {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.highlight-modal-forbidden {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  padding: 2rem;
  text-align: center;
}

.highlight-modal-forbidden a {
  padding: 12px 24px;
  background: var(--ime-primary, #fff);
  color: #000;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.highlight-modal-forbidden a:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .highlight-modal-content {
    width: 100%;
    aspect-ratio: auto;
    height: 100%;
    border-radius: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Hide heavy Aurora background when video modal is open to free up 100% GPU for 60fps video playback */
body.modal-active .aurora-bg {
  display: none !important;
}