/* ========================================================
   HANIEHOK - CORE DESIGN SYSTEM & STYLESHEET
   Style: Cute Luxury Pastel Blue & Soft Glassmorphism
   Typography: Lexend (Heading/Price) + Be Vietnam Pro (Body/UI)
   ======================================================== */

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

:root {
  /* Gentle Soft Pastel Ocean Blue Palette - Dịu Mắt & Thanh Thoát */
  --bg-main: #edf5fa;
  --bg-surface: #f4f9fd;
  --bg-card: rgba(255, 255, 255, 0.96);
  --bg-card-hover: #ffffff;
  --bg-input: #f0f7fb;

  --border-glass: #d2e7f3;
  --border-focus: #24a7c4;

  --text-main: #162a38;
  --text-sub: #456275;
  --text-muted: #6a8596;

  --accent-sea: #22a7c4;
  --accent-ocean: #1b9ab5;
  --accent-deep-ocean: #136074;
  --accent-sky: #53b8d9;
  --accent-blue: #0ea5e9;
  --accent-pink: #f43f5e;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;

  --gradient-brand: linear-gradient(135deg, #26adc9 0%, #1b9ab5 45%, #0ea5e9 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 248, 253, 0.8) 100%);
  --gradient-soft-blue: linear-gradient(135deg, #e3f2fa 0%, #d1e8f5 100%);

  --shadow-card: 0 10px 28px -6px rgba(18, 90, 115, 0.08), 0 0 0 1px rgba(210, 231, 243, 0.7);
  --shadow-hover: 0 16px 36px -6px rgba(27, 154, 181, 0.2), 0 0 0 1px rgba(34, 167, 196, 0.6);
  --shadow-glow: 0 0 18px rgba(34, 167, 196, 0.3);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --font-heading: 'Lexend', system-ui, -apple-system, sans-serif;
  --font-body: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;

  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text-main);
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: 
    radial-gradient(circle at 12% 10%, rgba(165, 218, 237, 0.32) 0%, transparent 45%),
    radial-gradient(circle at 88% 15%, rgba(186, 226, 243, 0.28) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(175, 220, 238, 0.25) 0%, transparent 50%),
    linear-gradient(180deg, #edf5fa 0%, #e5f1f8 50%, #edf5fa 100%);
  background-attachment: fixed;
}

/* Base Form & Typography Inheritance */
input,
button,
select,
textarea,
optgroup {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================================
   HEADER & NAVBAR (Gọn Gàng & Cân Đối)
   ======================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 2px 14px rgba(18, 90, 115, 0.04);
  transition: all var(--transition-normal);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform var(--transition-fast);
}

.brand-logo:hover {
  transform: translateY(-1px);
}

.brand-logo img {
  height: 38px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: var(--text-sub);
  position: relative;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent-ocean);
  background: rgba(34, 167, 196, 0.1);
}

.nav-link.active {
  color: #ffffff;
  background: var(--gradient-brand);
  box-shadow: 0 3px 10px rgba(27, 154, 181, 0.3);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(224, 242, 254, 0.8);
  border: 1px solid var(--border-glass);
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ========================================================
   GLOBAL COMPONENTS & BUTTONS
   ======================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.badge-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* ========================================================
   GLOBAL FORM UI SYSTEM (Soft Glassmorphism Pastel)
   ======================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-main);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(18, 90, 115, 0.03);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.8;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: #a5d2eb;
  background: #ffffff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-sea);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(34, 167, 196, 0.18), 0 4px 16px rgba(34, 167, 196, 0.12);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23456275' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
  cursor: pointer;
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.form-error {
  font-size: 0.82rem;
  color: var(--accent-pink);
  font-weight: 500;
  margin-top: 2px;
}

.form-input.is-invalid,
.form-select.is-invalid {
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 6px 20px -4px rgba(14, 165, 233, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -4px rgba(14, 165, 233, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-gold {
  background: var(--gradient-gold);
  color: #ffffff;
  box-shadow: 0 6px 20px -4px rgba(245, 158, 11, 0.4);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -4px rgba(245, 158, 11, 0.55);
}

.btn-rose {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #be123c 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px -4px rgba(244, 63, 94, 0.45);
}

.btn-rose:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -4px rgba(244, 63, 94, 0.6);
}

.btn-rose:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background: #ffffff;
  border-color: var(--border-focus);
  color: var(--accent-blue);
  transform: translateY(-1px);
}

.btn-copy {
  padding: 8px 16px;
  font-size: 0.82rem;
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-full);
  font-weight: 600;
}

.btn-copy:hover {
  background: var(--gradient-brand);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
}

.glass-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-hover);
}

/* ========================================================
   MODAL COMPONENT
   ======================================================== */
.hanie-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.hanie-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px -10px rgba(15, 23, 42, 0.25), 0 0 35px rgba(56, 189, 248, 0.15);
  padding: 26px 24px 20px;
  text-align: center;
  transform: translateY(20px) scale(0.96);
  transition: transform var(--transition-normal);
  overscroll-behavior: contain;
}

.hanie-modal.show .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(224, 242, 254, 0.7);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(224, 242, 254, 1);
  color: var(--accent-blue);
  transform: rotate(90deg);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-main);
}

