/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #ffffff;
  color: #191a1d;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: 64px;
  /* offset for fixed navbar */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

/* ===== ICON HELPERS ===== */
.btn-icon {
  width: 15px;
  height: 15px;
  vertical-align: middle;
  margin-right: 4px;
  display: inline-block;
}

.tab-icon {
  width: 15px;
  height: 15px;
  vertical-align: middle;
  margin-right: 4px;
  display: inline-block;
}

.menu-icon {
  width: 15px;
  height: 15px;
  vertical-align: middle;
  margin-right: 6px;
  display: inline-block;
}

.avatar-icon {
  width: 22px;
  height: 22px;
  color: #747689;
}

.eye-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.input-icon {
  width: 16px;
  height: 16px;
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.logo-icon-svg {
  width: 28px;
  height: 28px;
  color: #f59e0b;
  flex-shrink: 0;
}

/* ===== GRADIENT BUTTON ===== */
.btn-gradient {
  background: linear-gradient(135deg, #191a1d 0%, #747689 100%);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-gradient:hover {
  opacity: .87;
}

.btn-gradient:active {
  transform: scale(.97);
}

.btn-gradient.btn-full {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  border-radius: 0.5rem;
}

.btn-gradient.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-outline {
  background: transparent;
  color: #191a1d;
  border: 1.5px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: border-color .2s, background .2s;
}

.btn-outline:hover {
  border-color: #747689;
  background: #f9f9fb;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: opacity .2s;
}

.btn-danger:hover {
  opacity: .85;
}

/* ===== GLASS NAVBAR ===== */
.glass-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid rgba(200, 200, 210, 0.35);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #191a1d, #747689);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.navbar-logo-circle .site-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.navbar-logo-circle .site-logo-placeholder {
  width: 22px;
  height: 22px;
  color: #f59e0b;
}

.navbar-logo-text {
  font-size: 18px;
  font-weight: 900;
  color: #191a1d;
  letter-spacing: -.5px;
  white-space: nowrap;
}

.navbar-logo-accent {
  color: #747689;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Auth bar (legacy — kept hidden, now merged into navbar) */
.auth-bar {
  display: none !important;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 6px 12px 6px 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
  position: relative;
}

.user-info.hidden {
  display: none;
}

.balance-chip {
  background: linear-gradient(135deg, #191a1d, #747689);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.avatar-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 0.5rem;
  transition: background .15s;
}

.avatar-wrap:hover {
  background: #f3f4f6;
}

.username-text {
  font-size: 13px;
  font-weight: 700;
  color: #191a1d;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron-icon {
  color: #747689;
  flex-shrink: 0;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
  padding: 6px;
  min-width: 200px;
  z-index: 200;
  animation: fadeDown .18s ease;
}

.user-menu.hidden {
  display: none;
}

.user-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 12px;
  border-radius: 0.5rem;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  color: #191a1d;
}

.user-menu button:hover {
  background: #f3f4f6;
}

.user-menu button.danger-item {
  color: #ef4444;
}

.user-menu button.danger-item:hover {
  background: #fef2f2;
}

.user-menu hr {
  border: none;
  border-top: 1px solid #f3f4f6;
  margin: 4px 0;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

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

/* ===== NAV USER INFO ===== */
.nav-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.nav-user-info.hidden {
  display: none !important;
}

/* Avatar circle */
.nav-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 3px 8px 3px 3px;
  border-radius: 30px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  transition: background .15s, border-color .15s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
  user-select: none;
}

.nav-avatar-wrap:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.nav-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #191a1d 0%, #747689 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-username-text {
  font-size: 13px;
  font-weight: 700;
  color: #191a1d;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Responsive helpers */
.nav-desktop-only {
  display: flex;
}

.nav-mobile-only {
  display: none;
}

@media (max-width: 600px) {
  .nav-desktop-only {
    display: none !important;
  }

  .nav-mobile-only {
    display: flex !important;
  }

  /* On mobile avatar wrap is pill without text */
  .nav-avatar-wrap {
    padding: 3px 6px 3px 3px;
  }

  /* nav-deposit-label luôn hiện (kông ẩn trên mobile) */
}

/* Nạp tiền button (always visible on navbar) */
.btn-deposit-nav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #191a1d, #747689);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .12s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-deposit-nav:hover {
  opacity: .87;
}

.btn-deposit-nav:active {
  transform: scale(.97);
}

@media (max-width: 600px) {
  .btn-deposit-nav {
    padding: 7px 10px;
  }

  /* compact khi chỉ có icon */
}

/* Dropdown header: avatar + tên + số dư */
.menu-user-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 8px;
}

