/* ==========================
   style.css — cleaned & final
   ========================== */

/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }

html,body { height: 100%; }

body {
  font-family: 'Roboto', sans-serif;
  background-color: #000;
  color: #fff;
  overflow: hidden;
}

/* PLAYER CONTAINER / BACKGROUND */
#player-container { position: relative; width: 100%; height: 100vh; }

#background-layer {
  position: absolute;
  inset: 0;
  background: url('logo.jpg') no-repeat center/cover;
  z-index: -1;
  filter: blur(50px) brightness(0.6);
  transform: scale(1.02);
  transition: all 0.5s ease;
  will-change: transform;
  backface-visibility: hidden;
}

/* HEADER / CENTER */
#header {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(0,0,0,0.3);
}

/* LOGO & TAGLINE */
#logo {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 120px;
  margin-top: 25px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  letter-spacing: 1px;
}

#tagline {
  font-size: 0.8rem;
  font-weight: 200;
  margin-top: -125px;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  letter-spacing: 1px;
}

/* COVER ART / SONG INFO */
#cover-art {
  width: 230px;
  height: 230px;
  border: 3px solid white;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  margin-bottom: 20px;
}

#song-info { margin-bottom: 10px; }

#song-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  padding: 0 20px;
}

#artist {
  font-size: 1.2rem;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  opacity: 0.9;
}

/* PLAY BUTTON (MOBILE) */
#play-button {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}
#play-button img { width: 100%; height: 100%; object-fit: contain; }
#play-button:active { transform: scale(0.95); }

/* QUICK MOBILE FIX */
@media (max-width: 600px) {
  #logo { margin-top: -110px; }
}

/* REQUEST POPUP (shared) */
#request-popup {
  display: none;
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: 90%;
  height: 400px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  backdrop-filter: blur(3px);
  z-index: 9999;
  padding: 15px;
  font-family: Montserrat, sans-serif;
}
#request-popup h4 { margin: 0 0 10px; }
#request-popup input, #request-popup textarea {
  width: 100%; padding: 8px; margin-bottom: 8px; border-radius: 5px; border: 1px solid #ccc;
}
#request-popup button.submit-btn {
  width: 100%; padding: 10px; background-color: #25d366; color: #fff; border: none; border-radius: 5px;
  font-weight: bold; cursor: pointer;
}
#request-popup button.close-btn {
  position: absolute; top: 8px; right: 10px; background: none; border: none; font-size: 18px; cursor: pointer; color: #888;
}
#request-popup .success-msg { color: green; font-size: 14px; display: none; margin-top: 5px; }

/* NOW PLAYING POPUP */
#now-playing-popup {
  position: fixed; inset: 0; display: none; justify-content: center; align-items: center;
  background: rgba(0,0,0,0.65); z-index: 9999;
}

/* NP CARD */
.np-card {
  background: rgba(20,20,20,0.95);
  padding: 25px 30px;
  border-radius: 14px;
  text-align: center;
  font-family: Montserrat, sans-serif;
  max-width: 320px; width: 90%;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
  border-top: 4px solid #58be71;
  animation: popUp 0.25s ease-out;
}
@keyframes popUp { from { transform: scale(0.85); opacity: 0 } to { transform: scale(1); opacity: 1 } }

.np-card h3 { margin: 0 0 12px; font-size: 22px; font-weight: 800; letter-spacing: 0.5px; }
.np-status { margin: 0 0 15px; font-size: 15px; font-weight: 600; opacity: 0.85; }
.np-song { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.np-artist { font-size: 15px; margin-bottom: 15px; opacity: 0.9; }
.np-msg { margin-top: 12px; font-style: italic; opacity: 0.9; font-size: 14px; }
#np-greet { font-size: 22px; font-weight: 800; margin-bottom: 6px; letter-spacing: 0.6px; }
#np-info { font-size: 14px; font-weight: 600; opacity: 0.95; margin-bottom: 10px; }
#np-artist { font-size: 16px; font-weight: 700; letter-spacing: 0.6px; margin: 8px 0 6px; }
#np-title { font-size: 20px; font-weight: 800; margin: 2px 0 10px; letter-spacing: 0.6px; }
#np-message { font-size: 15px; font-style: italic; opacity: 0.95; margin-top: 12px; }

/* np glow */
@keyframes glowPulse {
  0% { box-shadow: 0 0 10px rgba(88,190,113,0.25); }
  50% { box-shadow: 0 0 22px rgba(88,190,113,0.55); }
  100% { box-shadow: 0 0 10px rgba(88,190,113,0.25); }
}
.np-card.glow { animation: popUp 0.25s ease-out, glowPulse 2.4s ease-in-out infinite 0.8s; }

/* grecaptcha (keperluan mobile) */
.grecaptcha-badge {
  transform: scale(0.8);
  transform-origin: bottom center;
  bottom: 10px !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  margin-left: -130px;
  z-index: 9999 !important;
}
@media (max-width:600px) { .grecaptcha-badge { transform: scale(0.9); margin-left: -130px; bottom: 10px !important; } }

/* CHAT popup */
#chat-popup {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); z-index: 99999; padding-top: 60px;
}
#chat-popup .chat-iframe { width: 90%; max-width: 420px; height: 75%; border: none; background: #fff; margin: auto; display: block; border-radius: 16px; }
#chat-popup .close-chat { position: absolute; top: 15px; right: 20px; font-size: 32px; color: white; background: none; border: none; cursor: pointer; z-index: 100000; }

