/* ============================================================
   TICKETBOX STYLED PUBLIC LAYOUTS & STYLESHEET (DARK THEME CLONE)
   Includes: Green Header (#2dc275), Black Sub-Nav Category Bar, 
   Dark Body (#1c1f24), Artists Circles, Vertical Special Cards,
   Large Outline Trending Numbers, Category Rows, Ads.
   ============================================================ */

/* --- Layout Reset & Base --- */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

.public-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #1c1f24; /* Dark slate background */
  color: #ffffff;      /* White text default */
}

.public-main {
  flex: 1;
}

/* Container Layout fixes to prevent sticking to edges */
.tb-container, .container {
  width: 100%;
  max-width: var(--max-content-width, 1280px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4, 16px);
  padding-right: var(--space-4, 16px);
}

@media (max-width: 768px) {
  .tb-container, .container {
    padding-left: var(--space-3, 12px);
    padding-right: var(--space-3, 12px);
  }
}


/* Force light text color inside public container sections */
.public-layout h1,
.public-layout h2,
.public-layout h3,
.public-layout h4 {
  color: #ffffff;
}

.public-layout p {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Public Header & Category Nav (Green Theme) --- */
.tb-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: #2dc275; /* Ticketbox green */
  box-shadow: var(--shadow-sm);
  border-bottom: 0;
}

.tb-header-main {
  height: 72px;
  display: flex;
  align-items: center;
}

.tb-header-main__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-4);
}

.tb-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  font-size: 28px;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.tb-logo .logo-icon {
  font-size: var(--fs-xl);
  transform: rotate(-15deg);
  color: #ffffff;
}

.tb-logo span {
  font-weight: 800;
  color: #ffffff; /* White text for logo */
}

/* Search Bar (Rounded Rectangle, White Background) */
.tb-top-search {
  flex: 1;
  max-width: 520px;
  height: 40px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: var(--radius-sm); /* rounded rectangle, e.g. 4-6px */
  overflow: hidden;
  padding: 0 var(--space-3);
  gap: var(--space-2);
  box-shadow: var(--shadow-xs);
  border: 0;
}

.tb-top-search__icon {
  color: #94a3b8;
  font-size: var(--fs-base);
  display: flex;
  align-items: center;
}

.tb-top-search input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 var(--space-2);
  font-size: var(--fs-sm);
  color: #1e293b;
  background: transparent;
}

.tb-top-search input::placeholder {
  color: #94a3b8;
}

.tb-top-search__divider {
  width: 1px;
  height: 18px;
  background: #cbd5e1;
  margin: 0 var(--space-1);
}

.tb-top-search button {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  cursor: pointer;
  padding: 0 var(--space-2);
  transition: color var(--duration-fast);
}

.tb-top-search button:hover {
  color: #1e293b;
}

/* Header Actions (White Text & Links) */
.tb-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  color: #ffffff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.tb-header-actions a {
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--duration-fast);
}

.tb-header-actions a:hover {
  opacity: 0.85;
}

.tb-link-create {
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid #ffffff;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: #ffffff !important;
  font-size: 13px;
}

.tb-link-create:hover {
  background: rgba(255, 255, 255, 0.15);
}

.tb-btn-login {
  padding: var(--space-2) 0;
  background: transparent;
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.tb-btn-login:hover {
  opacity: 0.85;
}

/* Flag Vietnam CSS Roundel */
.tb-flag-vietnam {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: #da251d;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

.tb-flag-vietnam::after {
  content: "★";
  color: #ffff00;
  font-size: 15px;
  line-height: 1;
}

.tb-flag-dropdown {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tb-flag-dropdown::after {
  content: "▾";
  font-size: 11px;
  color: #ffffff;
  opacity: 0.7;
}

/* Category sub-navigation bar (Black Theme) */
.tb-category-bar {
  height: 44px;
  background: #000000; /* Deep black sub-nav */
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tb-category-bar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  overflow-x: auto;
  scrollbar-width: none;
}

.tb-category-bar__inner::-webkit-scrollbar {
  display: none;
}

.tb-category-bar a {
  color: #ffffff;
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  padding: var(--space-2) 0;
  position: relative;
  opacity: 0.8;
  transition: opacity var(--duration-fast), color var(--duration-fast);
}

.tb-category-bar a:hover,
.tb-category-bar a.active {
  opacity: 1;
  color: #2dc275;
}

/* Menu Toggle for Mobile */
.tb-menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  padding: 0 var(--space-2);
}

/* --- Hero Carousel --- */
.tb-featured {
  background: #1c1f24;
  padding: var(--space-6) 0 var(--space-6);
}

.tb-featured-carousel {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-4);
  scrollbar-width: none;
}

.tb-featured-carousel::-webkit-scrollbar {
  display: none;
}

.tb-featured-card {
  position: relative;
  scroll-snap-align: center;
  flex: 0 0 100%;
  max-width: 100%;
  min-height: 380px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #131822;
  display: flex;
  align-items: flex-end;
}

@media (min-width: 900px) {
  .tb-featured-card {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

.tb-featured-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tb-featured-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tb-featured-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28,31,36,0.95) 0%, rgba(28,31,36,0.2) 65%, transparent 100%);
  z-index: 1;
}

.tb-featured-card__overlay {
  position: relative;
  z-index: 2;
  padding: var(--space-8);
  width: 100%;
  color: #ffffff;
}

.tb-featured-card h2 {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-3);
  line-height: var(--lh-tight);
}

/* Carousel "Xem chi tiết" button (White Pill) */
.tb-btn-carousel-detail {
  background: #ffffff !important;
  color: #000000 !important;
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: transform var(--duration-fast);
  border: 0;
}

.tb-btn-carousel-detail:hover {
  transform: scale(1.02);
}

/* --- Featured Stars (Artist Circles with green glow) --- */
.tb-artists-section {
  background: #1c1f24;
  padding: var(--space-6) 0 var(--space-6);
  position: relative;
  overflow: hidden;
}

.tb-artists-section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 200px;
  background: radial-gradient(circle, rgba(45, 194, 117, 0.1) 0%, transparent 70%);
  pointer-events: none;
  transform: translateY(-50%);
}

.tb-artists-container {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  padding: var(--space-3) 0 var(--space-4);
  scrollbar-width: none;
}

.tb-artists-container::-webkit-scrollbar {
  display: none;
}

.tb-artist-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  min-width: 110px;
  text-decoration: none;
  color: #ffffff;
  transition: transform var(--duration-fast);
}

.tb-artist-card:hover {
  transform: translateY(-4px);
}

.tb-artist-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid #2dc275;
  box-shadow: 0 0 12px rgba(45, 194, 117, 0.6);
  background: #131822;
}

.tb-artist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tb-artist-name {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.tb-artist-name .check-icon {
  color: #2dc275;
  font-size: 11px;
}

/* --- Sự kiện đặc biệt (Vertical Posters, 3:4 aspect ratio) --- */
.tb-special-grid {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--space-2);
}

.tb-special-grid::-webkit-scrollbar {
  display: none;
}

.tb-special-card {
  flex: 0 0 200px;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #131822;
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-normal) var(--ease-default),
              box-shadow var(--duration-normal) var(--ease-default);
}

.tb-special-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.tb-special-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Sự kiện xu hướng (Trending Events, digits 1,2,3,4) --- */
.tb-trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}

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

.tb-trending-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.tb-trending-number {
  font-size: 80px;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 2.5px #2dc275; /* Outlined green number */
  line-height: 1;
  user-select: none;
  font-family: var(--font-display);
}

.tb-trending-card {
  flex: 1;
  background: #131822;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/10;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast);
  display: block;
}

.tb-trending-card:hover {
  transform: translateY(-2px);
}

.tb-trending-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Interactive Tabs (Cuối tuần này / Tháng này) --- */
.tb-tabs-header {
  display: flex;
  gap: var(--space-6);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: var(--space-5);
  align-items: center;
}

.tb-tab-btn {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.6);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  padding: var(--space-2) 0;
  cursor: pointer;
  position: relative;
  transition: color var(--duration-fast);
}

.tb-tab-btn:hover,
.tb-tab-btn.active {
  color: #ffffff;
}

.tb-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: #2dc275;
  border-radius: var(--radius-full);
}

/* --- Resale Ticket (Green Card Layout) --- */
.tb-resale-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-6);
  background: #131822;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: var(--space-4);
  margin: var(--space-6) 0;
}

@media (max-width: 900px) {
  .tb-resale-section {
    grid-template-columns: 1fr;
  }
}

.tb-resale-banner {
  background: linear-gradient(135deg, #2dc275 0%, #20a965 100%);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  min-height: 240px;
  position: relative;
  overflow: hidden;
}

.tb-resale-banner h3 {
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
  color: #ffffff;
}

.tb-resale-mascot {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: var(--space-2) 0;
}

.tb-resale-banner .btn-resale {
  background: #ffffff;
  color: #20a965;
  font-weight: var(--fw-bold);
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: var(--fs-xs);
  box-shadow: var(--shadow-sm);
}

.tb-resale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
}

/* --- Partner Promotion Banners (Full-width strips between categories) --- */
.tb-info-row {
  width: 100%;
  margin: var(--space-8) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1200 / 180;
  background: #131822;
}

.tb-info-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Generic EJS Event Cards (Dark Theme version) --- */
.tb-section {
  padding: var(--space-6) 0;
  background: #1c1f24;
}

.tb-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.tb-section-header h2 {
  font-size: 22px;
  font-weight: var(--fw-bold);
  color: #ffffff;
}

.tb-section-header .btn-see-more {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  transition: color var(--duration-fast);
}

.tb-section-header .btn-see-more:hover {
  color: #2dc275;
}

.tb-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}

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

.tb-event-card {
  display: flex;
  flex-direction: column;
  background: #131822; /* Dark surface card bg */
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  height: 100%;
  transition: transform var(--duration-fast);
}

.tb-event-card:hover {
  transform: translateY(-4px);
}

.tb-event-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #131822;
}