.menu-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #191a1d, #747689);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-user-name {
  font-size: 13px;
  font-weight: 800;
  color: #191a1d;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-user-balance {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
  margin-top: 1px;
}

/* ===== HERO ===== */
.hero {
  background: #ffffff;
  border-bottom: 1px solid #f3f4f6;
  padding: 40px 0 32px;
  text-align: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  margin-bottom: 12px;
}

.logo-text {
  font-size: 24px;
  font-weight: 900;
  color: #191a1d;
  letter-spacing: -.5px;
}

.logo-accent {
  color: #747689;
}

.hero-tagline {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 24px;
  font-weight: 500;
}

/* Search */
.search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto 28px;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 15px;
  font-family: inherit;
  background: #f9fafb;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.search-input:focus {
  border-color: #747689;
  box-shadow: 0 0 0 3px rgba(116, 118, 137, .12);
  background: #fff;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

/* Tabs */
.tab-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 20px;
  border-radius: 0.5rem;
  font-size: 14px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: #191a1d;
  background: #f3f4f6;
}

.tab-btn.active {
  color: #191a1d;
  background: #f3f4f6;
  font-weight: 800;
}

/* ===== MAIN ===== */
.main-content {
  padding: 40px 20px 80px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
  color: #191a1d;
}

/* ===== BOOKS GRID ===== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 900px) {
  .books-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1100px) {
  .books-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== BOOK CARD ===== */
.book-card {
  background: #ffffff;
  border: 1px solid #f3f4f6;
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .25s;
}

.book-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, .1);
  transform: translateY(-4px);
}

.card-cover-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f9fafb;
}

.card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
  display: block;
}

.book-card:hover .card-cover {
  transform: scale(1.06);
}

.card-info-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, .9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
  transition: background .15s, transform .15s;
  z-index: 2;
  color: #191a1d;
}

.card-info-btn svg {
  width: 14px;
  height: 14px;
}

.card-info-btn:hover {
  background: #191a1d;
  color: #fff;
  transform: scale(1.1);
}

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge-hot {
  background: #ef4444;
  color: #fff;
}

.badge-discount {
  background: #f97316;
  color: #fff;
}

.badge-code {
  background: #3b82f6;
  color: #fff;
}

.card-title {
  font-size: 14px;
  font-weight: 800;
  color: #191a1d;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.card-price {
  font-size: 16px;
  font-weight: 900;
  color: #191a1d;
}

.card-price.discounted {
  color: #ef4444;
}

.card-original-price {
  font-size: 12px;
  text-decoration: line-through;
  color: #9ca3af;
  font-weight: 600;
}

.card-desc {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.card-buy-btn {
  flex: 1;
  background: linear-gradient(135deg, #191a1d 0%, #747689 100%);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}

.card-buy-btn:hover {
  opacity: .85;
}

.card-buy-btn:active {
  transform: scale(.97);
}

.card-download-btn {
  flex: 1;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: opacity .15s;
}

.card-download-btn:hover {
  opacity: .85;
}

.card-download-btn svg {
  width: 14px;
  height: 14px;
}

.card-countdown {
  display: none;
  /* hidden — replaced by fire-countdown */
}

.fire-countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #dc2626;
  /* nền đỏ rực */
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  width: fit-content;
  animation: fireBlinkPulse 1.6s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.fire-emoji {
  display: inline-block;
  animation: fireFlicker 0.6s ease-in-out infinite alternate;
  font-size: 13px;
}

.countdown-text {
  position: relative;
  z-index: 1;
  letter-spacing: .02em;
}

/* Nhấp nháy mờ rồi đậm */
@keyframes fireBlinkPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.55;
  }
}

@keyframes fireSweep {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(200%);
  }
}

@keyframes fireFlicker {
  0% {
    transform: scale(1) rotate(-4deg);
  }

  100% {
    transform: scale(1.25) rotate(4deg);
  }
}

.owned-overlay {
  position: absolute;
  inset: 0;
  background: rgba(25, 26, 29, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  z-index: 3;
}

/* ===== PURCHASED CARD ===== */
.purchased-card {
  position: relative;
}

.purchased-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  width: 30px;
  height: 30px;
  font-size: 13px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s;
}

