/* ============================================
   STRINGS HARMONY ENTERTAINMENT
   Seamless 2-Column Theme (No Boxes)
   ============================================ */

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

:root {
  --brand-cyan: #00f0ff;
  --brand-magenta: #ff007a;
  --brand-purple: #7000ff;

  --bg-base: #030305;
  
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.12);
  
  --text-pure: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.65);
  --text-dark: rgba(255, 255, 255, 0.4);

  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

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

html, body {
  width: 100%; height: 100%;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-pure);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* Form pages must use normal document scrolling on phones. */
html.admin-document,
html.audience-document {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

html.admin-document body,
html.audience-document body {
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: visible;
  touch-action: pan-y;
}

/* ============================================
   ANIMATED MESH BACKGROUND
   ============================================ */
.ambient-bg {
  position: fixed; inset: 0;
  z-index: -1; overflow: hidden;
  background: var(--bg-base);
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.7;
  animation: float-orb 25s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.orb-1 {
  width: 70vw; height: 70vw;
  background: radial-gradient(circle, var(--brand-cyan) 0%, transparent 70%);
  top: -20%; left: -20%;
  animation-delay: 0s;
}

.orb-2 {
  width: 75vw; height: 75vw;
  background: radial-gradient(circle, var(--brand-magenta) 0%, transparent 70%);
  bottom: -30%; right: -20%;
  animation-delay: -5s;
}

.orb-3 {
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, var(--brand-purple) 0%, transparent 70%);
  top: 30%; left: 20%;
  animation-delay: -12s;
  animation-duration: 30s;
}

@keyframes float-orb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8%, 12%) scale(1.1); }
  100% { transform: translate(-8%, 5%) scale(0.9); }
}

/* ============================================
   DISPLAY PAGE (index.html)
   ============================================ */
#display-page {
  display: flex; flex-direction: column;
}

/* ── Header ────────────────────────────── */
.display-header {
  padding: 24px 48px 0;
  text-align: center;
  z-index: 10;
}

.display-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: linear-gradient(to right, var(--text-pure), var(--text-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Seamless Layout Grid ──────────────── */
.display-content {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 32px 60px 40px;
  z-index: 10;
}

.half-section {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;
}

/* ── Chat Section (Left) ───────────────── */
.chat-section {
  padding-right: 40px;
}

.chat-header {
  margin-bottom: 32px;
}

.live-indicator {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,0,122,0.15);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255,0,122,0.3);
}

.live-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand-magenta);
  box-shadow: 0 0 12px var(--brand-magenta);
  animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.live-text {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 800;
  letter-spacing: 0.15em; color: var(--brand-magenta);
  text-transform: uppercase;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.chat-scroll {
  flex: 1; overflow: hidden;
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: 12px; justify-content: flex-end;
  padding: 12px 18px 18px 4px;
  margin-bottom: 430px; /* Bubble berhenti aman di atas judul dan QR chat */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 100%);
}

.chat-bubble {
  --bubble-accent: var(--brand-cyan);
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: fit-content;
  max-width: 94%;
  padding: 13px 16px 14px 13px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.105), rgba(255,255,255,.045));
  border: 1px solid rgba(255,255,255,.14);
  border-left: 4px solid var(--bubble-accent);
  border-radius: 8px 22px 22px 22px;
  box-shadow: 0 12px 30px rgba(0,0,0,.34);
  backdrop-filter: blur(16px);
  opacity: 0; transform: translateY(20px);
  animation: chat-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.chat-bubble:nth-child(3n+1) { --bubble-accent: var(--brand-cyan); }
.chat-bubble:nth-child(3n+2) { --bubble-accent: var(--brand-magenta); }
.chat-bubble:nth-child(3n+3) { --bubble-accent: #a476ff; }

.chat-avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,240,255,.13);
  background: color-mix(in srgb, var(--bubble-accent) 22%, #111);
  border: 1px solid rgba(0,240,255,.45);
  border-color: color-mix(in srgb, var(--bubble-accent) 55%, transparent);
  color: var(--bubble-accent);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(0,240,255,.12);
  box-shadow: 0 0 18px color-mix(in srgb, var(--bubble-accent) 18%, transparent);
}

.chat-content {
  display: block;
  min-width: 0;
  flex: 1;
}

.chat-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 4px;
}

.chat-bubble.fade-out {
  opacity: 0 !important;
  transform: translateY(-20px) !important;
}

@keyframes chat-in {
  to { opacity: 1; transform: translateY(0); }
}

.chat-name {
  font-family: var(--font-display);
  font-size: clamp(.82rem, 1.05vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bubble-accent);
}

.chat-time {
  flex: 0 0 auto;
  color: var(--text-dark);
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
}

