:root {
  --bg: #0b0b12;
  --bg-elev: #15151f;
  --bg-elev-2: #1d1d2b;
  --border: #2a2a3c;
  --text: #f2f2f7;
  --muted: #9a9ab0;
  --brand: #7c5cff;
  --brand-2: #ff5c8a;
  --good: #2ecc71;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

/* Header / footer */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 11, 18, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand span { color: var(--brand); }
.site-header nav { display: flex; align-items: center; gap: 14px; }
.site-header nav a { color: var(--muted); font-weight: 600; }
.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 30px 16px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: center;
}
.inline { display: inline; margin: 0; }
.link { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; font-weight: 600; padding: 0; }
.link:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: transform 0.05s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-sm { width: auto; padding: 8px 14px; font-size: 0.9rem; border-radius: 10px; }
.btn-ghost { background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border); }
.btn-block { width: 100%; }

/* Cards */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

/* Forms */
label { display: block; font-weight: 600; margin: 14px 0 6px; }
.hint { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
input, textarea {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 1rem;
}
input:focus, textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
textarea { resize: vertical; min-height: 80px; }
.field-prefix { position: relative; }
.field-prefix span { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.field-prefix input { padding-left: 26px; }

.flash { padding: 12px 16px; text-align: center; font-weight: 600; }
.flash-success { background: rgba(46, 204, 113, 0.15); color: #67e8a0; }
.flash-error { background: rgba(255, 92, 138, 0.15); color: var(--brand-2); }
.error-text { color: var(--brand-2); font-weight: 600; margin: 8px 0; }

/* Artist profile */
.profile-head { text-align: center; }
.avatar {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 12px;
  border: 3px solid var(--brand);
  display: block;
}
.avatar-fallback {
  width: 96px; height: 96px; border-radius: 50%;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 800;
}
.profile-head h1 { margin: 6px 0; font-size: 1.6rem; }
.profile-head .bio { color: var(--muted); margin: 6px 0 0; }

/* Pay buttons */
.pay-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-radius: 12px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  color: var(--text); font-weight: 700; margin-bottom: 10px;
  font-size: 1.05rem;
}
.pay-btn:hover { text-decoration: none; filter: brightness(1.1); border-color: var(--brand); }
.pay-btn .dot { width: 10px; height: 10px; border-radius: 50%; }
.pay-btn .handle { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 0.9rem; }

/* Amount picker */
.amounts { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.amounts button, .amounts .amt {
  flex: 1 1 60px; padding: 12px; border-radius: 10px; cursor: pointer;
  background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text);
  font-weight: 700; font-size: 1rem;
}
.amounts .amt.active { background: var(--brand); border-color: var(--brand); }

/* QR */
.qr-wrap { text-align: center; }
.qr-wrap img { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 12px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* Live badge */
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-2); color: #fff; font-weight: 800;
  padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; letter-spacing: 0.5px;
}
.live-badge .pulse { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* Video */
.video-wrap { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 9 / 16; max-height: 70vh; margin: 0 auto; }
.video-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: var(--muted); text-align: center; padding: 20px; }

/* Tip feed (live alerts) */
.tip-feed { list-style: none; padding: 0; margin: 0; max-height: 240px; overflow-y: auto; }
.tip-feed li { padding: 10px 12px; border-bottom: 1px solid var(--border); display: flex; gap: 8px; align-items: baseline; }
.tip-feed .who { font-weight: 700; }
.tip-feed .amt-tag { margin-left: auto; color: var(--good); font-weight: 800; }

/* Toast alert overlay */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--brand); color: #fff; padding: 14px 20px; border-radius: 999px;
  font-weight: 700; box-shadow: var(--shadow); opacity: 0; transition: all 0.3s ease;
  z-index: 100; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Hero */
.hero { text-align: center; padding: 40px 0 10px; }
.hero h1 { font-size: 2.2rem; margin: 0 0 10px; line-height: 1.15; }
.hero h1 .grad { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 480px; margin: 0 auto 24px; }
.features { display: grid; gap: 12px; margin-top: 24px; }
.feature { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.feature h3 { margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--bg-elev-2); border-radius: 12px; padding: 16px; text-align: center; }
.stat .num { font-size: 1.8rem; font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: 0.85rem; }

h2 { font-size: 1.2rem; }
.spacer { height: 8px; }

select {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 1rem;
}

/* Event list (public) */
.event-list { list-style: none; padding: 0; margin: 0; }
.event-list li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.event-list li:last-child { border-bottom: none; }
.ev-title { font-weight: 700; }

/* Manage rows (dashboard) */
.manage-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.manage-row:last-of-type { border-bottom: none; }

/* Comments (public) */
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-list li:last-child { border-bottom: none; }
.comment-list .who { font-weight: 700; display: block; }
.comment-list .body { color: var(--text); }

/* Comment moderation (dashboard) */
.comment-mod { padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment-mod:last-child { border-bottom: none; }
.badge { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; letter-spacing: 0.5px; }
.badge-approved { background: rgba(46,204,113,0.18); color: #67e8a0; }
.badge-rejected { background: rgba(255,92,138,0.18); color: var(--brand-2); }
.badge-pending  { background: rgba(245,158,11,0.18); color: #f5c451; }

/* Crypto receive */
.crypto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 420px) { .crypto-grid { grid-template-columns: 1fr; } }
.crypto-cell { text-align: center; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.crypto-cell img { width: 100%; max-width: 180px; background: #fff; padding: 8px; border-radius: 10px; }
.crypto-label { font-weight: 700; margin-bottom: 8px; }
.js-copy-addr { display: block; margin: 10px auto 0; font-family: monospace; }

/* Recovery phrase */
.phrase-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
@media (max-width: 420px) { .phrase-box { grid-template-columns: repeat(2, 1fr); } }
.phrase-box .word { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-family: monospace; font-weight: 700; display: flex; gap: 8px; align-items: baseline; }
.phrase-box .n { color: var(--muted); font-size: 0.75rem; min-width: 18px; }