.purchased-delete-btn svg {
  width: 14px;
  height: 14px;
}

.purchased-delete-btn:hover {
  opacity: .8;
}

/* ===== LOADING / EMPTY ===== */
.loading-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 0;
  color: #9ca3af;
  font-weight: 600;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f4f6;
  border-top-color: #747689;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  text-align: center;
  padding: 60px 0;
  color: #9ca3af;
  font-size: 16px;
  font-weight: 600;
}

.empty-owned {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  color: #9ca3af;
  font-weight: 600;
  font-style: italic;
}

/* ===== TRANSACTIONS ===== */
.transactions-list {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 0.5rem;
  overflow: hidden;
}

.tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f9fafb;
  transition: background .15s;
}

.tx-item:last-child {
  border-bottom: none;
}

.tx-item:hover {
  background: #f9fafb;
}

.tx-desc {
  font-size: 14px;
  font-weight: 700;
  color: #191a1d;
}

.tx-date {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 600;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.tx-amount {
  font-size: 18px;
  font-weight: 900;
}

.tx-amount.positive {
  color: #16a34a;
}

.tx-amount.negative {
  color: #ef4444;
}

.tx-empty {
  padding: 40px;
  text-align: center;
  color: #9ca3af;
  font-weight: 600;
  font-style: italic;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
  animation: fadeIn .2s ease;
}

.modal-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-box {
  background: #fff;
  border-radius: 0.5rem;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: slideUp .22s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box.modal-wide {
  max-width: 640px;
}

.modal-box.modal-center {
  text-align: center;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  color: #374151;
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-close:hover {
  background: #e5e7eb;
}

.modal-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 6px;
  color: #191a1d;
}

.modal-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 20px;
}

.modal-switch {
  font-size: 13px;
  color: #6b7280;
  text-align: center;
  margin-top: 16px;
}

.modal-switch a {
  color: #191a1d;
  font-weight: 700;
  text-decoration: none;
}

.modal-switch a:hover {
  text-decoration: underline;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #9ca3af;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* Google button wrapper */
.google-btn-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

/* Confirm icon */
.confirm-icon {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

/* Success icon */
.success-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

/* Detail buy */
.detail-buy {
  margin-top: 8px;
}

/* ===== FORM ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 14px;
  font-family: inherit;
  background: #f9fafb;
  color: #191a1d;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.form-input:focus {
  border-color: #747689;
  box-shadow: 0 0 0 3px rgba(116, 118, 137, .1);
  background: #fff;
}

.form-input.has-icon {
  padding-left: 38px;
}

.input-icon-wrap {
  position: relative;
}

.input-eye-wrap {
  position: relative;
}

.input-eye-wrap .form-input {
  padding-right: 42px;
}

.input-eye-wrap.input-icon-wrap .form-input {
  padding-left: 38px;
  padding-right: 42px;
}

.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  line-height: 1;
  display: flex;
  align-items: center;
}

/* Deposit */
.quick-amounts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.amount-chip {
  background: #f3f4f6;
  border: 1.5px solid transparent;
  border-radius: 0.5rem;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}

.amount-chip:hover {
  border-color: #747689;
  background: #f9f9fb;
}

.amount-chip.selected {
  background: #191a1d;
  color: #fff;
}

.amount-display {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: #191a1d;
  margin-top: 6px;
  text-align: center;
}

/* ===== DETAIL MODAL ===== */
.detail-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 560px) {
  .detail-layout {
    flex-direction: row;
  }
}

.detail-cover-wrap {
  flex-shrink: 0;
}

.detail-cover {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 0.5rem;
}

.detail-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-title {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.3;
  color: #191a1d;
}

.detail-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-price {
  font-size: 26px;
  font-weight: 900;
  color: #191a1d;
}

.detail-price.sale {
  color: #ef4444;
}

.detail-original {
  font-size: 16px;
  text-decoration: line-through;
  color: #9ca3af;
  font-weight: 600;
}

.detail-original.hidden {
  display: none;
}

.detail-description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
}

.detail-countdown {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #ef4444;
}

.detail-countdown.hidden {
  display: none;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: 100%;
  max-width: 380px;
  padding: 0 16px;
}

.toast {
  background: #191a1d;
  color: #fff;
  padding: 12px 20px;
  border-radius: 0.5rem;
  font-size: 14px;
  font-weight: 700;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn .25s ease;
  width: 100%;
}

.toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.toast.success {
  background: #16a34a;
}

.toast.error {
  background: #ef4444;
}

.toast.info {
  background: #3b82f6;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* ===== FOOTER ===== */
.footer {
  background: #f9fafb;
  border-top: 1px solid #f3f4f6;
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .glass-navbar {
    padding: 0 12px;
    height: 56px;
  }

  body {
    padding-top: 56px;
  }

  .hero {
    padding-top: 32px;
  }

  .navbar-logo-text {
    font-size: 15px;
  }

  .navbar-logo-circle {
    width: 32px;
    height: 32px;
  }

  .btn-gradient {
    padding: 8px 14px;
    font-size: 13px;
  }

  .modal-box {
    padding: 24px 18px;
  }

  .detail-cover {
    max-width: 100%;
  }

  .user-info {
    padding: 5px 8px;
  }

  .username-text {
    max-width: 70px;
  }

  .tab-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* ===== ZALO FLOAT BUTTON ===== */
.zalo-fab {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 1500;
  width: 58px;
  height: 58px;
  background: transparent;
  /* ảnh PNG tự mang màu Zalo xanh */
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 104, 255, .45);
  transition: transform .2s, box-shadow .2s;
  animation: zaloBreath 2.5s ease-in-out infinite;
  gap: 1px;
  overflow: hidden;
}

.zalo-fab-img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  position: absolute;
  inset: 0;
}

.zalo-fab-label {
  position: relative;
  z-index: 2;
  font-size: 8px;
  font-weight: 900;
  color: #fff;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
  /* Đặt ở dưới cùng ảnh */
  margin-top: 38px;
  background: rgba(0, 0, 0, .35);
  border-radius: 0 0 50% 50%;
  padding: 2px 8px 4px;
  width: 100%;
  text-align: center;
}

.zalo-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 104, 255, .65);
  animation: none;
}

