@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #0f0f14;
  --panel: #151520;
  --panel-strong: #1b1b2a;
  --ink: #f7f7fb;
  --muted: #b3b6ce;
  --neon-pink: #ff00d4;
  --neon-cyan: #00e5ff;
  --glow-pink: rgba(255, 0, 212, 0.3);
  --glow-cyan: rgba(0, 229, 255, 0.22);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.45);
}

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

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at top left, rgba(0, 229, 255, 0.08), transparent 45%),
    radial-gradient(circle at bottom right, rgba(255, 0, 212, 0.08), transparent 45%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.is-hidden {
  display: none !important;
}

.bg-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  z-index: 0;
}

.glow-one {
  background: var(--glow-pink);
  top: -120px;
  right: -120px;
}

.glow-two {
  background: var(--glow-cyan);
  bottom: -180px;
  left: -140px;
}

.glow-three {
  background: rgba(255, 255, 255, 0.05);
  top: 40%;
  left: 60%;
}

.topbar {
  position: relative;
  z-index: 1000;
  padding: 28px 20px 12px;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.user-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
}

.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(255, 0, 212, 0.25));
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
}

#loginBtn {
  position: relative;
  z-index: 2;
}

.menu-panel {
  position: absolute;
  top: 56px;
  right: 0;
  background: rgba(12, 14, 22, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 8px;
  display: grid;
  gap: 6px;
  min-width: 200px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 5000;
  backdrop-filter: blur(8px);
}

.menu-item {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.menu-item:hover {
  border-color: rgba(0, 229, 255, 0.5);
  background: rgba(0, 229, 255, 0.12);
}

.menu-item.danger {
  border-color: rgba(255, 95, 109, 0.4);
  background: rgba(255, 95, 109, 0.18);
  color: #ffd6dc;
}


.menu-panel.is-hidden {
  display: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.18);
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.brand-name {
  font-family: "Syne", "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.brand-sub {
  font-size: 13px;
  color: var(--muted);
}

.container {
  position: relative;
  z-index: 1;
  padding: 20px;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.profile-page {
  display: grid;
  gap: 18px;
}

.profile-page .card.wide {
  width: 100%;
}

.hero {
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--neon-cyan);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0 0 12px;
}

h1 {
  font-family: "Syne", "Space Grotesk", sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 12px;
}

h2 {
  font-family: "Syne", "Space Grotesk", sans-serif;
  margin: 0 0 8px;
  font-size: 22px;
}

.lead {
  color: var(--muted);
  margin: 0;
}

.card-grid {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

body.host-open .card-grid {
  display: none;
}

.card-grid.single {
  grid-template-columns: 1fr;
}

.guest-inline {
  opacity: 0;
  transform: translateY(-12px);
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.3s ease;
}

.guest-inline.active {
  opacity: 1;
  transform: translateY(0);
  max-height: 1200px;
  margin-bottom: 20px;
}

.find-card {
  margin-bottom: 16px;
}

#hostInline .card + .card {
  margin-top: 16px;
}

.guest-auth {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 10px;
}

.guest-auth-title {
  font-size: 12px;
  color: var(--muted);
}

.guest-auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.host-playlists {
  display: grid;
  gap: 12px;
}

.playlist-list {
  display: grid;
  gap: 10px;
}

.playlist-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.playlist-item.clickable {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border-color: rgba(0, 229, 255, 0.18);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(255, 0, 212, 0.12));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35), 0 0 18px rgba(0, 229, 255, 0.18),
    0 0 24px rgba(255, 0, 212, 0.12);
}

.playlist-item.clickable:hover {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4), 0 0 22px rgba(0, 229, 255, 0.28),
    0 0 28px rgba(255, 0, 212, 0.2);
  transform: translateY(-1px);
}

.playlist-name {
  font-weight: 600;
}

.playlist-meta {
  font-size: 12px;
  color: var(--muted);
}

.received-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.received-card {
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.08), rgba(255, 0, 212, 0.06));
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.received-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.received-tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.received-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(255, 0, 212, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.scoreboard-hero {
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.1), rgba(255, 0, 212, 0.08));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.scoreboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scoreboard-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.scoreboard-section {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
}