.tb-event-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tb-event-card__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tb-event-card h3 {
  font-size: 15px;
  font-weight: var(--fw-bold);
  color: #ffffff;
  margin-bottom: var(--space-2);
  line-height: var(--lh-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.tb-event-card__price {
  color: #2dc275; /* Green price */
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-3);
}

.tb-event-card__meta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.tb-event-card__meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.tb-event-card__meta-row i {
  color: #2dc275;
  width: 14px;
  text-align: center;
}

.tb-event-card__meta-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Public Footer (matching Dark Vibe) --- */
.tb-footer {
  background: #0b0c0e;
  color: rgba(255,255,255,0.6);
  padding: var(--space-12) 0 var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.tb-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.tb-footer h3 {
  color: #ffffff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tb-footer p {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  margin-bottom: var(--space-3);
}

.tb-footer-desc {
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  max-width: 250px;
}

.tb-footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: var(--fs-sm);
  display: block;
  margin-bottom: var(--space-2);
  transition: color var(--duration-fast);
}

.tb-footer a:hover {
  color: #2dc275;
}

.tb-footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.tb-footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-size: var(--fs-sm);
  transition: background-color var(--duration-fast);
}

.tb-footer-social a:hover {
  background-color: #2dc275;
}

.tb-footer-hotline {
  font-size: var(--fs-lg) !important;
  font-weight: var(--fw-bold);
  color: #2dc275 !important;
  margin-bottom: var(--space-3) !important;
}

.tb-footer-email,
.tb-footer-hotline {
  display: flex !important;
  align-items: center;
  gap: var(--space-2);
}

.tb-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.4);
}

.tb-footer-langs {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.tb-footer-langs a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  display: inline;
  margin: 0;
}

.tb-footer-langs a.is-active {
  color: #ffffff;
  font-weight: var(--fw-bold);
}

/* --- Layout Responsiveness (Breakpoints) --- */

@media (max-width: 1100px) {
  .tb-header-actions {
    display: none; /* Hide desktop menu */
  }
  .tb-menu-toggle {
    display: block; /* Show hamburger */
  }
  .tb-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
}

@media (max-width: 768px) {
  .tb-top-search {
    display: none; /* Hide search bar in header main on tablet/mobile */
  }
  /* Keep the category bar visible on mobile as a horizontal-scroll strip
     (key navigation for the large mobile audience). */
  .tb-category-bar {
    display: block;
    overflow: hidden;
  }
  .tb-category-bar__inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 12px;
    scroll-snap-type: x proximity;
  }
  .tb-category-bar__inner::-webkit-scrollbar { display: none; }
  .tb-category-bar__inner > a {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
  }
  .tb-category-bar__inner > a.active {
    background: var(--color-primary, #2dc275);
    color: #fff;
  }
  .tb-featured-carousel {
    grid-auto-columns: 100%;
  }
  .tb-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .tb-footer__bottom {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .tb-logo {
    font-size: 22px;
  }
  .tb-featured-card {
    min-height: 280px;
  }
  .tb-featured-card__overlay {
    padding: var(--space-4);
  }
}

/* Mobile quick-search bar (under the category strip) */
.tb-mobile-search-bar { display: none; }
@media (max-width: 768px) {
  .tb-mobile-search-bar {
    display: block;
    background: var(--color-surface, #fff);
    border-bottom: 1px solid var(--color-border-light, #e5e7eb);
    padding: 10px 0;
  }
  .tb-mobile-search-bar form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg, #f5f6fa);
    border-radius: 999px;
    padding: 6px 8px 6px 14px;
  }
  .tb-mobile-search-bar__icon { color: var(--color-text-muted, #94a3b8); font-size: 14px; }
  .tb-mobile-search-bar input {
    flex: 1;
    border: 0;
    background: transparent;
    font-size: 15px; /* >=16px avoids iOS zoom; 15 acceptable, bump to 16 */
    font-size: 16px;
    outline: none;
    min-width: 0;
    color: var(--color-text, #16213e);
  }
  .tb-mobile-search-bar button {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: var(--color-primary, #2dc275);
    color: #fff;
    cursor: pointer;
  }
}

/* --- Event Detail Page Styles --- */
.tb-detail-page {
  padding: var(--space-6) 0 var(--space-16);
  background: #1c1f24;
}

.tb-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-4);
}

.tb-breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.tb-breadcrumb a:hover {
  color: #2dc275;
}

.tb-breadcrumb span {
  color: #ffffff;
}

.tb-detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 21/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
  background: #131822;
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .tb-detail-hero {
    aspect-ratio: 16/9;
  }
}

.tb-detail-hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tb-detail-hero__bg-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: rgba(255, 255, 255, 0.15);
}

.tb-detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28, 31, 36, 0.95) 0%, rgba(28, 31, 36, 0.2) 60%, transparent 100%);
  z-index: 1;
}

.tb-detail-hero__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-8);
  z-index: 2;
}

@media (max-width: 768px) {
  .tb-detail-hero__overlay {
    padding: var(--space-4);
  }
}

.tb-detail-hero__badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: #ffffff;
  margin-bottom: var(--space-2);
  text-transform: uppercase;
}

.tb-detail-hero__title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  color: #ffffff;
  line-height: var(--lh-tight);
}

.tb-detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-6);
  align-items: start;
}

@media (max-width: 900px) {
  .tb-detail-grid {
    grid-template-columns: 1fr;
  }
}

.tb-detail-main {
  background: #131822;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid rgba(255,255,255,0.06);
}

.tb-detail-section {
  margin-bottom: var(--space-8);
}

.tb-detail-section:last-child {
  margin-bottom: 0;
}

.tb-detail-section h2 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: var(--space-2);
}

.tb-detail-section h2 i {
  color: #2dc275;
}

.tb-detail-info-list {
  display: grid;
  gap: var(--space-4);
}

.tb-detail-info-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.tb-detail-info-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(45, 194, 117, 0.1);
  color: #2dc275;
  font-size: var(--fs-md);
  flex-shrink: 0;
}

.tb-detail-info-item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tb-detail-info-item__text strong {
  font-size: var(--fs-sm);
  color: #ffffff;
}

.tb-detail-info-item__text span {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.7);
}

.tb-detail-description {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
}

.tb-detail-description p {
  margin-bottom: var(--space-4);
  color: rgba(255, 255, 255, 0.85);
}

.tb-detail-description p:last-child {
  margin-bottom: 0;
}

.tb-detail-sidebar {
  position: sticky;
  top: 92px;
  z-index: 10;
}

.tb-detail-sidebar__card {
  background: #131822;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow-md);
}

.tb-detail-sidebar__price-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.tb-detail-sidebar__price {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.tb-detail-sidebar__progress {
  margin-bottom: var(--space-5);
}

.tb-detail-sidebar__progress-text {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-2);
}

.tb-detail-sidebar__progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.tb-detail-sidebar__progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
}

.tb-detail-sidebar__status {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.tb-detail-sidebar__status.text-success {
  color: #2dc275;
}

.tb-detail-sidebar__status.text-danger {
  color: #ef4444;
}

.tb-detail-sidebar__divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: var(--space-4) 0;
}

.tb-detail-sidebar__note {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  line-height: var(--lh-normal);
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-1);
}

.tb-detail-sidebar__note i {
  margin-top: 2px;
}

.tb-btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: 12px var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  color: #ffffff !important;
  transition: transform var(--duration-fast), opacity var(--duration-fast);
}

.tb-btn-cta:hover {
  transform: scale(1.01);
  opacity: 0.95;
}

.tb-mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: #131822;
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 100;
  padding: 0 var(--space-4);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 900px) {
  .tb-mobile-sticky-bar {
    display: block;
  }
  .tb-detail-sidebar {
    display: none; /* Hide sidebar card and use mobile stick bar */
  }
  .tb-detail-page {
    padding-bottom: 92px; /* make space for mobile stick bar */
  }
}

.tb-mobile-sticky-bar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.tb-mobile-sticky-bar__price {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: #2dc275;
}

/* --- Ticket Lookup Page Styles --- */
.tb-lookup-page {
  padding: var(--space-8) 0 var(--space-16);
  background: #1c1f24;
}

.tb-lookup-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.tb-lookup-header h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.tb-lookup-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-md);
}

.tb-lookup-form-container {
  max-width: 600px;
  margin: 0 auto var(--space-10);
  background: #131822;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-md);
}

.tb-lookup-form__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tb-lookup-form__group label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: #2dc275;
}

.tb-lookup-form__input-wrapper {
  display: flex;
  gap: var(--space-3);
}

@media (max-width: 600px) {
  .tb-lookup-form__input-wrapper {
    flex-direction: column;
  }
}

.tb-lookup-form__input-wrapper input {
  flex: 1;
  height: 48px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0 var(--space-4);
  color: #ffffff;
  font-size: var(--fs-base);
  outline: 0;
  transition: border-color var(--duration-fast);
}

.tb-lookup-form__input-wrapper input:focus {
  border-color: #2dc275;
}

.tb-btn-lookup-submit {
  height: 48px;
  background: #2dc275;
  color: #ffffff;
  font-weight: var(--fw-bold);
  border: 0;
  border-radius: var(--radius-md);
  padding: 0 var(--space-6);
  cursor: pointer;
  font-size: var(--fs-sm);
  transition: background-color var(--duration-fast);
}

.tb-btn-lookup-submit:hover {
  background: #20a965;
}

.tb-lookup-results__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: var(--space-2);
}

.tb-lookup-results__title span {
  color: #2dc275;
}

.tb-lookup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

.tb-lookup-ticket-card {
  background: #131822;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.tb-lookup-ticket-card__header {
  padding: var(--space-3) var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
}

.tb-lookup-ticket-card__header .prefix {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
}

.tb-lookup-ticket-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tb-lookup-ticket-card__body .event-name {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-4);
  line-height: var(--lh-tight);
}

.tb-lookup-ticket-card__body .ticket-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-4);
}

.tb-lookup-ticket-card__body .meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.tb-lookup-ticket-card__body .meta-row i {
  color: #2dc275;
  width: 14px;
  text-align: center;
}

.tb-lookup-ticket-card__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: var(--space-4) 0;
}

.tb-lookup-ticket-card__footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tb-status-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: var(--fw-bold);
}

.tb-status-badge.status-active {
  background: rgba(45, 194, 117, 0.1);
  color: #2dc275;
}

.tb-status-badge.status-used {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}

.tb-status-badge.status-cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.tb-status-badge.status-expired {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.btn-view-ticket {
  color: #2dc275;
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: color var(--duration-fast);
}

.btn-view-ticket:hover {
  color: #20a965;
}

.tb-lookup-empty {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  background: #131822;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tb-lookup-empty__icon {
  font-size: 48px;
  color: rgba(255, 255, 255, 0.15);
  margin-bottom: var(--space-4);
}

.tb-lookup-empty h3 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
}