/* MOBILE VIEW ADJUSTMENTS */
@media (max-width:600px) {
  #request-popup { top: 50% !important; left: 50% !important; width: 90% !important; max-width: 330px !important; transform: translate(-50%, -50%) !important; padding: 20px !important; border-radius: 12px !important; }
  #request-popup input, #request-popup textarea { font-size: 14px !important; }
  #chat-popup { padding-top: 30px !important; }
  #chat-popup iframe { width: 95% !important; height: 80% !important; margin: auto !important; border-radius: 12px !important; display: block !important; }

  /* MOBILE TRAKTEER BUTTON (MATCH DESKTOP STYLE) */
    #cover-wrapper {
        position: relative;
        width: 80%;
        margin: 0 auto;
    }
    
/* Tombol Trakteer Mobile */
#trakteer-btn {
    background: #ff3b3b !important;
    color: white;
    border-radius: 14px;
    border: 2px white solid;
    padding: 8px 16px;
    display: none; /* default hidden */
    position: absolute;
    bottom: 12px;   /* floating di bawah cover */
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    text-transform: uppercase;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 0 10px rgba(255,0,0,0.7);
    cursor: pointer;
    animation: trakteerBlink 1.4s infinite;
    z-index: 10;
}

#trakteer-btn span {
    color: white;
    text-shadow: 0 0 8px rgba(255,255,255,0.8);
    font-weight: 700;
    font-size: 14px;
    animation: trakteerTextPulse 1.4s infinite ease-in-out;
}

/* Animasi sama kayak desktop */
@keyframes trakteerBlink {
    0%   { box-shadow: 0 0 4px rgba(255,0,0,0.3); }
    50%  { box-shadow: 0 0 14px rgba(255,0,0,1); }
    100% { box-shadow: 0 0 4px rgba(255,0,0,0.3); }
}

@keyframes trakteerTextPulse {
    0%   { opacity: 0.75; transform: scale(1); }
    50%  { opacity: 1; transform: scale(1.06); }
    100% { opacity: 0.75; transform: scale(1); }
}

#action-buttons-wrapper {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 30px;

    display: flex;
    justify-content: center;   /* Tombol Play tetap pusat */

    position: relative;         /* Request & Chat bisa absolute relative ke wrapper */
}

/* PLAY BUTTON (tetap di tengah) */
#play-button {
    z-index: 2;
}

/* REQUEST – di kiri tombol play */
#request-btn {
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
}

/* CHAT – di kanan tombol play */
#chat-btn {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
}

/* =========================
   Cinematic fade animations
   keep single canonical version
   ========================= */
.fade-in { opacity: 0; animation: fadeIn 1.8s forwards; }
.fade-out { opacity: 1; animation: fadeOut 1.8s forwards; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeOut { from { opacity: 1 } to { opacity: 0 } }

/* REQUEST BUTTONS WRAPPER
   -- default: VISIBLE (mobile relies on this)
   -- JS/Cinematic controls visibility when needed
*/
#request-buttons-wrapper {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  z-index: 9999;
}

/* small helper for toggles */
.toggle-btn { opacity: 1; transition: opacity 0.25s ease; }

/* social icons helper */
.social-icons { display:flex; gap:10px; justify-content:center; align-items:center; }

/* DESKTOP BUTTONS (desktop.css handles layout, but keep these core styles here) */
#desktop-request-btn,
#desktop-chat-btn,
#desktop-trakteer-btn { opacity: 0; transition: opacity 0.3s ease, transform 0.25s ease; }

#desktop-buttons {
  display: flex;
  gap: 15px;
  margin-top: -10px;
}

#desktop-buttons button{
  display:flex;
  align-items:center;             /* center icon + text vertically */
  gap:8px;
  padding:10px 16px;
  border:none;
  border-radius:12px;
  transform: translateZ(0);
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  cursor:pointer;
  transition: transform 0.2s, background 0.2s;
}

#desktop-buttons button img{
  width:22px; height:22px; display:block; /* ensure no baseline gap */
}

#desktop-buttons button span{
  display:inline-block;
  align-self:center;     /* explicitly center within flex item */
  line-height:1;         /* avoid baseline shift */
  font-weight:700;
  font-size:16px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

/* individual desktop colors */
#desktop-trakteer-btn span { color:#FF5858; }
#desktop-request-btn span { color:#00E1FF; }
#desktop-chat-btn span    { color:#8FFF5A; }

#desktop-buttons button:hover { transform: translateY(-3px); background: rgba(0,0,0,0.65); }

/* ====================== */
/* Mobile Footer Styles */
/* ====================== */
#footer {
    margin-bottom: -30px;       /* jarak dari tombol */
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Montserrat', sans-serif;
}

/* Reset margin & padding di paragraf */
#footer p {
    margin: 0;
    padding: 0;
}
