html {
  scroll-behavior: smooth;
}

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
  --bg-main: #07101e;
  --surface-card: #0d1b2e;
  --surface-card-hover: #11233b;
  --surface-card-elevated: #102038;
  --border-color: #1e3454;
  --border-glow: #e5c158;
  --primary-gold: #e5c158;
  --primary-gold-dark: #cda034;
  --primary-gold-light: #fbe38e;
  --accent-blue: #0284c7;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
}

* {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(229, 193, 88, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(30, 58, 138, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #07101e;
}
::-webkit-scrollbar-thumb {
  background: #1e3454;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #e5c158;
}

/* Glassmorphism & Card Styles */
.card-gaming {
  background: linear-gradient(145deg, #0d1b2e 0%, #102038 100%);
  border: 1px solid #1e3454;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-gaming:hover {
  border-color: #2b4975;
}

.card-glow-gold {
  border-color: rgba(229, 193, 88, 0.8) !important;
  box-shadow: 0 0 20px -3px rgba(229, 193, 88, 0.25), inset 0 0 12px rgba(229, 193, 88, 0.08);
}

/* Primary Button Gold Gradient */
.btn-gold {
  background: linear-gradient(135deg, #e5c158 0%, #cda034 100%);
  color: #09111e;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 14px 0 rgba(205, 160, 52, 0.35);
}

.btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, #f2d174 0%, #dcae44 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(205, 160, 52, 0.5);
}

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

.btn-gold:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* Outline Dark Button */
.btn-dark-outline {
  background: rgba(13, 27, 46, 0.8);
  border: 1px solid #28446b;
  color: #e2e8f0;
  transition: all 0.2s ease;
}

.btn-dark-outline:hover {
  border-color: #e5c158;
  color: #fbe38e;
  background: rgba(16, 32, 56, 0.95);
}

/* Preset Package Cards */
.package-card {
  background: rgba(13, 27, 46, 0.7);
  border: 1px solid #1e3454;
  border-radius: 0.75rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.package-card:hover {
  background: rgba(16, 32, 56, 0.95);
  border-color: #3b6094;
  transform: translateY(-2px);
}

.package-card.active {
  background: linear-gradient(145deg, #142844 0%, #173257 100%);
  border-color: #e5c158;
  box-shadow: 0 0 16px -2px rgba(229, 193, 88, 0.3), inset 0 0 10px rgba(229, 193, 88, 0.1);
}

.package-card.active::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 28px 28px 0;
  border-color: transparent #e5c158 transparent transparent;
  z-index: 2;
}

.package-card.active::after {
  content: '✓';
  position: absolute;
  top: 1px;
  right: 4px;
  font-size: 11px;
  font-weight: 900;
  color: #09111e;
  z-index: 3;
}

/* Server Selector Cards */
.server-card {
  background: rgba(13, 27, 46, 0.8);
  border: 2px solid #1e3454;
  border-radius: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.server-card:hover {
  border-color: #2f4c75;
}

.server-card.active {
  border-color: #e5c158;
  background: linear-gradient(145deg, #13243c 0%, #193153 100%);
  box-shadow: 0 0 18px -2px rgba(229, 193, 88, 0.25);
}

/* Hero Glow Mask */
.hero-bg-overlay {
  background: linear-gradient(90deg, #081424 0%, #081424 35%, rgba(8, 20, 36, 0.85) 60%, rgba(8, 20, 36, 0.4) 100%);
}

@media (max-width: 768px) {
  .hero-bg-overlay {
    background: linear-gradient(180deg, rgba(8, 20, 36, 0.6) 0%, #081424 85%);
  }
}

/* Status Badges */
.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-processing {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-completed {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-failed {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Animations */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(229, 193, 88, 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(229, 193, 88, 0.8);
  }
}

.animate-pulse-glow {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

@keyframes floatZalo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.animate-float {
  animation: floatZalo 3s ease-in-out infinite;
}

/* Input Error & Success States */
@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.input-error {
  border-color: #f43f5e !important;
  background-color: rgba(244, 63, 94, 0.08) !important;
  box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.3) !important;
  animation: inputShake 0.4s ease-in-out;
}
.input-success {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.05) !important;
}

/* Toast Container */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  width: calc(100% - 48px);
  pointer-events: none;
}
@media (max-width: 640px) {
  #toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}

.toast-item {
  pointer-events: auto;
  border-radius: 14px;
  padding: 14px 18px;
  background: #0d1b2e;
  border: 1px solid #1e3454;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 15px -2px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #f1f5f9;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.toast-item.removing {
  animation: toastSlideOut 0.25s forwards ease-in;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateX(110%) scale(0.9);
    opacity: 0;
  }
}

/* Toast Progress Bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(229, 193, 88, 0.8);
  width: 100%;
}