.tb-lookup-empty p {
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--fs-sm);
}

.tb-lookup-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-4);
}

@media (max-width: 768px) {
  .tb-lookup-guide {
    grid-template-columns: 1fr;
  }
}

.tb-lookup-guide-card {
  background: #131822;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tb-lookup-guide-card .icon {
  font-size: 32px;
  color: #2dc275;
  margin-bottom: var(--space-4);
}

.tb-lookup-guide-card h3 {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
}

.tb-lookup-guide-card p {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.5);
  line-height: var(--lh-normal);
}

/* --- Electronic Ticket View Page (Bare Layout) --- */
.tb-ticket-view-page {
  padding: var(--space-10) var(--space-4) var(--space-16);
  background: #f5f6fa;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.tb-ticket-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.tb-ticket-card {
  background: #131822;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 8px solid #2dc275; /* custom overrides style inline */
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.tb-ticket-card__header {
  padding: var(--space-5) var(--space-5) var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.tb-ticket-card__header .logo {
  text-decoration: none;
  font-size: 22px;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
}

.tb-ticket-card__header .status-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
}

.tb-ticket-card__header .status-badge.status-active {
  background: rgba(45, 194, 117, 0.1);
  color: #2dc275;
}

.tb-ticket-card__header .status-badge.status-used {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}

.tb-ticket-card__header .status-badge.status-cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.tb-ticket-card__header .status-badge.status-expired {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.tb-ticket-card__details {
  padding: var(--space-5);
}

.tb-ticket-card__details .event-name {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: var(--space-4);
  line-height: var(--lh-tight);
  text-align: center;
}

.tb-ticket-card__details .details-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tb-ticket-card__details .details-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: var(--fs-sm);
  gap: var(--space-4);
}

.tb-ticket-card__details .details-row .label {
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.tb-ticket-card__details .details-row .val {
  color: #ffffff;
  text-align: right;
  word-break: break-word;
}

.tb-ticket-card__details .details-row .font-mono {
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
}

.tb-ticket-card__tear-line {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}

.tb-ticket-card__tear-line .circle-left,
.tb-ticket-card__tear-line .circle-right {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: #1c1f24;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tb-ticket-card__tear-line .circle-left {
  left: -10px;
}

.tb-ticket-card__tear-line .circle-right {
  right: -10px;
}

.tb-ticket-card__tear-line .dashes {
  flex: 1;
  height: 1px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  margin: 0 var(--space-4);
}

.tb-ticket-card__barcode-area {
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.tb-ticket-card__barcode-area .qr-container {
  background: #ffffff;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
  display: inline-flex;
}

.tb-ticket-card__barcode-area .qr-code {
  width: 160px;
  height: 160px;
  display: block;
}

.tb-ticket-card__barcode-area .barcode-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
  max-width: 260px;
}

.tb-ticket-card__barcode-area .barcode {
  width: 100%;
  height: 50px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  border-radius: var(--radius-xs);
}

.tb-ticket-card__barcode-area .barcode-text {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
}

.tb-ticket-card__barcode-area .ticket-void-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4);
}

.tb-ticket-card__barcode-area .void-stamp {
  font-size: 28px;
  font-weight: 900;
  border: 4px double;
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-sm);
  transform: rotate(-8deg);
  margin-bottom: var(--space-4);
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.tb-ticket-card__barcode-area .void-stamp.status-used {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.3);
}

.tb-ticket-card__barcode-area .void-stamp.status-cancelled {
  border-color: #ef4444;
  color: #ef4444;
}

.tb-ticket-card__barcode-area .void-stamp.status-expired {
  border-color: #f59e0b;
  color: #f59e0b;
}

.tb-ticket-card__barcode-area .void-details {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.5);
  max-width: 260px;
}

.tb-ticket-card__footer {
  padding: var(--space-5);
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.tb-ticket-card__footer p {
  margin-bottom: var(--space-2);
  line-height: var(--lh-normal);
}

.tb-ticket-card__footer p:last-child {
  margin-bottom: 0;
}

.tb-ticket-card__footer p strong {
  color: #2dc275;
}

.tb-ticket-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
}

.tb-ticket-actions .btn-action {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-radius: var(--radius-md);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: transform var(--duration-fast), opacity var(--duration-fast);
  cursor: pointer;
  border: 0;
}

.tb-ticket-actions .btn-action:hover {
  transform: scale(1.01);
}

.tb-ticket-actions .btn-action.primary {
  background: #2dc275;
  color: #ffffff !important;
}

.tb-ticket-actions .btn-action.resale {
  background: linear-gradient(135deg, #ff8a4c, #ff6f3c);
  color: #ffffff !important;
}
.tb-ticket-actions .btn-action.resale:disabled { opacity: 0.7; cursor: default; }

.tb-ticket-actions .btn-action.secondary {
  background: #131822;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tb-ticket-actions .btn-action.outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.6) !important;
}

.tb-ticket-actions .btn-action.outline:hover {
  color: #ffffff !important;
}

/* --- Lucky Draw Page Styles --- */
.tb-lucky-draw-page {
  padding: var(--space-8) 0 var(--space-16);
  background:
    radial-gradient(circle at 15% 10%, rgba(45,194,117,0.18), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(255,111,60,0.16), transparent 45%),
    linear-gradient(160deg, #11151c 0%, #1c1f24 55%, #141821 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.tb-lucky-header {
  text-align: center;
  margin-bottom: var(--space-8);
  position: relative;
  z-index: 2;
}

.tb-lucky-header .tb-lucky-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2dc275;
  background: rgba(45,194,117,0.12);
  border: 1px solid rgba(45,194,117,0.3);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.tb-lucky-header h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: var(--space-3);
  background: linear-gradient(110deg, #ffffff 30%, #9affcf 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.tb-lucky-header p {
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--fs-md);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.tb-lucky-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* Override container width specifically for lucky draw page to fit large grid */
.tb-lucky-draw-page .tb-container {
  max-width: 1380px;
  width: 100%;
}

.tb-lucky-card {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(165deg, rgba(28,34,46,0.95), rgba(17,21,28,0.95));
  border-radius: 24px;
  padding: 40px 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.06);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tb-lucky-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(45,194,117,0.10), transparent 70%);
  pointer-events: none;
}
@keyframes luckyCardSweep { to { transform: rotate(360deg); } }

.tb-lucky-card > * { position: relative; z-index: 1; }

.tb-lucky-card__giftrow {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
}
.tb-lucky-card__giftrow span {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  animation: luckyGiftBob 2.4s ease-in-out infinite;
}
.tb-lucky-card__giftrow span:nth-child(2) { animation-delay: 0.3s; transform: scale(1.12); background: rgba(255,111,60,0.14); border-color: rgba(255,111,60,0.3); }
.tb-lucky-card__giftrow span:nth-child(3) { animation-delay: 0.6s; }
@keyframes luckyGiftBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.tb-lucky-card__giftrow span:nth-child(2) { animation-name: luckyGiftBobBig; }
@keyframes luckyGiftBobBig { 0%,100% { transform: translateY(0) scale(1.12); } 50% { transform: translateY(-10px) scale(1.12); } }

.tb-lucky-card h2 {
  font-size: 24px;
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
  color: #fff;
}

.tb-lucky-card .desc {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}
.tb-lucky-card .desc strong { color: #2dc275; }

.tb-lucky-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.tb-lucky-form input {
  height: 58px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0 var(--space-4);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
  outline: 0;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.tb-lucky-form input::placeholder { letter-spacing: 0.5px; font-weight: 400; text-transform: none; color: rgba(255,255,255,0.3); }
.tb-lucky-form input:focus {
  border-color: #2dc275;
  box-shadow: 0 0 0 4px rgba(45,194,117,0.15);
}

.tb-btn-spin-action {
  height: 56px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
  color: #ffffff;
}

.tb-btn-spin-action.accent {
  background: linear-gradient(135deg, #ff8a4c, #ff6f3c);
  box-shadow: 0 12px 28px -10px rgba(255,111,60,0.8);
}

.tb-btn-spin-action.accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(255,111,60,0.9);
}
.tb-btn-spin-action.accent:active { transform: translateY(0); }

/* Trust badges under the input card */
.tb-lucky-trust {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.tb-lucky-trust div {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
}
.tb-lucky-trust i { color: #2dc275; }

/* decorative floating stars/gifts layer */
.bg-stars { position: absolute; inset: 0; overflow: hidden; z-index: 1; pointer-events: none; }
.bg-stars .star { position: absolute; background: #fff; border-radius: 50%; opacity: 0.5; animation: starTwinkle 3s ease-in-out infinite; }
@keyframes starTwinkle { 0%,100% { opacity: 0.15; } 50% { opacity: 0.7; } }
.bg-stars .floating-gift { position: absolute; font-size: 22px; opacity: 0.18; animation: floatGift 6s ease-in-out infinite; }
@keyframes floatGift { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-22px) rotate(5deg); } }

/* Canvas Spinner Styling */
.tb-lucky-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.wheel-outer-wrapper {
  position: relative;
  width: 440px;
  height: 440px;
}

@media (max-width: 480px) {
  .wheel-outer-wrapper {
    width: 320px;
    height: 320px;
  }
  #wheelCanvas {
    width: 320px !important;
    height: 320px !important;
  }
  .wheel-spin-btn {
    width: 70px !important;
    height: 70px !important;
    font-size: var(--fs-xs) !important;
  }
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 32px;
  color: #ef4444;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.wheel-canvas-container {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.wheel-spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  background: #ffffff;
  color: #1c1f24;
  border: 4px solid #1c1f24;
  font-weight: 900;
  font-size: var(--fs-base);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 20;
  transition: transform var(--duration-fast);
  outline: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-spin-btn:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.wheel-code-badge {
  background: #131822;
  border: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.6);
}

.wheel-code-badge strong {
  color: #2dc275;
}

.tb-lucky-empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  background: #131822;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.06);
  max-width: 600px;
  margin: 0 auto;
}

.tb-lucky-empty-state .empty-icon {
  font-size: 48px;
  color: rgba(255,255,255,0.15);
  margin-bottom: var(--space-4);
}

.tb-lucky-empty-state h3 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
}

.tb-lucky-empty-state p {
  color: rgba(255,255,255,0.5);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-6);
}

.tb-btn-back-home {
  display: inline-block;
  background: #2dc275;
  color: #ffffff !important;
  text-decoration: none;
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-md);
  transition: background-color var(--duration-fast);
}

