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

:root {
  --bg: #08080a;
  --bg-elevated: #131316;
  --bg-card: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(212,175,55,0.35);
  --text: #f5f5f7;
  --text-muted: #9a9aa5;
  --gold-1: #f4d675;
  --gold-2: #d4af37;
  --gold-3: #a9791f;
  --gold-gradient: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 45%, var(--gold-3) 100%);
  --danger: #ef5a5a;
  --success: #3ddc84;
  --shadow-gold: 0 8px 30px -8px rgba(212,175,55,0.35);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(212,175,55,0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(212,175,55,0.06), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-font { font-family: 'Poppins', 'Inter', sans-serif; }

a { color: var(--gold-1); text-decoration: none; transition: color .15s ease; }
a:hover { color: #fff; }

/* ---------- Header / logo ---------- */
header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(8,8,10,0.6);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.5px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand svg, .brand-icon { width: 30px; height: 30px; flex-shrink: 0; filter: drop-shadow(0 2px 8px rgba(212,175,55,0.55)); border-radius: 7px; object-fit: cover; }

nav.topnav { display: flex; align-items: center; gap: 22px; }
nav.topnav a { color: var(--text-muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
nav.topnav a:hover { color: var(--text); }

.hamburger-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 680px) {
  header.topbar { padding: 14px 18px; flex-wrap: nowrap; }
  .brand { font-size: 17px; gap: 7px; }
  .brand svg, .brand-icon { width: 24px; height: 24px; }

  .hamburger-btn { display: block; }
  nav.topnav {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10,10,12,0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-strong);
    padding: 8px 18px 18px;
    z-index: 60;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  }
  nav.topnav.open { display: flex; animation: fadeInUp .25s ease both; }
  nav.topnav a, nav.topnav span { padding: 13px 4px; border-bottom: 1px solid var(--border); font-size: 15px; }
  nav.topnav a:last-child { border-bottom: none; }
  nav.topnav .btn { margin-top: 10px; width: 100%; }

  main { padding: 28px 16px 90px; }
  .hero { padding: 44px 8px 36px; }
  .card { padding: 20px; }
  .player-bar { padding: 10px 14px; gap: 12px; }
  .player-bar audio { max-width: 46vw; }
}

/* ---------- Layout ---------- */
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 90px 20px 56px;
  animation: fadeInUp .7s ease both;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-1);
  background: rgba(212,175,55,0.1);
  border: 1px solid var(--border-strong);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}
.hero h1 .accent {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--text-muted); font-size: 17px; max-width: 560px; margin: 0 auto; line-height: 1.6; }

.hero-banner {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 52px auto 0;
  border-radius: 18px;
  box-shadow: 0 30px 70px -20px rgba(212,175,55,0.25), 0 20px 50px -10px rgba(0,0,0,0.6);
  border: 1px solid var(--border-strong);
  animation: fadeInUp .8s ease .1s both;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background .18s ease;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--gold-gradient);
  background-size: 160% 160%;
  color: #14100a;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px -6px rgba(212,175,55,0.55); background-position: 100% 0; }
.btn-secondary {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-strong); background: rgba(255,255,255,0.07); transform: translateY(-1px); }
.btn-danger { background: linear-gradient(135deg, #f26d6d, #d63e3e); color: #fff; box-shadow: 0 8px 24px -8px rgba(214,62,62,0.5); }
.btn-danger:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 40px -24px rgba(0,0,0,0.6);
  animation: fadeInUp .5s ease both;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: rgba(255,255,255,0.14); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: .2px; }
.form-group input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-group input::placeholder { color: #5c5c66; }
.form-group input:focus {
  outline: none;
  border-color: var(--gold-2);
  background: rgba(212,175,55,0.05);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

.msg { margin-top: 14px; font-size: 14px; min-height: 20px; font-weight: 500; }
.msg.erro { color: var(--danger); }
.msg.sucesso { color: var(--success); }

/* ---------- Track list ---------- */
.track-list { display: flex; flex-direction: column; gap: 6px; }
.track-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.track-row:hover { background: rgba(255,255,255,0.04); border-color: var(--border); transform: translateX(2px); }
.track-row img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #1c1c20; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.track-row .info { flex: 1; min-width: 0; }
.track-row .title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-row .artist { font-size: 13px; color: var(--text-muted); }
.track-row .actions button {
  background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 19px;
  transition: color .15s ease, transform .15s ease;
}
.track-row .actions button:hover { color: var(--gold-1); transform: scale(1.15); }

/* ---------- Player bar ---------- */
.player-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-strong);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.45);
  z-index: 40;
}
.player-bar .now-playing { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-bar audio { flex: 2; max-width: 440px; }
.player-bar audio::-webkit-media-controls-panel { background: transparent; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-trial { background: rgba(212,175,55,0.12); color: var(--gold-1); border: 1px solid rgba(212,175,55,0.3); }
.badge-active { background: rgba(61,220,132,0.12); color: var(--success); border: 1px solid rgba(61,220,132,0.3); }
.badge-expired { background: rgba(239,90,90,0.12); color: var(--danger); border: 1px solid rgba(239,90,90,0.3); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: rgba(255,255,255,0.025); }

.search-bar { display: flex; gap: 10px; margin-bottom: 24px; }
.search-bar input { flex: 1; }

/* ---------- Plan / pricing ---------- */
.price-tag { font-size: 30px; font-weight: 800; font-family: 'Poppins', sans-serif; background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-tag .period { font-size: 15px; font-weight: 500; color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); }
.feature-list { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-direction: column; gap: 12px; }
.feature-list li { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 15px; }
.feature-list li::before {
  content: "✓";
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(212,175,55,0.15); color: var(--gold-1);
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}

/* ---------- Stat cards (admin) ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  animation: fadeInUp .5s ease both;
}
.stat-card .label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; }
.stat-card .value { font-size: 26px; font-weight: 800; font-family: 'Poppins', sans-serif; }
.stat-card .value.gold { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Admin shell ---------- */
.admin-shell { display: flex; min-height: calc(100vh - 65px); }
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-sidebar button {
  text-align: left;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 11px 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  font-family: 'Inter', sans-serif;
}
.admin-sidebar button:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.admin-sidebar button.active { background: rgba(212,175,55,0.1); color: var(--gold-1); }
.admin-content { flex: 1; padding: 28px 36px; max-width: 1100px; }

.flag-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.flag-row:last-child { border-bottom: none; }
.flag-row .flag-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; inset: 0; background: rgba(255,255,255,0.12); border-radius: 999px;
  cursor: pointer; transition: background .2s ease;
}
.toggle .slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s ease;
}
.toggle input:checked + .slider { background: var(--gold-2); }
.toggle input:checked + .slider::before { transform: translateX(20px); }

/* ---------- Skeleton loading ---------- */
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.04) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
.skeleton-row { height: 60px; margin-bottom: 8px; }

/* ---------- Animations ---------- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

@media (max-width: 720px) {
  .admin-shell { flex-direction: column; min-height: auto; }
  .admin-sidebar {
    width: 100%; flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 10px 12px; gap: 6px;
  }
  .admin-sidebar button { white-space: nowrap; padding: 9px 13px; font-size: 13px; flex-shrink: 0; }
  .admin-content { padding: 18px 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .value { font-size: 20px; }
}
