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

:root {
  --primary-green: #00ff90;
  --secondary-green: #66ffb2;
  --dark-green: #00e57a;
  --bg-dark: #000;
  --bg-card: rgba(10, 10, 10, 0.06);
  --text-primary: #00ff90;
  --text-secondary: #ccc;
  --text-muted: #888;
  --border-radius: 12px;
  --shadow-glow: 0 0 20px rgba(0, 255, 144, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body {
  min-height: 100vh;
  font-family: "Orbitron", "Courier New", monospace;
  color: var(--text-primary);
  background: transparent; /* Ubah dari #000 ke transparent */
  overflow-x: hidden;
  line-height: 1.6;
  text-shadow: 0 0 2px rgba(0, 255, 144, 0.4);
}

/* Matrix Background - FIXED VERSION */
canvas#matrix {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10; /* Lebih rendah dari sebelumnya */
  pointer-events: none;
  background: #000; /* Pastikan background hitam */
}

/* Main Container */
.container {
  max-width: 450px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  margin-top: 3vh;
  margin-bottom: 3vh;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 255, 144, 0.3);
  backdrop-filter: blur(1px); /* Kurangi blur dari 10px ke 5px */
  border: 1px solid rgba(0, 255, 144, 0.2);
  position: relative;
  z-index: 1;
}

/* Header */
.app-header {
  position: relative;
  margin-bottom: 2rem;
}

.glitch {
  font-size: 1.8rem;
  font-weight: 900;
  position: relative;
  animation: flicker 2s infinite;
  text-shadow: 0 0 10px var(--primary-green);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 0.5s infinite;
  color: #ff0040;
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.5s infinite;
  color: #00ffff;
  z-index: -2;
}

@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes glitch-1 {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

@keyframes glitch-2 {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(2px, 2px);
  }
  40% {
    transform: translate(2px, -2px);
  }
  60% {
    transform: translate(-2px, 2px);
  }
  80% {
    transform: translate(-2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

/* Instruction Section */
.instruction-section {
  margin-bottom: 2rem;
}

.qr-instruction {
  font-size: 1rem;
  color: var(--secondary-green);
  line-height: 1.5;
}

.highlight {
  color: var(--primary-green);
  font-weight: bold;
  text-shadow: 0 0 5px var(--primary-green);
}

/* QR Section */
.qr-section {
  margin: 2rem 0;
}

.qr-container {
  position: relative;
  display: inline-block;
}

.qr-image {
  max-width: 280px;
  border: 2px solid var(--primary-green);
  border-radius: var(--border-radius);
  box-shadow: 0 0 15px rgba(0, 255, 144, 0.4);
  background: rgba(0,0,0,0.1);
}

/* Buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.btn {
  position: relative;
  background: linear-gradient(45deg, var(--primary-green), var(--dark-green));
  color: var(--bg-dark);
  border: none;
  padding: 1rem 1.5rem;
  font-weight: bold;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  overflow: hidden;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 144, 0.4);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(45deg, rgba(0, 255, 144, 0.2), rgba(0, 229, 122, 0.2));
  color: var(--primary-green);
  border: 1px solid var(--primary-green);
}

/* Features Section */
.features-section {
  margin: 2rem 0;
  text-align: left;
}

.features-title {
  text-align: center;
  color: var(--primary-green);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.features {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.features li {
  position: relative;
  padding-left: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.features li::before {
  content: "💀";
  position: absolute;
  left: 0;
  color: var(--primary-green);
  font-size: 1rem;
}

.features li:hover {
  color: var(--primary-green);
  transform: translateX(5px);
}

/* Status Section */
.status-section {
  margin: 2rem 0;
  padding: 1rem;
  background: rgba(0, 255, 144, 0.05);
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 255, 144, 0.2);
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Footer */
.footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 255, 144, 0.2);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-link {
  color: var(--secondary-green);
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary-green);
  text-shadow: 0 0 5px var(--primary-green);
}

/* Toast Notification */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--primary-green);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: var(--shadow-glow);
  transform: translateX(400px);
  transition: var(--transition);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.toast.show {
  transform: translateX(0);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.dialog-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(3px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dialog-box {
  background: #111;
  border: 2px solid var(--primary-green);
  padding: 1.5rem 1rem;
  border-radius: 10px;
  color: var(--primary-green);
  font-family: 'Orbitron', sans-serif;
  box-shadow: 0 0 20px var(--primary-green);
  text-align: center;
  width: 90%;
  max-width: 340px;
}

.dialog-buttons button {
  margin: 0.5rem;
  background: black;
  border: 1px solid var(--primary-green);
  color: var(--primary-green);
  padding: 10px 18px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.dialog-buttons button:hover {
  background: var(--primary-green);
  color: black;
}

#welcome-modal {
  display: none; /* biar modal tidak langsung muncul */
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  color: #00ff90;
  font-family: "Orbitron", monospace;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}


/* Responsive Design */
@media (max-width: 480px) {
  .container {
    margin: 1vh auto;
    padding: 1.5rem 1rem;
    max-width: 95%;
  }

  .glitch {
    font-size: 1.4rem;
  }

  .qr-image {
    max-width: 240px;
  }

  .action-buttons {
    gap: 0.8rem;
  }

  .btn {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }
}

.neon-text {
  color: #00ffe0;
  text-shadow:
    0 0 5px #00ffe0,
    0 0 10px #00ffe0,
    0 0 20px #00ffe0,
    0 0 40px #00ffe0;
}