.tb-btn-back-home:hover {
  background: #20a965;
}

/* Modals Backdrop & Dialogue */
.tb-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.tb-modal-dialog {
  width: 100%;
  max-width: 420px;
  animation: modalFadeIn 0.3s var(--ease-out);
}

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

.tb-modal-content {
  background: linear-gradient(165deg, #0e1322 0%, #070912 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.04);
}

.tb-modal-body {
  padding: var(--space-8) var(--space-6);
}

.result-icon {
  font-size: 60px;
  line-height: 1;
  margin-bottom: var(--space-4);
}

.result-msg {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-5);
  line-height: var(--lh-normal);
}

.prize-showcase {
  background: rgba(255, 111, 60, 0.1);
  border: 1px solid rgba(255, 111, 60, 0.2);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
}

.prize-tag {
  font-size: 22px;
  font-weight: 800;
  color: #ff6f3c;
}

.tb-modal-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tb-btn-modal {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  cursor: pointer;
  border: 0;
  text-decoration: none;
}

.tb-btn-modal.primary {
  background: #2dc275;
  color: #ffffff !important;
}

.tb-btn-modal.outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.5) !important;
}

.tb-btn-modal.outline:hover {
  color: #ffffff !important;
}

/* --- Lucky Draw Result Details Page --- */
.tb-result-page {
  padding: var(--space-8) 0 var(--space-16);
  background: #1c1f24;
}

.tb-result-container {
  display: flex;
  justify-content: center;
}

.tb-result-card {
  width: 100%;
  max-width: 580px;
  background: #131822;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow-lg);
}

.tb-result-card.win {
  border-top: 8px solid #ff6f3c;
}

.tb-result-card.lose {
  border-top: 8px solid #9ca3af;
}

.tb-result-card__header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.tb-result-card__header .program-title {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.tb-result-card__header .draw-time {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.4);
}

.tb-result-card__body {
  padding: var(--space-8) var(--space-6);
}

.badge-ribbon {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #ff6f3c;
  margin-bottom: var(--space-2);
}

.prize-display {
  text-align: center;
  margin-bottom: var(--space-8);
}

.prize-display .prize-name {
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
  line-height: var(--lh-tight);
}

.recipient-details {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}

.recipient-details h3 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-4);
  color: #2dc275;
}

.recipient-details .details-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.recipient-details .details-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-sm);
  gap: var(--space-4);
}

.recipient-details .details-row .label {
  color: rgba(255,255,255,0.4);
}

.recipient-details .details-row .val {
  color: #ffffff;
  text-align: right;
}

.recipient-details .details-row .awarded-time {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}

.instructions-box {
  background: rgba(45, 194, 117, 0.05);
  border: 1px dashed rgba(45, 194, 117, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  font-size: var(--fs-xs);
  line-height: var(--lh-normal);
  color: rgba(255,255,255,0.7);
}

.instructions-box h4 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: #2dc275;
  margin-bottom: var(--space-2);
}

.instructions-box p {
  margin-bottom: var(--space-2);
}

.instructions-box p:last-child {
  margin-bottom: 0;
}

.lost-display {
  text-align: center;
  padding: var(--space-8) 0;
}

.lost-display .lost-icon {
  font-size: 64px;
  margin-bottom: var(--space-4);
}

.lost-display h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.lost-display p {
  color: rgba(255,255,255,0.5);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  max-width: 400px;
  margin: 0 auto;
}

.tb-result-card__footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: var(--space-4);
}

@media (max-width: 480px) {
  .tb-result-card__footer {
    flex-direction: column;
  }
}

/* Booking Form Styling */
.tb-booking-section {
  background: #131822;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-top: var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tb-booking-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: #ffffff;
}

.tb-booking-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.tb-booking-form .form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 600px) {
  .tb-booking-form .form-row-2col {
    grid-template-columns: 1fr;
  }
}

.tb-booking-form .form-input,
.tb-booking-form .form-textarea {
  background: #1c1f24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-base);
  width: 100%;
}

.tb-booking-form .form-input:focus,
.tb-booking-form .form-textarea:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 111, 60, 0.25);
}

.tb-booking-form .form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-1);
}

.w-100 {
  width: 100%;
}

/* ---- TicketBox horizontal premium ticket card styling ---- */
.ticketbox-ticket-wrapper {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  color: #1a1a1a;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
  font-family: var(--font-primary);
}

.ticketbox-ticket {
  display: flex;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 260px;
  position: relative;
  margin-bottom: var(--space-6);
  padding: 10px;
  gap: 10px;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Left strip */
.ticket-strip-left {
  width: 55px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: var(--space-3) 0;
  position: relative;
  background: transparent;
  flex-shrink: 0;
  height: 100%;
  box-sizing: border-box;
}

.vertical-text-container {
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
}

.vertical-text {
  font-size: 7px;
  color: #64748b;
  white-space: nowrap;
  letter-spacing: 0.1px;
}

.vertical-text-code {
  font-size: 8.5px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.strip-logo-box {
  background-color: #2dc275;
  color: #ffffff;
  border-radius: 4px;
  padding: 3px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: 36px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.strip-logo-box .logo-ticket {
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.strip-logo-box .logo-box {
  font-size: 8.5px;
  font-weight: 800;
  text-transform: lowercase;
}

/* Middle info */
.ticket-main-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  min-width: 0; /* Enable text truncation safety */
}

.ticket-event-card {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px rgba(0,0,0,0.01);
  min-width: 0;
  overflow: hidden; /* Clips background banner image */
  min-height: 110px;
}

.event-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ticket-event-card:hover .event-banner-bg {
  transform: scale(1.06);
}

.event-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.45) 50%, rgba(0, 0, 0, 0.85) 100%);
  z-index: 2;
}

.event-details-text {
  position: relative;
  z-index: 3;
  flex: 1;
  min-width: 0;
}

.ticket-event-title {
  font-size: var(--fs-md);
  font-weight: 700;
  color: #1a1a1a !important;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-2);
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-info-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.ticket-info-details .info-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 11.5px;
  color: #666666 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Has banner image styling */
.ticket-event-card.has-banner {
  border: none;
  padding: var(--space-5) var(--space-5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.ticket-event-card.has-banner .ticket-event-title {
  color: #ffffff !important;
  font-size: var(--fs-lg);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  margin-bottom: var(--space-3);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ticket-event-card.has-banner .ticket-info-details .info-row {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 12px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.ticket-event-card.has-banner .ticket-info-details .info-row i {
  color: #ffffff !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
}

.ticket-tier-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 10px var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px rgba(0,0,0,0.01);
}

.ticket-tier-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.ticket-tier-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ticket-tier-text strong {
  font-size: 12px;
  color: #333333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-tier-text span {
  font-size: 10px;
  color: #777777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Divider */
.ticket-divider {
  width: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.notch-top, .notch-bottom {
  width: 20px;
  height: 10px;
  background: #f5f6fa; /* matches page background */
  position: absolute;
  z-index: 10;
}

.notch-top {
  top: -11px;
  border-radius: 0 0 10px 10px;
  border-bottom: 1.5px solid inherit; /* will draw borders dynamically */
}

.notch-bottom {
  bottom: -11px;
  border-radius: 10px 10px 0 0;
}

.dashed-line {
  height: 100%;
  width: 0;
  border-left: 2px dashed rgba(0, 0, 0, 0.12);
}

/* Right Section */
.ticket-sec-right {
  width: 250px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.ticket-right-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  height: 100%;
  display: flex;
  gap: var(--space-3);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px rgba(0,0,0,0.01);
  box-sizing: border-box;
}

.seating-info-vertical {
  display: flex;
  flex-direction: row-reverse;
  gap: var(--space-2);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  justify-content: center;
  align-items: center;
  height: 100%;
  border-right: 1px dashed rgba(0, 0, 0, 0.1);
  padding-right: 12px;
  flex-shrink: 0;
}

.seat-info-line {
  font-size: 9.5px;
  color: #64748b;
  white-space: nowrap;
}

.seat-info-line strong {
  color: #1e293b;
}

.codes-column {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex: 1;
  height: 100%;
  position: relative;
  gap: var(--space-2);
}

.barcode-vertical-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  width: 50px;
  position: relative;
  box-sizing: border-box;
  padding-bottom: 5px;
}

.barcode-img {
  position: absolute;
  width: 140px;
  height: 32px;
  transform: rotate(270deg);
  top: 45%;
  left: 50%;
  transform-origin: center;
  margin-top: -16px;
  margin-left: -70px;
  object-fit: fill;
  flex-shrink: 0;
}

.barcode-num {
  font-size: 8.5px;
  font-family: var(--font-mono);
  color: #475569;
  letter-spacing: 1px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  z-index: 10;
}

.qr-code-wrapper {
  background: #ffffff;
  padding: 5px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.qr-img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Status overlays inside horizontal ticket */
.ticket-status-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.status-stamp {
  font-size: 20px;
  font-weight: 800;
  border: 3px double;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-sm);
  transform: rotate(-10deg);
  letter-spacing: 1px;
}

.status-stamp.stamp-pending {
  border-color: #f59e0b;
  color: #f59e0b;
}

.status-stamp.stamp-used {
  border-color: #9ca3af;
  color: #9ca3af;
}

.status-stamp.stamp-cancelled {
  border-color: #ef4444;
  color: #ef4444;
}

.status-stamp.stamp-expired {
  border-color: #f59e0b;
  color: #f59e0b;
}

/* Pending Warning Box */
.pending-warning-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.pending-warning-box .warning-icon {
  font-size: var(--fs-2xl);
  color: #f59e0b;
}

.pending-warning-box h3 {
  font-size: var(--fs-base);
  font-weight: 700;
  color: #f59e0b !important;
  margin-bottom: var(--space-1);
}

.pending-warning-box p {
  font-size: var(--fs-sm);
  color: #475569;
  margin-bottom: var(--space-3);
}

.contact-buttons {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.btn-contact-tel, .btn-contact-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-sm);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: opacity 0.2s;
}

.btn-contact-tel {
  background: #f59e0b;
  color: #ffffff !important;
}

.btn-contact-chat {
  background: #2DC275;
  color: #ffffff !important;
}

.btn-contact-tel:hover, .btn-contact-chat:hover {
  opacity: 0.9;
}

/* Prominent chat CTA — the primary path for ticket approval */
.btn-contact-chat--hero {
  width: 100%;
  padding: 15px 22px;
  font-size: 15px;
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, #34d27f 0%, #2DC275 55%, #18a85f 100%);
  box-shadow: 0 10px 24px -6px rgba(45, 194, 117, 0.55);
  transition: transform 0.22s cubic-bezier(0.22,1,0.36,1), box-shadow 0.22s, filter 0.22s;
  position: relative;
  overflow: hidden;
}

.btn-contact-chat--hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(45, 194, 117, 0.5);
  animation: tbChatHeroPulse 2.4s cubic-bezier(0.22,1,0.36,1) infinite;
}

@keyframes tbChatHeroPulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 194, 117, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(45, 194, 117, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 194, 117, 0); }
}

.btn-contact-chat--hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -6px rgba(45, 194, 117, 0.65);
  filter: brightness(1.04);
  opacity: 1;
}

