/* ==================================
   1. WARNA & DASAR
   ================================== */
:root {
  --bg: #050b17;
  --card: rgba(16, 24, 42, 0.55);
  --text: #e8efff;
  --muted: #9fb7dd;
  --accent: #4f8bff;
  --accent2: #82afff;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 90px;
  text-align: center;
  color: var(--text);
  background: transparent;
  -webkit-user-select: none;
  user-select: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.topbar,
.container,
footer {
  position: relative;
  z-index: 1;
}

/* ==================================
   2. BACKGROUND - GRADASI + JARING
   ================================== */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #6a11cb, #2575fc, #8e2de2, #4a00e0);
  background-size: 400% 400%;
  animation: gerakGradasi 12s ease infinite;
}

@keyframes gerakGradasi {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==================================
   3. LAYOUT UTAMA
   ================================== */
.container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 14px 40px;
  text-align: center;
  animation: naik 0.6s ease;
}

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

/* ==================================
   4. TOPBAR & BADGE ID
   ================================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 16px 10px 16px;
  gap: 10px;
}

.logo {
  font-weight: 800;
  font-size: 17px;
  text-align: left;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
  flex: 1;
}

.badge-id {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 50px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.5px;
}

/* ==================================
   5. KOTAK / BOX PUTIH
   ================================== */
.box {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 22px;
  border-radius: 22px;
  width: 100%;
  margin: 12px auto 0 auto;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-align: center;
  color: #0c1222;
}

p.sub {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 700;
  display: inline-block;
  padding: 7px 16px;
  border-radius: 50px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ==================================
   6. INPUT & TOMBOL
   ================================== */
.input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

input {
  flex: 1;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(128, 128, 128, 0.3);
  font-size: 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  text-align: center;
}

input:focus {
  border-color: #007BFF;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.btn-paste {
  padding: 13px 14px;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-size: 16px;
  flex-shrink: 0;
  margin: 0;
}

.btn-paste:hover {
  background: #eee;
}

.btn-utama {
  width: 100%;
  padding: 15px 22px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #007BFF, #00C6FF, #7B61FF);
  background-size: 200% 200%;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  margin: 8px auto;
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
  animation: gradasi 3s ease infinite, pulse 2s ease-in-out infinite;
}

@keyframes gradasi {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.btn-utama:active {
  transform: scale(0.97);
}

button {
  padding: 13px 22px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  margin: 5px auto;
  font-size: 15px;
  transition: transform 0.15s;
}

button:hover {
  transform: translateY(-2px);
}

button.green {
  background: linear-gradient(135deg, #25D366, #128C7E);
}

/* ==================================
   7. VIDEO & GAMBAR HASIL
   ================================== */
img,
video {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 12px;
}

video {
  width: 100%;
  background: #000;
  aspect-ratio: 9/16;
  object-fit: cover;
}

.video-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 12px auto 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.video-wrap video {
  margin: 0;
  border-radius: 0;
  display: block;
}

#hasil h3 {
  animation: naik 0.4s ease;
  word-break: break-word;
}

#hasil p {
  word-break: break-word;
}

/* ==================================
   8. FOOTER
   ================================== */
footer {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  padding: 10px 22px;
  font-size: 13px;
  color: #5f6c89;
  border-radius: 50px;
  box-shadow: var(--shadow);
  white-space: nowrap;
  z-index: 99;
}

footer b {
  color: #0c1222;
  font-size: 14px;
        }
