/* ==========================================================================
   KIM GIA BẢO GIFT – BẢO TÍN MẠNH HẢI
   DESIGN TOKENS: ĐỎ SON • VÀNG KIM 24K • KEM NGỌC TRAI
   ========================================================================== */

:root {
  /* Bảng màu lộng lẫy đồng bộ Banner & Hộp quà Kim Gia Bảo */
  --color-emerald-deep: #270306;
  --color-emerald-dark: #3c060b;
  --color-emerald-primary: #550910;
  --color-emerald-rich: #730e17;
  --color-emerald-soft: #f4e7e8;

  --color-gold-primary: #d4af37;
  --color-gold-bright: #f6df94;
  --color-gold-champagne: #f8e8be;
  --color-champagne: #f8e8be;
  --color-champagne-soft: #fbf1d4;
  --color-beige-surface: #efe4d3;
  --color-gold-deep: #9c6f19;

  --color-cream-bg: #fdf9f0;
  --color-cream-warm: #f6ecda;
  --color-ivory-card: rgba(255, 252, 244, 0.96);
  --color-brown-dark: #2c1d07;
  --color-brown-gold: #4d3612;
  --color-brown-muted: #765826;
  --color-white-pure: #ffffff;

  /* Gradient hoàng gia lộng lẫy */
  --grad-royal-backdrop: radial-gradient(circle at 50% 18%, #6c0f17 0%, #42060c 52%, #210305 100%);
  --grad-emerald-card: linear-gradient(155deg, rgba(81, 11, 17, 0.94) 0%, rgba(46, 5, 9, 0.97) 100%);
  --grad-ivory-card: linear-gradient(165deg, rgba(255, 253, 247, 0.98) 0%, rgba(248, 237, 214, 0.95) 100%);
  --grad-gold-metallic: linear-gradient(135deg, #a3741a 0%, #f7e199 35%, #d4af37 68%, #936612 100%);
  --grad-gold-button: linear-gradient(135deg, #f5dc8b 0%, #d4af37 50%, #b38322 100%);
  --grad-emerald-button: linear-gradient(135deg, #750f18 0%, #4c080e 55%, #2e0408 100%);

  /* Viền & Đổ bóng phát sáng */
  --border-gold-thin: 1px solid rgba(212, 175, 55, 0.38);
  --border-gold-strong: 1.5px solid rgba(232, 197, 88, 0.78);
  --shadow-luxury-sm: 0 10px 26px rgba(26, 2, 4, 0.24);
  --shadow-luxury-md: 0 22px 54px rgba(19, 2, 3, 0.38);
  --shadow-gold-glow: 0 10px 30px rgba(212, 175, 55, 0.38);

  /* Typography gọn gàng, sắc nét dấu tiếng Việt */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Bo góc & Tỉ lệ màn hình LED */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --ui-scale: 1;
}

body.stage-mode {
  --ui-scale: 1.14;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: calc(16px * var(--ui-scale));
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-brown-dark);
  background: var(--grad-royal-backdrop);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button,
input,
textarea,
select {
  font-family: inherit;
}

.is-hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Chữ ánh kim 24K nổi bật */
.text-gold-gradient {
  background: var(--grad-gold-metallic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(212, 175, 55, 0.25));
}

/* ==========================================================================
   HỆ THỐNG NÚT BẤM CAO CẤP – GỌN GÀNG, SẮC NÉT, HIỆU ỨNG ÁNH KIM
   ========================================================================== */
.btn-luxury {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    filter 0.28s ease;
  overflow: hidden;
  user-select: none;
}

/* Nút Vàng Kim Hoàng Gia */
.btn-luxury--primary {
  background: var(--grad-gold-button);
  color: #2a1904;
  border: 1.5px solid #fff3c4;
  box-shadow:
    0 10px 28px rgba(212, 175, 55, 0.42),
    inset 0 1px 1px rgba(255, 255, 255, 0.85),
    inset 0 -2px 4px rgba(133, 91, 16, 0.35);
}

.btn-luxury--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -130%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.72),
    transparent
  );
  transform: skewX(-24deg);
  animation: btnShimmerAuto 4.2s ease-in-out infinite;
}

.btn-luxury--primary:hover {
  transform: translateY(-3px) scale(1.025);
  box-shadow:
    0 16px 38px rgba(246, 223, 148, 0.55),
    inset 0 1px 1px rgba(255, 255, 255, 0.95);
  filter: brightness(1.04);
}

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

/* Nút Đỏ Son Viền Vàng */
.btn-luxury--emerald {
  background: var(--grad-emerald-button);
  color: #f8e8be;
  border: 1.5px solid var(--color-gold-primary);
  box-shadow:
    0 10px 26px rgba(26, 2, 4, 0.38),
    inset 0 1px 0 rgba(246, 223, 148, 0.35);
}

.btn-luxury--emerald:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--color-gold-bright);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(212, 175, 55, 0.32);
}

/* Nút Viền Vàng Thanh Lịch */
.btn-luxury--ghost {
  background: rgba(255, 252, 245, 0.92);
  color: var(--color-emerald-dark);
  border: 1.5px solid var(--color-gold-primary);
  box-shadow: 0 6px 18px rgba(26, 2, 4, 0.16);
}

.btn-luxury--ghost:hover {
  background: var(--color-gold-champagne);
  color: var(--color-brown-dark);
  transform: translateY(-2px);
}

.btn-luxury--ghost-light {
  background: rgba(60, 6, 11, 0.72);
  color: #f8e8be;
  border: 1.5px solid rgba(232, 197, 88, 0.65);
  backdrop-filter: blur(8px);
}

.btn-luxury--ghost-light:hover {
  background: rgba(115, 14, 23, 0.9);
  border-color: #f6df94;
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-luxury--lg {
  padding: 0.98rem 2.15rem;
  font-size: 1rem;
}

.btn-luxury--xl {
  padding: 1.12rem 2.6rem;
  font-size: 1.08rem;
  letter-spacing: 0.06em;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
}

.btn-full {
  width: 100%;
}

@keyframes btnShimmerAuto {
  0%, 55% { left: -130%; }
  100% { left: 150%; }
}

/* ==========================================================================
   MODAL DÙNG CHUNG
   ========================================================================== */
.luxury-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.luxury-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 2, 4, 0.72);
  backdrop-filter: blur(8px);
}

.luxury-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 650px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--grad-ivory-card);
  border: 2px solid var(--color-gold-primary);
  border-radius: var(--radius-lg);
  padding: 2rem 1.85rem;
  box-shadow: 0 30px 70px rgba(15, 1, 2, 0.48);
  animation: modalFadeIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.luxury-modal__dialog--wide {
  max-width: 960px;
}

.luxury-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--color-gold-primary);
  background: var(--color-emerald-dark);
  color: #f6df94;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, background 0.25s ease;
}

.luxury-modal__close:hover {
  background: var(--color-emerald-rich);
  transform: rotate(90deg);
}

.luxury-modal__header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.luxury-modal__title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--color-emerald-dark);
  margin: 0.3rem 0 0;
  text-wrap: balance;
}

.luxury-modal__footer {
  margin-top: 1.45rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