.modal-game-info {
  color: var(--accent-blue);
  font-weight: 700;
  font-size: 1rem;
  margin-top: 4px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

.modal-gift-meta {
  margin: 6px 0 12px;
}

.gift-product-title {
  color: #0284c7;
  font-size: 1.15rem;
  display: block;
}

.gift-product-cash {
  color: var(--text-sub);
  font-size: 0.85rem;
}

.modal-info-box {
  background: #f0f7ff;
  border: 1px solid #dcebfa;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 12px 0;
  text-align: left;
}

.modal-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.88rem;
}

.modal-info-row span {
  color: var(--text-sub);
}

.modal-info-row strong {
  color: var(--text-main);
  font-weight: 700;
}

.modal-account-number {
  color: #0e677c;
  font-family: monospace;
  font-size: 1.05rem;
}

.modal-amount-row {
  border-top: 1px dashed var(--border-glass);
  margin-top: 4px;
  padding-top: 5px;
}

.modal-amount-val {
  color: #059669;
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-syntax-row {
  background: #e6f6fc;
  border-radius: 8px;
  padding: 7px 10px;
  margin-top: 6px;
  border: 1px solid rgba(34, 167, 196, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-syntax-val {
  color: #dc2626;
  font-size: 0.9rem;
  font-weight: 700;
}

.modal-qr-frame {
  margin: 10px auto;
  width: 160px;
  height: auto;
  padding: 6px;
  background: #ffffff;
  border: 2px solid #bce5f3;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(18, 103, 124, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-qr-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-sm);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.modal-actions .btn-copy-account {
  flex: 1;
}

.modal-actions .btn-modal-close {
  min-width: 90px;
}

.modal-note {
  font-size: 0.78rem;
  color: var(--text-sub);
  margin-top: 10px;
  line-height: 1.42;
  text-align: center;
}

.modal-note a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

/* ========================================================
   TOAST NOTIFICATION
   ======================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 20px;
  background: #ffffff;
  color: var(--text-main);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  border: 1px solid #dcebfa;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(20px);
  opacity: 0;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.toast-leave {
  animation: toastOut 0.25s ease forwards;
}

@keyframes toastOut {
  to {
    transform: translateY(15px);
    opacity: 0;
  }
}

/* ========================================================
   FOOTER
   ======================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  padding: 36px 0 28px;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  height: 50px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  opacity: 0.95;
}

.footer-text {
  color: var(--text-sub);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  margin-top: 4px;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-link:hover {
  color: var(--accent-blue);
}

/* Responsive Media Queries */
/* Responsive Media Queries */
@media (max-width: 768px) {
  .nav-wrapper {
    height: 64px;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 20px 24px;
    gap: 8px;
    border-bottom: 1px solid var(--border-glass);
    display: none;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-link {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 10px 14px;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu .btn {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    margin: 0;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

/* Tablet Navigation & Spacing */
@media (max-width: 1024px) and (min-width: 769px) {
  .brand-logo img {
    height: 32px;
    max-width: 135px;
  }

  .nav-menu {
    gap: 4px;
  }

  .nav-link {
    padding: 5px 8px;
    font-size: 0.82rem;
  }

  .nav-menu .btn {
    padding: 5px 9px !important;
    font-size: 0.8rem !important;
  }
}

/* Modal Responsive for Mobile & Tablet */
@media (max-width: 640px) {
  .hanie-modal {
    padding: 8px;
  }

  .modal-card {
    padding: 18px 14px 14px;
    max-width: 410px;
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    font-size: 1.15rem;
  }

  .modal-title {
    font-size: 1.18rem;
    margin-bottom: 2px;
  }

  .eyebrow {
    font-size: 0.7rem;
    margin-bottom: 2px;
    letter-spacing: 1px;
  }

  .modal-game-info {
    font-size: 0.88rem;
    margin-top: 2px;
    margin-bottom: 4px;
  }

  .modal-gift-meta {
    margin: 4px 0 8px;
  }

  .gift-product-title {
    font-size: 1.05rem;
  }

  .gift-product-cash {
    font-size: 0.8rem;
  }

  .modal-info-box {
    padding: 8px 10px;
    margin: 8px 0;
    border-radius: 10px;
  }

  .modal-info-row {
    padding: 2.5px 0;
    font-size: 0.82rem;
  }

  .modal-account-number {
    font-size: 0.95rem;
  }

  .modal-amount-row {
    margin-top: 3px;
    padding-top: 4px;
  }

  .modal-amount-val {
    font-size: 1.12rem;
  }

  .modal-syntax-row {
    padding: 5px 8px;
    margin-top: 5px;
    font-size: 0.8rem;
  }

  .modal-syntax-val {
    font-size: 0.82rem;
  }

  .modal-qr-frame {
    width: 130px;
    padding: 5px;
    margin: 6px auto;
  }

  .modal-actions {
    margin-top: 8px;
    gap: 8px;
  }

  .modal-actions .btn {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .modal-actions .btn-modal-close {
    min-width: 75px;
  }

  .modal-note {
    font-size: 0.72rem;
    margin-top: 6px;
    line-height: 1.35;
  }
}

/* Extra small mobile adjustments */
@media (max-width: 380px) {
  .modal-card {
    padding: 14px 10px 10px;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-qr-frame {
    width: 115px;
    margin: 4px auto;
  }

  .modal-info-box {
    padding: 6px 8px;
    margin: 6px 0;
  }

  .modal-actions .btn {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
}