.btn-contact-chat--hero > i { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .btn-contact-chat--hero::after { animation: none; }
}

/* Lucky-draw banner on an approved ticket */
.ticket-lucky-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  border: 1.5px solid #fcd34d;
  text-decoration: none;
  color: var(--color-text-primary);
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s;
}
.ticket-lucky-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(245, 158, 11, 0.45);
}
.ticket-lucky-banner__icon {
  font-size: 2rem;
  flex-shrink: 0;
  animation: ticketGiftWiggle 2.2s ease-in-out infinite;
}
@keyframes ticketGiftWiggle {
  0%, 92%, 100% { transform: rotate(0); }
  94% { transform: rotate(-12deg); }
  96% { transform: rotate(12deg); }
  98% { transform: rotate(-8deg); }
}
.ticket-lucky-banner__text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ticket-lucky-banner__text strong { font-size: var(--fs-sm); color: #b45309; }
.ticket-lucky-banner__text span { font-size: var(--fs-xs); color: var(--color-text-secondary); }
.ticket-lucky-banner__text b { color: #b45309; font-family: var(--font-mono); }
.ticket-lucky-banner > .fa-chevron-right { color: #d97706; }
@media (prefers-reduced-motion: reduce) {
  .ticket-lucky-banner__icon { animation: none; }
}

/* Pending Steps Indicator */
.pending-steps {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-3) 0;
}

.pending-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
}

.pending-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d1d5db;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.pending-step.completed {
  color: var(--color-success);
  background: rgba(34, 197, 94, 0.08);
}

.pending-step.completed .step-num {
  background: var(--color-success);
}

.pending-step.active {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  animation: pulse-step 2s ease-in-out infinite;
}

.pending-step.active .step-num {
  background: #f59e0b;
}

@keyframes pulse-step {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@media (max-width: 480px) {
  .pending-steps {
    flex-direction: column;
  }
}

/* Instructions, terms, support */
.ticket-instructions {
  border-top: 1px solid #e2e8f0;
  padding-top: var(--space-5);
  margin-top: var(--space-4);
}

.success-notice {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: #2dc275 !important;
  margin-bottom: var(--space-4);
}

.terms-section, .support-section {
  margin-bottom: var(--space-5);
}

.terms-section h4, .support-section h4 {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #1a1a1a !important;
  margin-bottom: var(--space-2);
}

.terms-section ul {
  list-style-type: disc;
  padding-left: var(--space-5);
  font-size: 12px;
  color: #555555 !important;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.support-section p {
  font-size: 12px;
  color: #555555 !important;
  margin-bottom: 2px;
}

.support-contact {
  font-weight: 600;
  margin-bottom: var(--space-2) !important;
}

/* Promotional Banner */
.ticketbox-promotional-banner {
  background: #f5f6fa;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-6);
}

.banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.banner-text span {
  font-size: 11px;
  color: #777777;
}

.banner-text strong {
  font-size: 13px;
  color: #333333;
}

.btn-banner-cskh {
  background: #2dc275;
  color: #ffffff !important;
  font-size: var(--fs-sm);
  font-weight: 700;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-banner-cskh:hover {
  opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 820px) {
  .ticketbox-ticket {
    flex-direction: column;
    height: auto;
    padding: 12px;
    gap: 12px;
  }
  
  .ticket-strip-left {
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-md);
    border-left: 0 !important;
    border-top: 0 !important;
    box-sizing: border-box;
  }
  
  .vertical-text-container {
    transform: none;
    writing-mode: horizontal-tb;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: auto;
    height: auto;
    margin: 0;
  }
  
  .vertical-text {
    font-size: 11px;
    white-space: normal;
  }
  
  .vertical-text-code {
    font-size: 11px;
    white-space: normal;
  }
  
  .strip-logo-box {
    width: 32px;
    padding: 2px 4px;
  }
  
  .ticket-main-info {
    width: 100%;
  }

  .ticket-event-card.has-banner {
    padding: var(--space-4);
    min-height: 100px;
  }

  .ticket-info-details .info-row {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .ticket-tier-text strong {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .ticket-tier-text span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .ticket-divider {
    display: flex;
    width: 100%;
    height: 16px;
    flex-direction: row;
    margin: var(--space-1) 0;
  }
  
  .notch-top {
    top: 50%;
    transform: translateY(-50%);
    left: -22px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f5f6fa;
    border: none;
  }
  
  .notch-bottom {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    right: -22px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f5f6fa;
    border: none;
  }

  .dashed-line {
    width: 100%;
    height: 0;
    border-left: none;
    border-top: 2px dashed rgba(0, 0, 0, 0.12);
  }
  
  .ticket-sec-right {
    width: 100%;
  }

  .ticket-right-card {
    flex-direction: column;
    height: auto;
    gap: var(--space-4);
    padding: var(--space-4);
  }

  .seating-info-vertical {
    writing-mode: horizontal-tb;
    transform: none;
    border-right: none;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    padding-right: 0;
    padding-bottom: var(--space-3);
    margin-bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    height: auto;
  }

  .seat-info-line {
    font-size: 13px;
  }

  .codes-column {
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    height: auto;
    gap: var(--space-4);
  }

  .barcode-vertical-wrapper {
    writing-mode: horizontal-tb;
    transform: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    width: auto;
    flex: 1;
  }

  .barcode-img {
    position: static;
    width: 100%;
    max-width: 180px;
    height: 45px;
    transform: none;
    margin: 0;
  }

  .barcode-num {
    writing-mode: horizontal-tb;
    transform: none;
    margin-top: 4px;
    font-size: 11px;
  }

  .qr-code-wrapper {
    width: 90px;
    height: 90px;
    padding: 4px;
  }
}

/* Pending badges and overlay styles */
.tb-status-badge.status-pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.tb-ticket-card__header .status-badge.status-pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.tb-ticket-card__barcode-area .void-stamp.status-pending {
  border-color: #f59e0b;
  color: #f59e0b;
}

/* Hamburger menu toggle */
.tb-menu-toggle {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  line-height: 1;
}
@media (max-width: 1100px) {
  .tb-menu-toggle {
    display: block !important;
  }
}

/* Mobile drawer styles */
.tb-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  width: min(86vw, 320px);
  padding: var(--space-6);
  background: #111317; /* Dark theme sidebar */
  color: #ffffff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.tb-mobile-drawer.is-open {
  transform: translateX(0);
}

.tb-mobile-drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.tb-mobile-drawer__head .tb-logo {
  font-size: 24px;
}

.tb-mobile-drawer__head button {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.tb-mobile-drawer__head button:hover {
  opacity: 1;
}

.tb-mobile-search {
  margin-bottom: var(--space-6);
  display: flex;
  gap: var(--space-2);
}

.tb-mobile-search input {
  flex: 1;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  padding: 0 var(--space-3);
  font-size: var(--fs-sm);
}

.tb-mobile-search input:focus {
  outline: none;
  border-color: #2dc275;
}

.tb-mobile-search button {
  height: 40px;
  border-radius: var(--radius-md);
  border: 0;
  background: #2dc275;
  color: #ffffff;
  font-weight: var(--fw-bold);
  padding: 0 var(--space-4);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.tb-mobile-search button:hover {
  background: #20a965;
}

.tb-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.tb-mobile-nav a {
  padding: var(--space-3) 0;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--fs-sm);
  transition: color 0.2s;
}

.tb-mobile-nav a:hover {
  color: #2dc275;
}

/* Dim overlay behind drawer */
.tb-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tb-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   LUCKY MYSTERY GIFTBOX GAME STYLES
   ============================================================ */

.tb-lucky-giftbox-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  width: 100%;
  align-self: stretch; /* Cho phép giãn rộng hết cỡ theo flex cha */
}

.game-instruction-banner {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-base);
}

.gift-box-grid.three-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1380px; /* Tăng tối đa độ rộng khung siêu lớn hoành tráng theo thiết kế */
  width: 100%;
  align-self: stretch; /* Đảm bảo khung lưới giãn rộng hết cỡ theo container, không bị co nhỏ */
  margin: 0 auto;
  gap: 65px; /* Khoảng cách cột rộng rãi, thoáng mắt */
  padding: 25px 45px 35px 45px; /* Giảm padding trên dưới để đẩy toàn bộ lên sát, gọn gàng */
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
}

/* Sân khấu (Stage) chứa mỗi hộp quà */
.gift-box-item {
  position: relative;
  height: 480px; /* Thu gọn chiều cao sân khấu xuống 480px để đẩy phần dưới lên, tránh bị ẩn */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 40px;
  box-sizing: border-box;
}

/* Wrapper co giãn responsive cho hộp quà (Phóng to 1.85x trên Desktop) */
.gift-box-scale-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 5;
  transform: scale(1.85); /* Phóng to hộp quà siêu đại cực kỳ ấn tượng */
  transform-origin: bottom center;
}

/* --- HỘP QUÀ TRUYỀN THỐNG CHUẨN DÁNG MỚI --- */
.gift-box {
  position: relative;
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  cursor: pointer;
  z-index: 5;
  transform-style: preserve-3d;
}

/* Thân hộp quà */
.gift-body {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 115px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 2px solid #fbbf24;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6), inset 0 -10px 20px rgba(0,0,0,0.4);
  box-sizing: border-box;
  z-index: 4;
}

/* Ruy-băng dọc thân */
.gift-body::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fef08a, #f59e0b);
  z-index: 5;
}

/* Nắp hộp quà */
.gift-lid {
  position: absolute;
  top: 23px;
  left: -6px;
  width: 162px;
  height: 30px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #fbbf24;
  border-radius: 6px 6px 3px 3px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.4);
  z-index: 6;
  box-sizing: border-box;
}

