/* ============================================================
   VARIABEL WARNA (Ganti warna tema di sini)
   ============================================================ */

:root {
  --bg: #1a1410;
  --surface: #261e18;
  --surface-hover: #2f261f;
  --text: #eaddcf;
  --text-muted: #a0907f;
  --accent: #d4693a;
  --accent2: #c9a151;
  --accent-dim: rgba(212, 105, 58, 0.12);
  --accent-glow: rgba(212, 105, 58, 0.25);
  --border: rgba(201, 161, 81, 0.15);
  --border-strong: rgba(201, 161, 81, 0.35);
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;
}

/* Mode terang (light mode) */
.light {
  --bg: #f5ede4;
  --surface: #fdf8f2;
  --surface-hover: #f5ece3;
  --text: #2c211a;
  --text-muted: #8a7a6a;
  --accent: #c95e30;
  --accent2: #b8923e;
  --accent-dim: rgba(201, 94, 48, 0.10);
  --accent-glow: rgba(201, 94, 48, 0.18);
  --border: rgba(160, 66, 42, 0.12);
  --border-strong: rgba(160, 66, 42, 0.25);
  --shadow: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
}

/* ============================================================
   RESET DASAR
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ============================================================
   BACKGROUND
   ============================================================ */

/* Canvas animasi */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Efek noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ============================================================
   KONTAINER UTAMA
   ============================================================ */

.container {
  width: 100%;
  max-width: 460px;
  padding: 2rem 1.25rem 2rem;
  position: relative;
  z-index: 1;
  animation: fadeIn 0.8s ease both;
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
}

.header-ornament {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--accent2);
  letter-spacing: 6px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.greeting {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent2);
  letter-spacing: 3px;
  margin-bottom: 14px;
  opacity: 0.5;
  text-transform: uppercase;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 9px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  min-width: 60px;
  justify-content: center;
}

#status-text { transition: opacity 0.3s ease; }

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Avatar / Foto profil */
.avatar {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.25rem;
}

.avatar::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0.4;
}

.avatar::after {
  content: '';
  position: absolute;
  inset: -14px;
  border: 1px solid var(--accent2);
  border-radius: 50%;
  opacity: 0.25;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border: 3px solid var(--surface);
  box-shadow: 0 0 30px var(--accent-glow);
  transition: transform 0.4s cubic-bezier(.34, 1.56, .64, 1);
  will-change: transform;
}

/* Nama */
.name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  margin-bottom: 4px;
  cursor: pointer;
  display: inline-block;
  position: relative;
}

.name::after {
  content: '';
  display: block;
  width: 40%;
  height: 2px;
  background: var(--accent);
  margin: 6px auto 0;
  opacity: 0.6;
}

/* Bio */
.bio {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin: 10px auto 1.2rem;
  max-width: 280px;
  font-style: italic;
}

/* Teks donasi */
.neon-donate {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent2);
  letter-spacing: 2px;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

/* ============================================================
   SECTION DIVIDER
   ============================================================ */

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 6px 0 4px;
  position: relative;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.divider-dot {
  color: var(--accent2);
  font-size: 8px;
  opacity: 0.5;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 4px;
  margin: 14px 0 10px;
  text-align: center;
}

/* ============================================================
   LINK BUTTONS (Tombol donasi / sosial media)
   ============================================================ */

.links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-group + .link-group::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 10px 0 12px;
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: all 0.25s ease;
  animation: fadeIn 0.5s ease both;
  position: relative;
  overflow: hidden;
}

.link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.link-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.link-btn:hover::before { opacity: 1; }

.link-btn:active { transform: translateY(0px); }

.link-btn .left {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.link-btn .icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 6px;
  flex-shrink: 0;
}

.link-btn .icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.social-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: inline-block;
}

.link-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.arrow {
  font-size: 14px;
  color: var(--accent);
  transition: transform 0.25s ease;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.link-btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   VISITOR COUNTER & FOOTER
   ============================================================ */

.visitor-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.visitor-count {
  font-weight: 700;
  color: var(--accent);
}

.footer {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 12px;
  color: var(--text);
  opacity: 0;
  transition: all 0.35s cubic-bezier(.34, 1.56, .64, 1);
  z-index: 200;
  pointer-events: none;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   TOMBOL ATAS (Music toggle & Theme toggle)
   ============================================================ */

/* Tombol musik (kiri atas) */
.music-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.music-toggle:hover {
  border-color: var(--border-strong);
  transform: rotate(8deg);
}

.music-toggle.playing {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Tombol tema (kanan atas) */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  transform: rotate(8deg);
}

/* ============================================================
   ANIMASI
   ============================================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--accent-glow); }
  50% { opacity: 0.4; box-shadow: 0 0 2px var(--accent-glow); }
}

/* Stagger (animasi link muncul bergantian) */
.link-btn:nth-child(1) { animation-delay: 0.05s; }
.link-btn:nth-child(2) { animation-delay: 0.12s; }
.link-btn:nth-child(3) { animation-delay: 0.19s; }
.link-btn:nth-child(4) { animation-delay: 0.26s; }
.link-btn:nth-child(5) { animation-delay: 0.33s; }
.link-btn:nth-child(6) { animation-delay: 0.4s; }

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ============================================================
   SELECTION & FOCUS
   ============================================================ */

::selection { background: var(--accent-dim); color: var(--text); }

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