/* Vòng pulse xung quanh */
.zalo-fab::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2.5px solid rgba(0, 104, 255, .4);
  animation: zaloRing 2.5s ease-in-out infinite;
  z-index: 0;
}

@keyframes zaloBreath {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(0, 104, 255, .45);
  }

  50% {
    transform: scale(1.06);
    box-shadow: 0 6px 28px rgba(0, 104, 255, .6);
  }
}

@keyframes zaloRing {

  0%,
  100% {
    transform: scale(1);
    opacity: .6;
  }

  50% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@media (max-width: 600px) {
  .zalo-fab {
    bottom: 16px;
    right: 14px;
    width: 52px;
    height: 52px;
  }

  .zalo-fab-img {
    width: 52px;
    height: 52px;
  }

  .zalo-fab-label {
    margin-top: 34px;
  }
}


/* ===== TIkTOK FLOAT BUTTON ===== */
.tiktok-fab {
  position: fixed;
  bottom: 96px;
  right: 20px;
  z-index: 1500;
  width: 58px;
  height: 58px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 104, 255, .45);
  transition: transform .2s, box-shadow .2s;
  animation: zaloBreath 2.5s ease-in-out infinite;
  gap: 1px;
  overflow: hidden;
}

.tiktok-fab-img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  position: absolute;
  inset: 0;
}

.tiktok-fab-label {
  position: relative;
  z-index: 2;
  font-size: 8px;
  font-weight: 900;
  color: #fff;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
  /* Đặt ở dưới cùng ảnh */
  margin-top: 38px;
  background: rgba(0, 0, 0, .35);
  border-radius: 0 0 50% 50%;
  padding: 2px 8px 4px;
  width: 100%;
  text-align: center;
}

.tiktok-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 104, 255, .65);
  animation: none;
}

/* Vòng pulse xung quanh */
.tiktok-fab::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2.5px solid rgba(0, 104, 255, .4);
  animation: zaloRing 2.5s ease-in-out infinite;
  z-index: 0;
}

@keyframes zaloBreath {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(0, 104, 255, .45);
  }

  50% {
    transform: scale(1.06);
    box-shadow: 0 6px 28px rgba(0, 104, 255, .6);
  }
}

@keyframes zaloRing {

  0%,
  100% {
    transform: scale(1);
    opacity: .6;
  }

  50% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@media (max-width: 600px) {
  .tiktok-fab {
    bottom: 80px;
    right: 14px;
    width: 52px;
    height: 52px;
  }

  .tiktok-fab-img {
    width: 52px;
    height: 52px;
  }

  .tiktok-fab-label {
    margin-top: 34px;
  }
}