/* Ruy-băng dọc nắp */
.gift-lid::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fef08a, #f59e0b);
  z-index: 7;
}

/* CHIẾC NƠ LỤA 3D TRÊN ĐỈNH */
.gift-bow {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 40px;
  z-index: 7;
}

/* Cánh nơ trái/phải */
.bow-loop {
  position: absolute;
  width: 35px;
  height: 25px;
  background: linear-gradient(135deg, #fef08a, #d97706);
  border-radius: 50% 50% 0 50%;
  top: 5px;
  left: 2px;
  transform: rotate(-10deg);
  box-shadow: 0 3px 5px rgba(0,0,0,0.3);
}

.bow-loop.right {
  left: auto;
  right: 2px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(10deg);
}

/* Nút thắt nơ ở giữa */
.bow-center {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: #f59e0b;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* --- VÉ SỰ KIỆN (TICKET) BIẾN HÌNH --- */
.ticket-scale-wrapper {
  position: absolute;
  width: 260px;
  height: 110px;
  left: 50%;
  margin-left: -130px;
  bottom: 115px; /* Đẩy vé lên cao hơn để khớp với chiều cao hộp quà 1.85x */
  pointer-events: none;
  z-index: 2;
  transform: scale(1.5); /* Phóng to tấm vé tương xứng, tạo khoảng cách rộng rãi */
  transform-origin: center bottom;
}

.ticket-reward {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  display: flex;
  padding: 12px 15px;
  box-sizing: border-box;
  opacity: 0;
  transform: scale(0.3);
  z-index: 2;
  pointer-events: none;
  font-family: var(--font-sans);
}

/* Win Ticket State (Gold foil VIP style) */
.ticket-reward.is-win {
  background: linear-gradient(135deg, #fffcf5 0%, #fff8e6 45%, #fed7aa 100%);
  border-left: 6px dashed #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.25);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 25px rgba(251, 191, 36, 0.25);
  background-image: radial-gradient(rgba(245, 158, 11, 0.04) 1px, transparent 0);
  background-size: 10px 10px;
}
.ticket-reward.is-win .t-title {
  color: #111827;
}
.ticket-reward.is-win .t-subtitle {
  color: #ea580c;
}
.ticket-reward.is-win .t-stub {
  color: #ea580c;
}
.ticket-reward.is-win .ticket-left {
  border-right: 2px dashed rgba(234, 88, 12, 0.2);
}

/* Lose Ticket State (Sleek dark translucent frosted glass) */
.ticket-reward.is-lose {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-left: 6px dashed #64748b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 0);
  background-size: 10px 10px;
}
.ticket-reward.is-lose .t-title {
  color: #94a3b8;
}
.ticket-reward.is-lose .t-subtitle {
  color: #64748b;
}
.ticket-reward.is-lose .t-stub {
  color: #64748b;
}
.ticket-reward.is-lose .ticket-left {
  border-right: 2px dashed rgba(255, 255, 255, 0.08);
}

.ticket-left {
  flex: 3.2;
  border-right: 2px dashed rgba(234, 88, 12, 0.2);
  padding-right: 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ticket-right {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-left: 8px;
}

.t-title {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  margin: 0;
  text-transform: uppercase;
  line-height: 1.2;
  word-break: break-word;
}

.t-subtitle {
  font-size: 9px;
  color: #ea580c;
  font-weight: 800;
  margin: 2px 0 0;
  letter-spacing: 0.5px;
}

.t-info {
  font-size: 8px;
  color: #64748b;
  line-height: 1.3;
  margin-top: auto;
  font-weight: 500;
}

.t-stub {
  font-size: 10px;
  font-weight: 800;
  color: #1e293b;
  transform: rotate(90deg);
  white-space: nowrap;
  letter-spacing: 1px;
}

/* Hạt pháo hoa giấy */
.confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  opacity: 0;
  z-index: 8;
  pointer-events: none;
}

/* Glow ring effect */
.box-glow {
  position: absolute;
  width: 320px; /* Tăng kích thước vòng sáng để bao trọn hộp quà khổng lồ */
  height: 320px;
  bottom: 0px; /* Cân chỉnh tâm vòng sáng khớp với hộp quà */
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.gift-box-item:hover .box-glow {
  opacity: 1;
}

/* Box Number Badge */
.box-number {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: all 0.2s ease;
  z-index: 8;
}

.gift-box-item:hover .box-number {
  background: var(--color-accent);
  border-color: #ffffff;
  box-shadow: 0 2px 8px var(--color-accent);
}

.gift-box-item.opened .box-number {
  display: none;
}

/* Locked / Claimed Overlay Icons (Biểu tượng khóa/tích xanh trên hộp) */
.box-overlay {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  z-index: 10;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.gift-box-item.locked {
  cursor: not-allowed;
}
.gift-box-item.locked .gift-box-scale-wrapper {
  filter: blur(1.5px) grayscale(0.85);
  opacity: 0.45;
  transition: all 0.3s ease;
}
.gift-box-item.locked .lock-overlay {
  font-size: 26px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.gift-box-item.locked:hover {
  transform: none !important;
}

.gift-box-item.claimed {
  opacity: 0.95;
}
.gift-box-item.claimed .claim-overlay {
  font-size: 26px;
  background: rgba(16, 185, 129, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.gift-box-item.opened,
.gift-box-item.claimed { cursor: pointer; }
.gift-box-item.opened .box-review-hint {
  position: absolute;
  bottom: 8px; left: 50%; transform: translateX(-50%);
  background: rgba(16, 185, 129, 0.9); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
  white-space: nowrap; z-index: 9;
  pointer-events: none;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Lucky-draw completion banner */
.ld-complete-banner {
  width: 100%;
  max-width: 560px;
  margin: 24px auto 0;
  text-align: center;
  background: linear-gradient(165deg, rgba(28,34,46,0.96), rgba(17,21,28,0.96));
  border: 1px solid rgba(45,194,117,0.35);
  border-radius: 20px;
  padding: 28px 24px;
  color: #fff;
  box-shadow: 0 20px 50px -20px rgba(45,194,117,0.4);
  animation: tscPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ld-complete-icon { font-size: 42px; margin-bottom: 8px; }
.ld-complete-banner h3 { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.ld-complete-banner p { color: rgba(255,255,255,0.7); font-size: 14px; margin: 0 0 14px; line-height: 1.55; }
.ld-complete-banner p strong { color: #4ade80; }
.ld-complete-wallet {
  display: inline-block; background: rgba(45,194,117,0.14); border: 1px solid rgba(45,194,117,0.3);
  color: #4ade80; font-weight: 700; font-size: 15px; padding: 8px 18px; border-radius: 999px; margin-bottom: 16px;
}
.ld-complete-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ld-cb-btn { border: 0; border-radius: 12px; font-weight: 700; font-size: 14px; padding: 12px 20px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: transform .12s; }
.ld-cb-btn:hover { transform: translateY(-2px); }
.ld-cb-btn.primary { background: linear-gradient(135deg, #ff8a4c, #ff6f3c); color: #fff; }
.ld-cb-btn.ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.15); }

/* Starry Background & floating gifts */
.bg-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

.floating-gift {
  position: absolute;
  font-size: 1.8rem;
  animation: float 6s infinite ease-in-out;
  opacity: 0.12;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

/* --- RESPONSIVE SCALING FOR TABLET & MOBILE --- */
@media (max-width: 768px) {
  .gift-box-grid.three-boxes {
    gap: 15px;
    max-width: 100%;
    padding: 10px;
  }
  .gift-box-item {
    height: 250px;
    padding-bottom: 20px;
  }
  .gift-box-scale-wrapper {
    transform: scale(0.65);
    transform-origin: bottom center;
  }
  .ticket-scale-wrapper {
    transform: scale(0.65);
    transform-origin: center bottom;
    bottom: 20px;
  }
}

@media (max-width: 480px) {
  .gift-box-grid.three-boxes {
    gap: 8px;
    padding: 5px;
  }
  .gift-box-item {
    height: 220px;
    padding-bottom: 15px;
  }
  .gift-box-scale-wrapper {
    transform: scale(0.52);
    transform-origin: bottom center;
  }
  .ticket-scale-wrapper {
    transform: scale(0.52);
    transform-origin: center bottom;
    bottom: 15px;
  }
}

@media (max-width: 380px) {
  .gift-box-grid.three-boxes {
    gap: 4px;
    padding: 2px;
  }
  .gift-box-item {
    height: 196px;
  }
  .gift-box-scale-wrapper {
    transform: scale(0.46);
  }
  .ticket-scale-wrapper {
    transform: scale(0.46);
  }
  .game-instruction-banner p { font-size: 11px; }
}




/* ── Lucky Draw: Session Wallet Panel ───────────────────────── */
.tb-wallet-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #2dc275, #15803d);
  color: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 24px -10px rgba(45, 194, 117, 0.6);
}
.tb-wallet-info { display: flex; flex-direction: column; gap: 2px; }
.tb-wallet-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.9; }
.tb-wallet-amount { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.tb-wallet-amount small { font-size: 0.85rem; font-weight: 600; opacity: 0.85; }
.tb-btn-withdraw {
  background: #fff;
  color: #15803d;
  border: 0;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.tb-btn-withdraw:hover { transform: translateY(-2px); box-shadow: 0 6px 16px -6px rgba(0,0,0,0.35); }

@media (max-width: 480px) {
  .tb-wallet-panel { padding: 14px 16px; }
  .tb-wallet-amount { font-size: 1.5rem; }
  .tb-btn-withdraw { width: 100%; }
}


/* ════════════════════════════════════════════════════════════
   Lucky Box — Rich Prize Reveal Modal (matches reference design)
   ════════════════════════════════════════════════════════════ */
#resultModal.tb-modal-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(6, 8, 14, 0.85);
  backdrop-filter: blur(12px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.lb-prize-modal {
  width: 100%; max-width: 520px;
  max-height: 92vh; overflow-y: auto;
  background: linear-gradient(165deg, #0e1322 0%, #070912 100%);
  border-radius: 24px;
  color: #fff;
  animation: lbPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* Modal Glows by Tier */
.lb-prize-modal.glow-standard {
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.25), 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.lb-prize-modal.glow-vip {
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 50px rgba(251, 191, 36, 0.25), 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.lb-prize-modal.glow-super_vip {
  border: 1px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 50px rgba(239, 68, 68, 0.25), 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.lb-prize-modal.glow-lose {
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@keyframes lbPop { 0% { transform: scale(0.92) translateY(10px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }

.lb-prize-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lb-prize-modal__title { font-size: 19px; font-weight: 900; letter-spacing: 0.5px; text-shadow: 0 0 15px rgba(255,255,255,0.1); }
.lb-prize-modal__x { background: transparent; border: 0; color: rgba(255, 255, 255, 0.4); font-size: 28px; line-height: 1; cursor: pointer; transition: color 0.2s; }
.lb-prize-modal__x:hover { color: #fff; }

.lb-prize-modal__body { padding: 22px 24px; }
.lb-session-chip {
  text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px; padding: 6px 16px; width: fit-content; margin: 0 auto 20px;
  font-weight: 600;
}
.lb-session-chip strong { color: #2dc275; font-family: monospace; letter-spacing: 1px; font-weight: 800; }

/* Lose state */
.lb-lose {
  text-align: center; padding: 26px 16px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  margin: 10px 0;
}
.lb-lose__icon {
  font-size: 64px; line-height: 1; margin-bottom: 12px;
  animation: loseFloat 4s ease-in-out infinite;
}
@keyframes loseFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.05); }
}
.lb-lose h3 {
  font-size: 22px; font-weight: 850; color: #fff; margin: 0 0 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.lb-lose p {
  color: rgba(255, 255, 255, 0.7); font-size: 14.5px; line-height: 1.6; max-width: 380px; margin: 0 auto;
}

/* Prize card */
.lb-prize-card {
  background: linear-gradient(165deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.4) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 20px; padding: 26px 20px; text-align: center;
  position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.lb-prize-modal.glow-vip .lb-prize-card {
  background: linear-gradient(165deg, rgba(251, 191, 36, 0.08) 0%, rgba(15, 23, 42, 0.4) 100%);
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.lb-prize-modal.glow-super_vip .lb-prize-card {
  background: linear-gradient(165deg, rgba(239, 68, 68, 0.08) 0%, rgba(15, 23, 42, 0.4) 100%);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.lb-prize-card::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}
.lb-prize-card__icon {
  font-size: 64px; line-height: 1; margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.4));
  animation: giftWiggle 2.4s ease-in-out infinite;
}
.lb-prize-card__name {
  font-size: 24px; font-weight: 900; color: #fff;
  letter-spacing: -0.2px; text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.lb-prize-card__desc {
  font-size: 13.5px; color: rgba(255, 255, 255, 0.7); margin-top: 6px; line-height: 1.5;
}
.lb-prize-card__chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0 20px; }
.lb-chip {
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  display: inline-flex; align-items: center; justify-content: center;
}
.lb-chip.lvl-vip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
  color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}
.lb-chip.lvl-super_vip {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(185, 28, 28, 0.15));
  color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.lb-prize-card__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; margin: 20px 0 16px;
}
.lb-pc-field {
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px; padding: 12px 14px;
  transition: background 0.2s, border-color 0.2s;
}
.lb-pc-field:hover {
  background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1);
}
.lb-pc-label {
  display: block; font-size: 9px; font-weight: 800; letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5); text-transform: uppercase; margin-bottom: 4px;
}
.lb-pc-val { font-size: 14.5px; font-weight: 800; color: #fff; }
.lb-pc-chip {
  display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 11px; border-radius: 999px;
}
.lb-pc-chip.wait {
  background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}
.lb-pc-chip.success {
  background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.lb-claim-btn {
  width: 100%; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1e1b10;
  font-size: 15px; font-weight: 800; padding: 14px;
  box-shadow: 0 8px 20px -6px rgba(245, 158, 11, 0.5);
  transition: all 0.2s ease;
}
.lb-claim-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(245, 158, 11, 0.6);
}
.lb-claim-btn:active { transform: translateY(0); }
.lb-claim-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* Status steps - Modern tracking timeline */
.lb-steps {
  list-style: none; padding: 0; margin: 20px 0 0;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
}
.lb-steps::before {
  content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px;
  width: 2px; background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}
.lb-steps li {
  position: relative; padding-left: 32px; font-size: 13px;
  color: rgba(255, 255, 255, 0.5); line-height: 1.5;
  transition: color 0.3s;
}
.lb-steps li::before {
  content: ""; position: absolute; left: 6px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #0f172a; border: 2px solid rgba(255, 255, 255, 0.3);
  z-index: 2; transition: all 0.3s;
}
.lb-steps li.done { color: #fff; }
.lb-steps li.done::before {
  background: #10b981; border-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.lb-result-note { margin-top: 16px; border-radius: 14px; padding: 13px 16px; font-size: 13.5px; font-weight: 700; text-align: center; }
.lb-result-note.ok { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }
.lb-result-note.warn { background: rgba(245, 158, 11, 0.12); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.25); }

.lb-cskh-btn {
  width: 100%; margin-top: 14px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #10b981, #059669); color: #fff;
  font-size: 14px; font-weight: 700; padding: 13px; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
}
.lb-cskh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(16, 185, 129, 0.5);
}

.lb-prize-modal__footer { display: flex; gap: 10px; padding: 0 24px 16px; flex-wrap: wrap; }
.lb-foot-btn {
  flex: 1; min-width: 120px; border: 0; border-radius: 12px; cursor: pointer;
  font-size: 13px; font-weight: 700; padding: 12px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.2s ease;
}
.lb-foot-btn:hover { transform: translateY(-2px); }
.lb-foot-btn.blue {
  background: rgba(255, 255, 255, 0.07); color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.lb-foot-btn.blue:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.lb-foot-btn.green {
  background: linear-gradient(135deg, #10b981, #059669); color: #fff;
  box-shadow: 0 6px 15px -4px rgba(16, 185, 129, 0.4);
}
.lb-foot-btn.green:hover { box-shadow: 0 10px 20px -4px rgba(16, 185, 129, 0.5); }
.lb-thanks { text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.35); padding: 0 24px 20px; margin: 0; }

@media (max-width: 480px) {
  .lb-prize-card__grid { grid-template-columns: 1fr; }
  .lb-foot-btn { min-width: 100%; }
}

/* ════════════════════════════════════════════════════════════
   Lucky Box — Floating Wallet Panel (fixed top-right)
   ════════════════════════════════════════════════════════════ */
.lb-wallet {
  position: fixed;
  top: 136px;
  right: 24px;
  width: 280px;
  box-sizing: border-box;
  z-index: 800;
  background: linear-gradient(135deg, rgba(16, 23, 41, 0.8) 0%, rgba(30, 41, 59, 0.65) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 18px 20px;
  color: #fff;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 30px rgba(45, 194, 117, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(180%);
  animation: lbPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lb-wallet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.lb-wallet__title { font-size: 11px; font-weight: 850; letter-spacing: 0.1em; color: #2dc275; display: flex; align-items: center; gap: 6px; text-shadow: 0 0 10px rgba(45, 194, 117, 0.25); text-transform: uppercase; }
.lb-wallet__hint { font-size: 10px; color: rgba(255, 255, 255, 0.5); margin-top: 3px; font-weight: 500; }
.lb-wallet__actions { display: flex; gap: 8px; }
.lb-wallet__icon-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.lb-wallet__icon-btn:hover {
  background: #2dc275; color: #fff; border-color: #2dc275;
  box-shadow: 0 0 15px rgba(45, 194, 117, 0.5);
  transform: translateY(-2px);
}
.lb-wallet__amount {
  font-size: 2.1rem; font-weight: 900; line-height: 1.1; margin: 16px 0 6px;
  word-break: break-all; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  font-family: var(--font-mono), monospace; font-variant-numeric: tabular-nums;
}
.lb-wallet__amount small { font-size: 1rem; font-weight: 700; color: rgba(255, 255, 255, 0.65); margin-left: 2px; }
.lb-wallet__trust { margin-top: 12px; }
.lb-wallet__trust-row { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; color: rgba(255, 255, 255, 0.6); margin-bottom: 5px; letter-spacing: 0.06em; }
.lb-wallet__trust-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.lb-wallet__trust-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #059669);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 1024px) {
  .lb-wallet {
    position: static;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 20px;
    top: auto; right: auto;
  }
}

/* ════════════════════════════════════════════════════════════
   Custom Light Withdrawal Modal (Image 2 style)
   ════════════════════════════════════════════════════════════ */
.tb-modal-content.wd-light-modal {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15) !important;
  border-radius: 20px !important;
  font-family: var(--font-sans), sans-serif;
  max-height: 90vh !important;
  overflow-y: auto !important;
}
.tb-modal-content.wd-light-modal .tb-modal-body {
  padding: 24px 28px !important;
}
.tb-modal-content.wd-light-modal h2 {
  color: #0f172a !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  margin: 0 0 16px 0 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}
.tb-modal-content.wd-light-modal h2 .btnCloseX {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px 12px;
  margin: -8px -12px -8px 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tb-modal-content.wd-light-modal h2 .btnCloseX:hover {
  color: #475569;
}
.wd-subheader {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #475569;
  margin-bottom: 16px;
  font-weight: 500;
}
.wd-subheader strong {
  font-weight: 700;
}
.wd-history-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 20px;
  max-height: 150px;
  overflow-y: auto;
}
.wd-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.wd-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
  font-size: 12px;
}
.wd-history-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.wd-history-item .status-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 10px;
}
.wd-history-item .status-badge.pending {
  background: #fef3c7;
  color: #d97706;
}
.wd-history-item .status-badge.approved {
  background: #dcfce7;
  color: #15803d;
}
.wd-history-item .status-badge.rejected {
  background: #fee2e2;
  color: #b91c1c;
}
.tb-modal-content.wd-light-modal .form-group {
  margin-bottom: 16px !important;
}
.tb-modal-content.wd-light-modal .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}
.tb-modal-content.wd-light-modal .form-group label span {
  color: #ef4444;
}
.tb-modal-content.wd-light-modal .form-input,
.tb-modal-content.wd-light-modal .form-select {
  width: 100%;
  padding: 10px 14px;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: all 0.2s;
}
.tb-modal-content.wd-light-modal .form-input:focus,
.tb-modal-content.wd-light-modal .form-select:focus {
  border-color: #3b82f6 !important;
  outline: none;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.wd-quick-pct {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.wd-quick-btn {
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  transition: all 0.15s;
}
.wd-quick-btn:hover {
  background: #e2e8f0;
  color: #1f2937;
}
.tb-modal-content.wd-light-modal .tb-modal-actions {
  display: flex !important;
  gap: 12px !important;
  margin-top: 24px !important;
}
.tb-modal-content.wd-light-modal .tb-btn-modal.primary {
  flex: 1;
  background: #3b82f6 !important;
  border: none !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 12px 18px !important;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.tb-modal-content.wd-light-modal .tb-btn-modal.primary:hover {
  background: #2563eb !important;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}
.tb-modal-content.wd-light-modal .tb-btn-modal.outline {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 12px 18px !important;
  cursor: pointer;
  transition: all 0.2s;
}
.tb-modal-content.wd-light-modal .tb-btn-modal.outline:hover {
  background: #cbd5e1 !important;
  color: #1e293b !important;
}


/* ════════════════════════════════════════════════════════════
   Lucky Box — Customer floating toast (approve/reject notices)
   ════════════════════════════════════════════════════════════ */
.lb-toast-host {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
}
.lb-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(165deg, #1e2638, #141a28);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left-width: 4px;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
  animation: lbToastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lb-toast.hide { animation: lbToastOut 0.4s ease forwards; }
@keyframes lbToastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes lbToastOut { to { transform: translateY(20px); opacity: 0; } }
.lb-toast--success { border-left-color: #2dc275; }
.lb-toast--error { border-left-color: #ef4444; }
.lb-toast--info { border-left-color: #3b82f6; }
.lb-toast__icon { font-size: 22px; line-height: 1.2; }
.lb-toast__body { flex: 1; }
.lb-toast__title { font-weight: 800; font-size: 14px; margin-bottom: 2px; }
.lb-toast--success .lb-toast__title { color: #4ade80; }
.lb-toast--error .lb-toast__title { color: #f87171; }
.lb-toast__text { font-size: 12.5px; color: rgba(255, 255, 255, 0.72); line-height: 1.45; }
.lb-toast__close { background: transparent; border: 0; color: rgba(255, 255, 255, 0.5); font-size: 20px; line-height: 1; cursor: pointer; }
.lb-toast__close:hover { color: #fff; }


/* ════════════════════════════════════════════════════════════
   Lucky Box — Social proof popups (bottom-left "someone just won")
   ════════════════════════════════════════════════════════════ */
.lb-proof-host {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 9990;
  width: calc(100% - 36px);
  max-width: 320px;
  pointer-events: none;
}
.lb-proof {
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.97);
  color: #1e2638;
  border-radius: 16px;
  padding: 12px 16px 12px 12px;
  box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.45);
  animation: lbProofIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lb-proof.hide { animation: lbProofOut 0.45s ease forwards; }
@keyframes lbProofIn { from { transform: translateX(-110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes lbProofOut { to { transform: translateX(-110%); opacity: 0; } }
.lb-proof__avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2dc275;
  background: #eef2f7;
}
.lb-proof__body { flex: 1; min-width: 0; }
.lb-proof__title { font-weight: 800; font-size: 14px; margin-bottom: 2px; color: #16213e; }
.lb-proof__text { font-size: 12.5px; color: #475569; line-height: 1.4; }
.lb-proof__text b { color: #ff6f3c; }
.lb-proof__time { font-size: 11px; color: #94a3b8; margin-top: 3px; font-style: italic; }
@media (max-width: 480px) {
  .lb-proof-host { max-width: 260px; left: 10px; bottom: 88px; }
  .lb-proof { padding: 10px 12px 10px 10px; }
  .lb-proof__avatar { width: 38px; height: 38px; }
}


/* ════════════════════════════════════════════════════════════
   Performance: respect reduced-motion + tone down GPU-heavy effects
   ════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .bg-stars,
  .tb-lucky-card__giftrow span,
  .lb-prize-card__icon,
  .lb-lose__icon { animation: none !important; }
  .tb-lucky-card::before { display: none !important; }
  .lb-proof { animation: none !important; }
}


/* ════════════════════════════════════════════════════════════
   Search / Category empty state (home focused grid)
   ════════════════════════════════════════════════════════════ */
.tb-search-empty {
  text-align: center;
  padding: 48px 20px 56px;
  max-width: 480px;
  margin: 0 auto;
}
.tb-search-empty__icon {
  font-size: 3rem;
  color: var(--color-text-muted, #94a3b8);
  margin-bottom: 14px;
}
.tb-search-empty h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text, #16213e);
  margin-bottom: 8px;
}
.tb-search-empty p {
  color: var(--color-text-secondary, #475569);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
}
.tb-search-empty .tb-btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary, #2dc275);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.tb-search-empty .tb-btn-cta:hover { filter: brightness(0.95); }


/* ════════════════════════════════════════════════════════════
   MOBILE POLISH PASS — home, detail, lucky-draw (<= 768px / 480px)
   Goal: nothing important hidden, 2-up grids, tighter spacing,
   tap targets >= 44px, no wasted vertical space.
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Tighter section vertical rhythm */
  .tb-section { padding: var(--space-4) 0; }
  .tb-section-header { margin-bottom: var(--space-3); }
  .tb-section-header h2 { font-size: 18px; }

  /* Event grids: show 2 cards per row on phones (was 1 full-width) */
  .tb-event-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
  .tb-event-card__body { padding: 10px 12px; }
  .tb-event-card__body h3 {
    font-size: 13px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .tb-event-card__price { font-size: 13px; }
  .tb-event-card__meta-row { font-size: 11px; }

  /* Featured Stars: smaller circles so more fit per screen */
  .tb-artists-container { gap: var(--space-4); }
  .tb-artist-card { min-width: 84px; }
  .tb-artist-avatar { width: 72px; height: 72px; }
  .tb-artist-name { font-size: 12px; max-width: 84px; }

  /* Special posters: smaller cards */
  .tb-special-card { flex-basis: 150px; }

  /* Trending: 2-up grid, smaller outlined numbers */
  .tb-trending-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .tb-trending-number {
    font-size: 52px;
    -webkit-text-stroke-width: 2px;
  }

  /* Resale: stack banner above cards, 2-up card grid */
  .tb-resale-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .tb-resale-banner { min-height: 160px; }

  /* Partner strips: keep aspect but allow shorter */
  .tb-info-row { margin: var(--space-5) 0; }

  /* Tabs header: allow wrap so "Xem thêm" doesn't push off-screen */
  .tb-tabs-header { gap: var(--space-4); flex-wrap: wrap; }
  .tb-tab-btn { font-size: 15px; }
}

@media (max-width: 380px) {
  /* Very small phones: single column but compact */
  .tb-event-grid { grid-template-columns: 1fr; }
  .tb-resale-grid { grid-template-columns: 1fr; }
}

/* ── Event detail page on mobile ── */
@media (max-width: 768px) {
  .tb-detail-page { padding: var(--space-4) 0 92px; }
  .tb-detail-main { padding: var(--space-4); }
  .tb-detail-hero { margin-bottom: var(--space-4); }
  .tb-detail-hero__title { font-size: 20px; }
  .tb-detail-section { margin-bottom: var(--space-5); }
  .tb-detail-section h2 { font-size: 16px; }
  /* Long event descriptions / embedded images must not overflow */
  .tb-detail-description img,
  .tb-detail-description iframe,
  .tb-detail-description table { max-width: 100%; height: auto; }
  .tb-detail-description { overflow-wrap: anywhere; }
}

/* ── Lucky-draw (open gift box) page on mobile ── */
@media (max-width: 768px) {
  .tb-lucky-draw-page { padding: var(--space-5) 0 var(--space-10); }
  .tb-lucky-header { margin-bottom: var(--space-5); }
  .tb-lucky-header h1 { font-size: 26px; }
  .tb-lucky-header p { font-size: 14px; }

  /* The gift-box stage was over-tall with big empty space; tighten it.
     Boxes are scaled down, so the stage height can shrink a lot. */
  .gift-box-grid.three-boxes {
    gap: 6px !important;
    padding: 12px 8px 16px !important;
  }
  .gift-box-item {
    height: 200px !important;
    padding-bottom: 10px !important;
  }
  .gift-box-scale-wrapper {
    width: 105px !important;
    height: 105px !important;
    transform: scale(0.7) !important;
    transform-origin: bottom center !important;
  }
  .ticket-scale-wrapper {
    width: 170px !important;
    height: 72px !important;
    margin-left: -85px !important;
    transform: scale(0.65) !important;
    transform-origin: center bottom !important;
    bottom: 60px !important;
  }
  .ticket-reward {
    padding: 6px 8px !important;
  }
  .ticket-reward .t-info {
    display: none !important;
  }
  .ticket-reward .t-subtitle {
    font-size: 8px !important;
    margin-top: 2px !important;
  }
  .ticket-reward .t-title {
    font-size: 10px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    word-break: break-word !important;
  }

  /* Wallet panel: full width card, comfortable text */
  .lb-wallet { padding: 14px 16px; }
  .lb-wallet__amount { font-size: 1.6rem; }

  /* Code input card padding trim */
  .tb-lucky-card { padding: 22px 18px !important; }
}

@media (max-width: 480px) {
  .gift-box-grid.three-boxes {
    gap: 4px !important;
    padding: 10px 4px 14px !important;
  }
  .gift-box-item { height: 172px !important; }
  .gift-box-scale-wrapper {
    width: 84px !important;
    height: 84px !important;
    transform: scale(0.56) !important;
    transform-origin: bottom center !important;
  }
  .ticket-scale-wrapper {
    width: 140px !important;
    height: 60px !important;
    margin-left: -70px !important;
    transform: scale(0.56) !important;
    transform-origin: center bottom !important;
    bottom: 50px !important;
  }

  /* Prize reveal modal + withdrawal modal: fit small screens */
  .lb-prize-modal,
  .tb-modal-dialog { width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important; }
  .lb-prize-modal__footer { flex-wrap: wrap; }
  .lb-foot-btn { flex: 1 1 100%; }
}

@media (max-width: 360px) {
  .gift-box-item { height: 156px !important; }
  .gift-box-scale-wrapper {
    width: 75px !important;
    height: 75px !important;
    transform: scale(0.5) !important;
    transform-origin: bottom center !important;
  }
  .ticket-scale-wrapper {
    width: 130px !important;
    height: 55px !important;
    margin-left: -65px !important;
    transform: scale(0.5) !important;
    transform-origin: center bottom !important;
    bottom: 45px !important;
  }
}