.chat-text {
  display: -webkit-box;
  font-family: var(--font-body);
  font-size: clamp(1.18rem, 1.75vw, 1.65rem);
  font-weight: 650;
  line-height: 1.28;
  color: var(--text-pure);
  text-shadow: 0 4px 16px rgba(0,0,0,0.6);
  word-wrap: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.chat-empty {
  font-size: 1.2rem; font-weight: 500;
  color: var(--text-dark);
  animation: pulse-text 3s infinite alternate;
}
@keyframes pulse-text { to { opacity: 0.5; } }


/* ── Image Section (Right) ─────────────── */
.image-section {
  display: block;
  position: relative;
}

.showcase-area {
  position: fixed;
  top: 95px;
  left: 50%;
  width: min(860px, 58vw);
  height: calc(100vh - 410px);
  min-height: 360px;
  max-height: 520px;
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}

.showcase-item {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.95);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.showcase-item.active {
  opacity: 1; transform: scale(1.02); /* Skala dikurangi sedikit agar aman */
  pointer-events: auto;
}

.showcase-item img,
.showcase-item video {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 24px 64px rgba(0,0,0,0.8));
  display: block;
}


/* ── Floating QRs (MASSIVE SIZE) ───────── */
.qr-floating {
  position: absolute;
  bottom: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  background: transparent;
  padding: 0;
}

.qr-left { left: 0; }
.qr-right { right: 0; align-items: flex-end; }
.qr-right .qr-info { text-align: right; }

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

.qr-title {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--text-pure);
  text-transform: uppercase;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.qr-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem; font-weight: 700;
  color: var(--brand-cyan);
  letter-spacing: 0.05em;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.qr-left .qr-subtitle { color: var(--brand-magenta); }

.qr-frame {
  background: #fff;
  padding: 16px;
  border-radius: var(--radius-lg); 
  width: 320px; height: 320px; /* MASSIVE SIZE */
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.8);
}

.qr-frame img, .qr-frame canvas {
  width: 100% !important; height: 100% !important;
  object-fit: contain;
}

.qr-no-image {
  font-size: 1rem; color: #666; text-align: center;
}

/* Current request shown as a focused overlay, instead of raw text at the edge. */
.now-playing-overlay {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 60;
  width: min(560px, calc(100vw - 48px));
  padding: 16px 22px;
  border: 1px solid rgba(0, 240, 255, .35);
  border-radius: 18px;
  background: rgba(3, 3, 5, .92);
  box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 32px rgba(0,240,255,.08);
  backdrop-filter: blur(18px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 24px);
  transition: opacity .35s ease, transform .35s ease;
}

.now-playing-overlay.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.np-badge {
  color: var(--brand-cyan);
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.np-title {
  margin-top: 4px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 900;
}

.np-requester {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: .78rem;
}

/* ============================================
   AUDIENCE PAGE  (audience.html) & ADMIN
   (Sisa kode tetap sama, styling tombol WA dll)
   ============================================ */
#audience-page {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
}

.audience-container {
  width: 100%; max-width: 420px;
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  z-index: 10;
}

.audience-header {
  text-align: center; margin-bottom: 32px;
}

.audience-header .logo-small {
  width: 100px; height: auto; margin-bottom: 24px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.audience-header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--text-pure);
  margin-bottom: 8px;
}

.audience-header p {
  font-family: var(--font-body);
  font-size: 0.95rem; font-weight: 500;
  color: var(--text-dim);
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px; padding-left: 4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-highlight);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: var(--text-pure);
  font-family: var(--font-body);
  font-size: 1.05rem; font-weight: 500;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.form-group input:focus,
.form-group textarea:focus {
  background: rgba(0,0,0,0.5);
  border-color: var(--brand-cyan);
  box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.15), inset 0 2px 10px rgba(0,0,0,0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dark);
}

.form-group textarea {
  resize: none; height: 100px; line-height: 1.5;
}

.send-btn {
  width: 100%; padding: 18px; margin-top: 12px;
  background: linear-gradient(135deg, var(--brand-magenta), var(--brand-purple));
  border: none; border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-display); font-size: 1rem; font-weight: 800;
  letter-spacing: 0.15em; text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 0, 122, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; overflow: hidden;
}

.send-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-purple));
  opacity: 0; transition: opacity 0.3s ease;
}

.send-btn span { position: relative; z-index: 2; }

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 0, 122, 0.4);
}
.send-btn:hover::after { opacity: 1; }

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

.send-btn.sent {
  background: #10b981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}
.send-btn.sent::after { display: none; }

/* ── WhatsApp Section ──────────────────── */
.contact-section {
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}
.contact-section p {
  font-family: var(--font-body); font-size: 0.9rem;
  color: var(--text-dim); margin-bottom: 16px;
  font-weight: 500;
}
.wa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #25D366; color: #fff;
  padding: 14px 24px; border-radius: 100px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.05em;
  text-decoration: none; box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
  transition: all 0.2s ease;
}
.wa-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37, 211, 102, 0.4); }
.wa-btn svg { width: 22px; height: 22px; }

/* ── Admin Page ────────────────────────── */
#admin-page { background: var(--bg-base); }
#admin-page .admin-container { position: relative; z-index: 10; }
.filter-bar, .messages-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(150%);
  border: 1px solid var(--glass-border);
}
.messages-table th { background: rgba(0,0,0,0.3); border-bottom-color: var(--glass-border); }
.messages-table td { border-bottom-color: var(--glass-border); }
.load-btn { background: var(--brand-cyan); color: #000; }

/* Toast */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translate(-50%, 100px);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 14px 28px; border-radius: 100px;
  color: var(--text-pure); font-weight: 600; font-family: var(--font-body);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
  opacity: 0; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
