/* 
 * Chunryang Topup - Custom Gaming Theme Style
 * Aesthetic: Dark Cyberpunk & Midnight Purple mixed with Deep Obsidian Black
 */

:root {
  --bg-primary: #07040d;
  --bg-secondary: #0f081c;
  --bg-card: rgba(20, 11, 36, 0.8);
  --bg-card-hover: rgba(33, 17, 58, 0.92);
  --border-color: rgba(168, 85, 247, 0.22);
  --border-glow: rgba(168, 85, 247, 0.55);
  --chunryang-purple: #a855f7;
  --chunryang-darkpurple: #7c3aed;
  --chunryang-neon: #c084fc;
  --chunryang-deep: #4c1d95;
  --chunryang-gold: #f59e0b;
  --chunryang-cyan: #38bdf8;
  --text-main: #f5f3ff;
  --text-muted: #c4b5fd;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background Ambient Glow */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 550px;
  background: radial-gradient(circle at 50% 10%, rgba(168, 85, 247, 0.22), rgba(124, 58, 237, 0.14) 40%, rgba(76, 29, 149, 0.07) 65%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

/* Glassmorphism Card */
.cr-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cr-card:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 10px 30px -5px rgba(147, 51, 234, 0.25), 0 8px 14px -6px rgba(0, 0, 0, 0.6);
}

.cr-card-interactive {
  cursor: pointer;
}

.cr-card-interactive:hover {
  transform: translateY(-3px);
  border-color: var(--chunryang-purple);
}

.cr-card-selected {
  border-color: var(--chunryang-purple) !important;
  background: rgba(168, 85, 247, 0.18) !important;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
}

/* Chunryang Purple Gradient Button */
.btn-chunryang {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 50%, #581c87 100%);
  color: #ffffff;
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 18px 0 rgba(168, 85, 247, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(192, 132, 252, 0.25);
}

.btn-chunryang:hover {
  background: linear-gradient(135deg, #c084fc 0%, #9333ea 50%, #6b21a8 100%);
  box-shadow: 0 6px 26px rgba(168, 85, 247, 0.65);
  transform: translateY(-1px);
}

.btn-chunryang:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.45);
  color: #ffffff;
}

/* Brand Text Glow */
.brand-glow {
  text-shadow: 0 0 20px rgba(168, 85, 247, 0.75), 0 0 40px rgba(124, 58, 237, 0.4);
}

.brand-glow-purple {
  text-shadow: 0 0 20px rgba(168, 85, 247, 0.8), 0 0 35px rgba(192, 132, 252, 0.5);
}

/* Badge Styling */
.badge-cr {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-gold {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #07040d;
}

::-webkit-scrollbar-thumb {
  background: #3b1d66;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a855f7;
}

/* Step Number Badge */
.step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #a855f7, #6b21a8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: white;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.45);
}

/* Pulsing Live indicator */
.pulse-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
  animation: pulse-purple 1.8s infinite;
}

@keyframes pulse-purple {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(168, 85, 247, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Mobile & Touch Optimizations */
* {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 0;
  }

  .cr-card {
    border-radius: 0.85rem;
  }

  /* Compact form fields on phone */
  input, select, textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
  }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(12, 6, 23, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(168, 85, 247, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.7);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  min-width: 54px;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: #c084fc;
}

.mobile-nav-item i {
  width: 1.25rem;
  height: 1.25rem;
  margin-bottom: 2px;
}

/* ===================================== */
/* RESPONSIVE HEADER & BRAND POSITIONING */
/* ===================================== */
.brand-title-text {
  font-family: 'Teko', sans-serif;
  font-size: 1.875rem; /* 30px desktop */
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand-subtext {
  font-size: 10px;
  color: #9ca3af;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .brand-title-text {
    font-size: 1.35rem; /* ~21px on phone, clean and prevents collision */
  }
  .brand-subtext {
    font-size: 8px;
    letter-spacing: 0.05em;
  }
}

@media (max-width: 380px) {
  .brand-title-text {
    font-size: 1.2rem; /* ~19px on narrow 360px phones */
  }
  .brand-subtext {
    display: none; /* Hide subtitle on very small screens for clean look */
  }
  .header-logo-img {
    width: 2.1rem !important;
    height: 2.1rem !important;
  }
}

/* Navbar Auth Buttons */
.auth-btn-masuk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.auth-btn-daftar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

@media (min-width: 641px) {
  .auth-btn-masuk, .auth-btn-daftar {
    font-size: 0.8rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.65rem;
    gap: 0.35rem;
  }
}
