/* ============================================================
   BaytoveBeatz — Core stylesheet
   Palette: black · white · gold   |  Aesthetic: luxury / refined
   ============================================================ */

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

:root {
  --black: #0a0a0a;
  --black-2: #111111;
  --black-3: #181818;
  --panel: #141414;
  --line: #262626;
  --line-2: #333333;
  --white: #f6f4ee;
  --muted: #9a958a;
  --muted-2: #6f6a60;
  --gold: #d4af37;
  --gold-2: #f2d57e;
  --gold-deep: #a9851f;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --display: 'Syne', sans-serif;
  --body: 'Sora', sans-serif;
  --maxw: 1240px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(212,175,55,0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(212,175,55,0.05), transparent 55%),
    var(--black);
  color: var(--white);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--body); cursor: pointer; }
img { display: block; max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------- Typography */
h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.02em; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
.gold-text {
  background: linear-gradient(120deg, var(--gold-2), var(--gold) 45%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid var(--line-2); background: transparent; color: var(--white);
  padding: 12px 22px; border-radius: 999px; font-weight: 500; font-size: 14px;
  transition: all 0.22s ease; white-space: nowrap;
}
.btn:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-gold {
  background: linear-gradient(120deg, var(--gold-2), var(--gold) 55%, var(--gold-deep));
  color: #1a1405; border: none; font-weight: 600;
  box-shadow: 0 8px 26px var(--gold-glow);
}
.btn-gold:hover { color: #1a1405; filter: brightness(1.07); transform: translateY(-1px); }
.btn-sm { padding: 8px 15px; font-size: 13px; }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--gold-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------------------------------------------- Header */
header.site {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10,10,10,0.72);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-deep));
  color: #14100a; font-weight: 800; font-size: 17px; box-shadow: 0 6px 18px var(--gold-glow);
}
.brand b { color: var(--gold); }
.nav-links { display: flex; gap: 22px; margin-left: 14px; }
.nav-links a { font-size: 14px; color: var(--muted); transition: color 0.2s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -25px; height: 2px;
  background: var(--gold);
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.cart-btn { position: relative; background: none; border: none; color: var(--white); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; transition: background 0.2s; }
.cart-btn:hover { background: var(--black-3); }
.cart-count {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--gold); color: #14100a; font-size: 11px; font-weight: 700;
  border-radius: 9px; display: grid; place-items: center;
}

/* ---------------------------------------------------- Hero */
.hero { position: relative; padding: 90px 0 70px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6vw, 78px); font-weight: 800; }
.hero p.lead { color: var(--muted); font-size: 18px; max-width: 460px; margin: 22px 0 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 38px; margin-top: 48px; }
.hero-stats .stat b { font-family: var(--display); font-size: 30px; color: var(--gold); display: block; }
.hero-stats .stat span { font-size: 13px; color: var(--muted); letter-spacing: 0.05em; }
.hero-visual {
  aspect-ratio: 1; border-radius: 22px; position: relative;
  background:
    repeating-linear-gradient(90deg, rgba(212,175,55,0.6) 0 2px, transparent 2px 9px),
    linear-gradient(160deg, var(--black-3), var(--black));
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow); overflow: hidden;
}
.hero-visual::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 120%, var(--gold-glow), transparent 60%);
}
.equalizer { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 6px; padding: 18%; }
.equalizer span { flex: 1; max-width: 14px; background: linear-gradient(var(--gold-2), var(--gold-deep)); border-radius: 4px 4px 0 0; animation: eq 1.1s ease-in-out infinite; }
@keyframes eq { 0%,100% { height: 20%; } 50% { height: 90%; } }

/* ---------------------------------------------------- Section heading */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 34px; gap: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { color: var(--muted); margin-top: 8px; }

