@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a1a1a;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
}

/* ─── Full-screen wrapper ─────────────────── */
.viewport {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #1a1a1a;
  position: relative;
}

/* ─── Scaled 1920×1080 canvas ─────────────── */
.canvas {
  position: absolute;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  display: flex;
  flex-direction: column;
  background: #fff;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.header {
  height: 68px;
  flex-shrink: 0;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 36px 0 28px;
  gap: 22px;
  border-bottom: 1.5px solid #f0f0f0;
}

/* ─── BNI Logo ────────────────────────────── */
.bni-logo {
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.bni-logo img {
  height: 100%;
  width: auto;
  display: block;
}

/* ─── Header separator ────────────────────── */
.header__separator {
  width: 1.5px;
  height: 40px;
  background: #e0e0e0;
}

/* ─── Breadcrumb ──────────────────────────── */
.header__breadcrumb {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header__breadcrumb span {
  color: #E30613;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  text-align: center;
}

/* ─── Timer ───────────────────────────────── */
.header__timer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__timer svg {
  width: 26px;
  height: 26px;
  color: #E30613;
  stroke: #E30613;
}

.header__timer-value {
  color: #E30613;
  font-size: 34px;
  font-weight: 600;
  min-width: 48px;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}

/* ══════════════════════════════════════════════
   HERO IMAGE
══════════════════════════════════════════════ */
.hero {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 30%;
  display: block;
}

/* ══════════════════════════════════════════════
   BOTTOM SECTION
══════════════════════════════════════════════ */
.bottom {
  height: 300px;
  flex-shrink: 0;
  display: flex;
  border-top: 4px solid #E30613;
  background: #fff;
}

/* ─── LEFT PANEL: Member Info ─────────────── */
.member-info {
  width: 50%;
  flex-shrink: 0;
  display: flex;
  border-right: 1.5px solid #e8e8e8;
  overflow: hidden;
  background: #E30613;
  padding: 0 .25rem .25rem;
}

/* Portrait Photo 6x4 aspect ratio area */
.member-info__photo {
  width: 225px;
  /* 3:4 Ratio based on 300px height */
  flex-shrink: 0;
  overflow: hidden;
  background: #d30511;
}

.member-info__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.member-info__photo img:not([src]),
.member-info__photo img[src=""] {
  visibility: hidden;
}

.member-info__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}

/* Text Content */
.member-info__content {
  flex: 1;
  padding: 24px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  color: #fff;
}

/* Top row: label + number */
.member-info__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
}

.member-info__label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding-top: 6px;
}

.member-info__number {
  font-size: 40px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.15);
  line-height: 0.85;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}

/* Member Name */
.member-info__name {
  font-size: 36px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 14px;
  transition: all 0.25s ease;
}