.scoreboard-section h3 {
  margin: 0;
  font-size: 20px;
}

.score-pill {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.3), rgba(255, 0, 212, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.received-stat {
  background: rgba(7, 9, 14, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.received-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.received-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.received-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.received-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.received-bar-fill.organic {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.9), rgba(0, 180, 255, 0.9));
}

.received-bar-fill.boost {
  background: linear-gradient(135deg, rgba(255, 0, 212, 0.9), rgba(255, 122, 200, 0.9));
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stat-dot.organic {
  background: rgba(0, 229, 255, 0.9);
}

.stat-dot.boost {
  background: rgba(255, 0, 212, 0.9);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 7, 12, 0.7);
  display: grid;
  place-items: center;
  z-index: 200;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(520px, 100%);
  background: linear-gradient(160deg, var(--panel), var(--panel-strong));
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.auth-body {
  display: grid;
  gap: 14px;
}

.auth-divider {
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--muted);
  position: relative;
}

.auth-form .helper {
  opacity: 1;
  height: auto;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  width: 40%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.auth-providers {
  display: grid;
  gap: 10px;
}

.auth-provider {
  justify-content: flex-start;
  gap: 18px;
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid #e5e5e5;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  text-align: left;
  align-items: center;
  white-space: nowrap;
  padding-left: 18px;
  position: relative;
}

.auth-provider .auth-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

body.modal-open {
  overflow: hidden;
}

.auth-primary {
  margin-top: 6px;
  margin-bottom: 6px;
}

.auth-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #1a1a1a;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  line-height: 1;
}

.auth-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.auth-icon.google {
  color: #1a1a1a;
}

.auth-icon.facebook {
  background: #1877f2;
  color: #ffffff;
  border-color: transparent;
}

.auth-icon.email {
  background: #00e5ff;
  color: #0f1118;
  border-color: transparent;
}

.inline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card {
  background: linear-gradient(160deg, var(--panel), var(--panel-strong));
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card.neon-pink {
  border-color: rgba(255, 0, 212, 0.35);
  box-shadow: 0 30px 60px rgba(255, 0, 212, 0.2);
}

.card.neon-cyan {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 30px 60px rgba(0, 229, 255, 0.16);
}

.card.wide {
  max-width: 520px;
  margin: 0 auto;
}

.card p {
  margin: 0;
}

.card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.screen {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
}

.screen.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.btn {
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
  box-shadow: 0 12px 30px rgba(255, 0, 212, 0.25);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
}

.btn.back {
  margin-bottom: 16px;
}

.btn.small {
  padding: 10px 16px;
  font-size: 13px;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 15, 20, 0.7);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
}

.field input:focus {
  outline: none;
  border-color: rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.2);
}

.helper {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  opacity: 0;
  height: 0;
  transition: opacity 0.2s ease;
}

.helper.visible {
  opacity: 1;
  height: auto;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.tab {
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab.active {
  background: rgba(0, 229, 255, 0.2);
  border-color: rgba(0, 229, 255, 0.4);
}

.tab-panel {
  opacity: 0;
  transform: translateY(12px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tab-panel.active {
  opacity: 1;
  transform: translateY(0);
  max-height: 800px;
  pointer-events: auto;
}

.result {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: rgba(0, 229, 255, 0.08);
}

.result.hidden {
  display: none;
}

.result-header {
  font-weight: 600;
  margin-bottom: 8px;
}

.code-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.code-card {
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.code-label {
  font-size: 12px;
  color: var(--muted);
}

.code-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 6px 0 10px;
}

.code-inline {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.footer {
  text-align: center;
  padding: 40px 20px 30px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0, 229, 255, 0.05), transparent 40%),
    radial-gradient(circle at bottom, rgba(255, 0, 212, 0.05), transparent 40%);
  pointer-events: none;
}

@media (min-width: 860px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar {
    padding: 36px 20px 12px;
  }

  .container {
    padding: 30px 20px 60px;
  }
}

@media (max-width: 520px) {
  .topbar {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .user-status {
    width: auto;
    justify-content: flex-end;
  }

  .brand {
    gap: 12px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-sub {
    font-size: 11px;
  }
}