/* ---------------------------------------------------- Filters */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 30px; }
.search-box { flex: 1; min-width: 220px; position: relative; }
.search-box input {
  width: 100%; padding: 13px 16px 13px 44px; border-radius: 999px;
  background: var(--black-2); border: 1px solid var(--line); color: var(--white); font-size: 14px;
}
.search-box input:focus { outline: none; border-color: var(--gold); }
.search-box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--black-2); color: var(--muted); font-size: 13px; transition: all 0.2s;
}
.chip:hover { border-color: var(--line-2); color: var(--white); }
.chip.active { background: var(--gold); border-color: var(--gold); color: #14100a; font-weight: 600; }
.select { padding: 11px 16px; border-radius: 999px; background: var(--black-2); border: 1px solid var(--line); color: var(--white); font-size: 13px; }

/* ---------------------------------------------------- Beat grid */
.beat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.beat-card {
  background: linear-gradient(180deg, var(--panel), var(--black-2));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex; flex-direction: column;
}
.beat-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: var(--shadow); }
.beat-art { position: relative; aspect-ratio: 1; background: linear-gradient(135deg, var(--black-3), var(--black)); overflow: hidden; }
.beat-art img { width: 100%; height: 100%; object-fit: cover; }
.beat-art .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-2); }
.beat-art .placeholder span { font-family: var(--display); font-size: 46px; font-weight: 800; color: rgba(212,175,55,0.18); }
.play-fab {
  position: absolute; left: 14px; bottom: 14px; width: 50px; height: 50px; border-radius: 50%;
  background: var(--gold); color: #14100a; border: none; display: grid; place-items: center;
  box-shadow: 0 8px 22px var(--gold-glow); transform: translateY(6px); opacity: 0; transition: all 0.25s;
}
.beat-card:hover .play-fab { transform: translateY(0); opacity: 1; }
.play-fab.playing { background: var(--white); }
.beat-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.beat-title { font-family: var(--display); font-weight: 700; font-size: 17px; }
.beat-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.beat-meta .dot { color: var(--line-2); }
.beat-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.beat-tags span { font-size: 11px; color: var(--muted-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.beat-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.beat-price { font-family: var(--display); font-weight: 700; }
.beat-price small { color: var(--muted); font-weight: 400; font-size: 11px; display: block; font-family: var(--body); }
.beat-price .amt { color: var(--gold); font-size: 18px; }

/* ---------------------------------------------------- Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%; max-width: 560px; background: var(--black-2); border: 1px solid var(--line-2);
  border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
  animation: pop 0.25s ease;
}
.modal.wide { max-width: 680px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 20px; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 24px; line-height: 1; padding: 4px 8px; border-radius: 8px; }
.modal-close:hover { color: var(--white); background: var(--black-3); }
.modal-body { padding: 24px; }

/* license options */
.license-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 12px; transition: all 0.2s; cursor: pointer;
}
.license-opt:hover { border-color: var(--line-2); }
.license-opt.selected { border-color: var(--gold); background: rgba(212,175,55,0.06); }
.license-opt .li-info h4 { font-family: var(--body); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.license-opt .li-info p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.license-opt .li-price { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--gold); white-space: nowrap; }
.license-opt.disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------------------------------------------------- Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--black-3); border: 1px solid var(--line); color: var(--white); font-size: 14px; font-family: var(--body);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 80px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.file-drop {
  border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm); padding: 16px;
  text-align: center; color: var(--muted); font-size: 13px; transition: all 0.2s; cursor: pointer;
}
.file-drop:hover { border-color: var(--gold); color: var(--white); }
.file-drop.has-file { border-color: var(--gold); border-style: solid; color: var(--gold-2); }
.form-msg { font-size: 13.5px; padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; }
.form-msg.error { background: rgba(220,70,70,0.12); border: 1px solid rgba(220,70,70,0.3); color: #ff9d9d; }
.form-msg.success { background: rgba(212,175,55,0.1); border: 1px solid var(--gold); color: var(--gold-2); }

/* ---------------------------------------------------- Cart drawer */
.drawer-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.6); display: none; }
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 92vw; z-index: 91;
  background: var(--black-2); border-left: 1px solid var(--line-2);
  transform: translateX(100%); transition: transform 0.3s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { padding: 22px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { font-size: 20px; }
.drawer-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item .ci-art { width: 56px; height: 56px; border-radius: 8px; background: var(--black-3); object-fit: cover; flex-shrink: 0; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-info h4 { font-family: var(--body); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item .ci-info .lic { font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.05em; }
.cart-item .ci-price { font-family: var(--display); font-weight: 700; color: var(--gold); }
.ci-remove { background: none; border: none; color: var(--muted-2); font-size: 18px; align-self: flex-start; }
.ci-remove:hover { color: #ff9d9d; }
.drawer-foot { padding: 20px 24px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.cart-total .total-amt { font-family: var(--display); font-size: 26px; color: var(--gold); }
#paypal-container { margin-top: 14px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state svg { color: var(--line-2); margin-bottom: 14px; }

/* ---------------------------------------------------- Now playing bar */
.now-playing {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: rgba(17,17,17,0.95); backdrop-filter: blur(14px); border-top: 1px solid var(--line-2);
  transform: translateY(110%); transition: transform 0.3s ease;
}
.now-playing.show { transform: none; }
.np-inner { max-width: var(--maxw); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px; }
.np-art { width: 48px; height: 48px; border-radius: 8px; background: var(--black-3); object-fit: cover; }
.np-info { min-width: 140px; }
.np-info h4 { font-family: var(--body); font-weight: 600; font-size: 14px; }
.np-info span { font-size: 12px; color: var(--muted); }
.np-toggle { width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: #14100a; border: none; display: grid; place-items: center; flex-shrink: 0; }
.np-bar { flex: 1; height: 5px; background: var(--line); border-radius: 3px; cursor: pointer; position: relative; }
.np-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold); border-radius: 3px; width: 0; }
.np-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }
.np-vol { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.np-mute { background: none; border: none; color: var(--muted); padding: 4px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: color 0.15s; }
.np-mute:hover { color: var(--white); }
.np-vol-slider { width: 80px; accent-color: var(--gold); cursor: pointer; }
.np-buy { margin-left: 4px; }

/* ---------------------------------------------------- Admin */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.admin-tab { padding: 12px 18px; background: none; border: none; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; }
.admin-tab.active { color: var(--gold); border-color: var(--gold); }
.upload-progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 10px; display: none; }
.upload-progress.show { display: block; }
.upload-progress .bar { height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold-deep)); width: 0; transition: width 0.2s; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tag-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; }
.tag-badge.pub { background: rgba(212,175,55,0.15); color: var(--gold-2); }
.tag-badge.draft { background: var(--black-3); color: var(--muted); }

/* ---------------------------------------------------- Footer */
footer.site { border-top: 1px solid var(--line); margin-top: 60px; padding: 50px 0 36px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.foot-col h5 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--muted); font-size: 14px; padding: 5px 0; }
.foot-col a:hover { color: var(--gold-2); }
.foot-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted-2); font-size: 13px; }

/* ---------------------------------------------------- Utility / toast */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { background: var(--black-3); border: 1px solid var(--gold); color: var(--white); padding: 13px 20px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); animation: pop 0.25s ease; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------- Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 380px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .np-info, .np-time, .np-vol-slider { display: none; }
  .hero-stats { gap: 22px; }
}