/* Detail rows */
.member-info__details {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.member-info__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-info__row--address {
  align-items: flex-start;
}

.member-info__icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-info__icon svg {
  width: 15px;
  height: 15px;
  color: #E30613;
  stroke: #E30613;
}

.member-info__row--address .member-info__icon {
  margin-top: 0;
}

.member-info__company {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

.member-info__address {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

.member-info__phone {
  font-size: 15px;
  color: #ffffff;
}

.member-info__website {
  font-size: 14px;
  color: #ffffff;
}

/* ─── RIGHT PANEL: Member List ────────────── */
.member-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* List header */
.member-list__header {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 14px;
  border-bottom: 1.5px solid #f0f0f0;
}

.member-list__title {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  color: #111;
}

/* Quay số button */
.btn-quayso {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #E30613;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background 0.2s;
  flex-shrink: 0;
  font-family: inherit;
}

.btn-quayso:hover {
  background: #c00510;
}

.btn-quayso--spinning {
  background: #cc2222;
  cursor: default;
}

.btn-quayso--spinning:hover {
  background: #cc2222;
}

.btn-quayso svg {
  width: 15px;
  height: 15px;
}

/* Thành viên dropdown */
.btn-dropdown {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid #ccc;
  border-radius: 5px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

.btn-dropdown svg {
  width: 14px;
  height: 14px;
  stroke: #555;
}

/* Scrollable list */
.member-list__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 28px 16px;
  scrollbar-width: thin;
  scrollbar-color: #E30613 #f5f5f5;
}

.member-list__scroll::-webkit-scrollbar {
  width: 6px;
}

.member-list__scroll::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.member-list__scroll::-webkit-scrollbar-thumb {
  background: #E30613;
  border-radius: 3px;
}

/* Grid */
.member-list__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  row-gap: 0;
}

/* Member item */
.member-item {
  padding: 9px 4px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  transition: background 0.15s;
  border-radius: 3px;
  background: transparent;
  user-select: none;
}

.member-item:hover {
  background: #fafafa;
}

.member-item__text {
  font-size: 14.5px;
  color: #333;
  font-weight: 400;
  line-height: 1.45;
}

.member-item__id {
  color: #444;
  margin-right: 2px;
}

/* Active member item */
.member-item--active .member-item__text {
  color: #E30613;
  font-weight: 600;
}

/* ─── Search Box ───────────────────────────── */
.search-container {
  position: relative;
  width: 280px;
  display: flex;
  align-items: center;
}

.search-container svg {
  position: absolute;
  left: 10px;
  color: #888;
  pointer-events: none;
}

#member-search {
  width: 100%;
  padding: 11px 12px 11px 34px;
  border-radius: 6px;
  border: 1.5px solid #eee;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

#member-search:focus {
  border-color: #E30613;
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

/* ─── Dropdown ─────────────────────────────── */
.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: #f9f9f9;
  min-width: 140px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 100;
  border-radius: 5px;
  overflow: hidden;
}

.dropdown-content a {
  color: #333;
  padding: 10px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown-container:hover .dropdown-content {
  display: block;
}

/* ─── Lucky Draw Button ────────────────────── */
.btn-lucky-draw {
  background: white;
  border: 1.5px solid #eee;
  border-radius: 6px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #E30613;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-lucky-draw:hover {
  border-color: #E30613;
  background: rgba(227, 6, 19, 0.05);
}

/* ─── Wheel Modal ──────────────────────────── */
.wheel-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.3s;
}

.wheel-modal.active {
  display: flex;
}

.wheel-modal__content {
  position: relative;
  background: #E30613;
  /* Full Red Background */
  padding: 60px;
  border-radius: 0;
  /* Square corners */
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  /* border: 10px solid #fff; */
  width: 1000px;
}



.wheel-modal__close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
}

.wheel-modal__title {
  font-size: 51px;
  font-weight: 600;
  /* Reduced from 900 */
  color: #fff;
  margin: 0 0 40px;
  /* letter-spacing: 8px; */
  text-transform: uppercase;
  text-align: center;
}




.wheel-container {
  position: relative;
  width: 850px;
  height: 400px;
  background: #fff;
  /* White background for the ticker area */
  border: 0;
  border-radius: 0;
  overflow: hidden;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}


.ticker-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.ticker-list {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Highlight Bar */
.ticker-highlight {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 100px;
  background: rgba(227, 6, 19, 0.1);
  border-top: 3px solid #E30613;
  border-bottom: 3px solid #E30613;
  pointer-events: none;
  z-index: 5;
}

.ticker-item {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 500;
  /* Reduced from 700 */
  color: #ccc;
  white-space: nowrap;
  width: 100%;
  transition: all 0.1s;
}

.ticker-item--active {
  color: #E30613;
  font-size: 56px;
  font-weight: 600;
  /* Reduced from 900 */
}



.ticker-pointer {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #E30613;
  z-index: 10;
  font-size: 40px;
}


.ticker-pointer--right {
  left: auto;
  right: 20px;
}

.btn-spin {
  margin-top: 40px;
  padding: 20px 100px;
  background: #fff;
  color: #E30613;
  border: none;
  border-radius: 0;
  /* Square Button */
  font-size: 32px;
  font-weight: 600;
  /* Reduced from 900 */
  cursor: pointer;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  transition: all 0.1s;
}


.btn-spin:active {
  transform: translateY(5px);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2);
}


.winner-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 30;
  border-radius: 0;
  text-align: center;
  padding: 40px;
  border: 10px solid #E30613;
}

.winner-title {
  font-size: 32px;
  color: #666;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-weight: 500;
}

.winner-photo {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #E30613;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.winner-name {
  font-size: 42px;
  font-weight: 600;
  color: #E30613;
  margin-bottom: 15px;
  line-height: 1.1;
}

.winner-business {
  font-size: 20px;
  color: #333;
  font-weight: 500;
  margin-bottom: 10px;
  max-width: 800px;
}

.winner-phone {
  font-size: 24px;
  color: #999;
  margin-bottom: 40px;
}

.btn-winner-confirm {
  background: #E30613;
  color: white;
  border: none;
  padding: 15px 60px;
  border-radius: 0;
  font-size: 24px;
  font-weight: 600;
  /* Reduced from 800 */
  cursor: pointer;
  transition: transform 0.1s;
}



.btn-winner-confirm:hover {
  transform: scale(1.05);
}

/* ─── Fallback image error ────────────────── */
.img-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  width: 100%;
  height: 100%;
}