/* ==========================================================================
   MIDGARD – HATE ME (Don't Let Me Down) Smart Link
   Mobile-first, pure CSS, zero external dependencies
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --card-bg: #1d1d1d;
  --card-max-width: 450px;
  --row-border: rgba(255, 255, 255, 0.18);
  --row-border-hover: rgba(255, 255, 255, 0.36);
  --row-bg: rgba(255, 255, 255, 0.02);
  --row-bg-hover: rgba(255, 255, 255, 0.055);
  --pill-border: rgba(255, 255, 255, 0.32);
  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.56);
  --accent-orchid: #c56cf0;
  --accent-magenta: #d946a8;
  --radius-row: 10px;
  --transition-fast: 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  background-color: #110f16;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 14px 36px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.4;
  background-color: #110f16;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Full-screen blurred, darkened artwork backdrop */
.page-backdrop {
  position: fixed;
  inset: -40px;
  z-index: -1;
  background-color: #110f16;
  background-image: url("/assets/artwork_web.jpg");
  background-position: center 32%;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(24px) saturate(1.35) brightness(0.7);
  transform: scale(1.06);
  opacity: 0.96;
  transition: opacity 420ms ease;
}

.page-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 28%,
    rgba(16, 12, 26, 0.16) 0%,
    rgba(10, 9, 14, 0.5) 100%
  );
}

/* Main centered dark charcoal card */
.card {
  position: relative;
  width: 100%;
  max-width: var(--card-max-width);
  background-color: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.68),
    0 4px 16px rgba(0, 0, 0, 0.42);
  isolation: isolate;
}

/* Subtle dark film-grain texture overlay */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Responsive 16:9 YouTube player flush at top of card */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 3;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Inner card padding */
.card-body {
  position: relative;
  z-index: 1;
  padding: 20px 16px 24px;
}

/* Release Header */
.release-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 0 4px;
}

.release-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-wrap: balance;
}

.release-subtitle {
  margin-top: 6px;
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* Stacked rows */
.links-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 14px 16px;
  border: 1px solid var(--row-border);
  border-radius: var(--radius-row);
  background-color: var(--row-bg);
  color: var(--text-primary);
  text-decoration: none;
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.link-row:hover {
  border-color: var(--row-border-hover);
  background-color: var(--row-bg-hover);
}

.link-row:active {
  transform: scale(0.99);
}

.link-row:focus-visible {
  outline: 2px solid var(--accent-orchid);
  outline-offset: 2px;
}

/* Featured Tickets Row (hidden by default; revealed for Serbia / local / ?show_tickets=1) */
.link-row--tickets[hidden] {
  display: none;
}

.link-row--tickets:not([hidden]) {
  animation: tickets-reveal 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tickets-reveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.link-row--tickets {
  overflow: hidden;
  border: 1px solid rgba(197, 108, 240, 0.56);
  background:
    radial-gradient(
      220px circle at var(--glow-x, 18%) var(--glow-y, 50%),
      rgba(217, 70, 168, 0.24),
      transparent 72%
    ),
    linear-gradient(
      135deg,
      rgba(104, 34, 158, 0.42) 0%,
      rgba(168, 42, 126, 0.28) 54%,
      rgba(64, 24, 112, 0.46) 100%
    );
  box-shadow:
    0 0 22px rgba(180, 82, 245, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.link-row--tickets:hover {
  border-color: rgba(220, 156, 255, 0.9);
  background:
    radial-gradient(
      240px circle at var(--glow-x, 18%) var(--glow-y, 50%),
      rgba(225, 86, 178, 0.34),
      transparent 72%
    ),
    linear-gradient(
      135deg,
      rgba(122, 42, 182, 0.54) 0%,
      rgba(186, 48, 140, 0.36) 54%,
      rgba(76, 30, 130, 0.54) 100%
    );
  box-shadow:
    0 0 28px rgba(197, 108, 240, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.link-row__left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.ticket-icon-wrap {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: rgba(210, 130, 255, 0.16);
  border: 1px solid rgba(226, 174, 255, 0.28);
  color: #ebd0ff;
}

.icon-ticket {
  width: 18px;
  height: 18px;
  display: block;
}

.ticket-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ticket-label {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.005em;
}

.ticket-sublabel {
  margin-top: 2px;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.25;
  color: rgba(242, 224, 255, 0.8);
}

/* Platform brand lockups (left side of streaming rows) */
.platform-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.platform-brand--apple {
  gap: 6px;
}

.platform-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: block;
}

.platform-icon--youtube {
  width: 26px;
  height: 19px;
}

.platform-icon--apple {
  width: 18px;
  height: 22px;
  transform: translateY(-1px);
}

.platform-icon--deezer {
  width: 24px;
  height: 22px;
}

.platform-icon--tidal {
  width: 26px;
  height: 18px;
}

.platform-name {
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.platform-name--spotify {
  color: #1ed760;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.platform-name--youtube {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.platform-name--apple {
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.platform-name--deezer {
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.platform-name--tidal {
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.24em;
}

/* Right-side CTA pill buttons */
.cta-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 12px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background-color: transparent;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.cta-play-icon {
  width: 8px;
  height: 8px;
  display: block;
}

.link-row:hover .cta-pill {
  border-color: #ffffff;
  background-color: #ffffff;
  color: #181818;
}

/* High-contrast solid Tickets pill */
.cta-pill--tickets {
  border-color: #ffffff;
  background-color: #ffffff;
  color: #180b24;
  font-weight: 700;
  padding: 6px 13px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.cta-arrow {
  font-size: 0.85rem;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.link-row--tickets:hover .cta-pill--tickets {
  border-color: #f6e7ff;
  background-color: #f6e7ff;
  color: #140720;
}

.link-row--tickets:hover .cta-arrow {
  transform: translateX(2px);
}

/* Footer: minimal social icons + copyright */
.card-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.social-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

.social-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.social-link:focus-visible {
  outline: 2px solid var(--accent-orchid);
  outline-offset: 2px;
  color: #ffffff;
}

.copyright {
  margin-top: 12px;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.04em;
}

/* Small screens (<= 380px): keep ticket label and pill cleanly aligned on one line */
@media (max-width: 380px) {
  body {
    padding: 12px 10px 28px;
  }

  .card-body {
    padding: 18px 13px 22px;
  }

  .release-title {
    font-size: 1.04rem;
  }

  .link-row {
    padding: 13px 12px;
    gap: 8px;
  }

  .link-row__left {
    gap: 8px;
  }

  .ticket-icon-wrap {
    width: 28px;
    height: 28px;
  }

  .icon-ticket {
    width: 15px;
    height: 15px;
  }

  .ticket-label {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .ticket-sublabel {
    font-size: 0.71rem;
  }

  .cta-pill--tickets {
    padding: 5px 9px;
    font-size: 0.66rem;
    gap: 3px;
  }
}

/* Desktop breathing room */
@media (min-width: 520px) {
  body {
    justify-content: center;
    padding: 32px 20px 44px;
  }

  .card-body {
    padding: 22px 20px 26px;
  }

  .release-title {
    font-size: 1.24rem;
  }

  .link-row {
    min-height: 70px;
    padding: 16px 18px;
  }

  .links-stack {
    gap: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
