/* ==================== BACK BUTTON ==================== */
.back-btn {
  transition: color 0.2s;
}
.back-btn:hover {
  color: #c5000f !important;
}

/* ==================== BET MODAL ==================== */
.bet-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 42, 40, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bet-modal-content {
  background-color: #f4ecd7;
  border-radius: 0.5rem;
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.bet-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: #000;
  cursor: pointer;
  line-height: 1;
}

.bet-input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 2px solid #000000;
  border-radius: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  color: #000000;
  background: #f4ecd7;
  box-sizing: border-box;
}

.bet-input:focus {
  outline: none;
  border-color: #9a7e48;
  box-shadow: 0 0 0 3px rgba(154, 126, 72, 0.3);
}

.bet-legal-scroll {
  max-height: 150px;
  overflow-y: auto;
  margin-top:1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid #002a28;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #000;
  white-space: pre-line;
}

.bet-legal-scroll p {
  margin: 0 0 0.5rem 0;
}

.bet-legal-scroll p:last-child {
  margin-bottom: 0;
}


.bet-submit-btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.bet-submit-btn:hover {
  background-color: #640606;
}

.bet-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== NOMINEE GRID ==================== */
#nominee-grid {
  margin: 10em auto;
  width: 90%;
  max-width: 960px;
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 1280px) {
  #nominee-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1400px !important;
  }
}
@media (max-width: 560px) {
  #nominee-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* --- Nominee Card --- */
.nominee-card {
  background-color: #f4ecd7;
  container-type: inline-size;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.nominee-card mux-player {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
}
.nominee-card-body {
  padding: 4cqw;
  margin: 1.1em 0;
}
.nominee-card-title {
  color: #000;
  font-size: 6cqw;
  line-height: 1;
  height: 16cqw;
  margin-bottom: 2cqw;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nominee-card-detail {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 4cqw;
  line-height: 1.4;
  color: #000;
}
.nominee-card-detail:last-of-type {
  margin-bottom: 6cqw;
}
.bet-btn {
  display: inline-block;
  padding: 2cqw 6cqw;
  background-color: #000;
  color: #fff;
  font-size: 4cqw;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 0.2s;
}
.bet-btn:hover {
  background-color: #c5000f !important;
}
.bet-count {
  position: absolute;
  bottom: 2cqw;
  right: 2cqw;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 3.5cqw;
  color: #000;
}

.footer-bold {
  font-weight: bold;
  text-transform: uppercase;
}

/* ==================== CUSTOM FONTS ==================== */
@font-face {
  font-family: 'Optician Sans';
  src: url('../fonts/Optician-Sans.woff2') format('woff2'),
       url('../fonts/Optician-Sans.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ==================== BASE STYLES ==================== */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: #9a7e48;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

main {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* ==================== LAYOUT - BANDS ==================== */
.band {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100vw;
}

.band-inner {
  position: relative;
  z-index: 1;
}

/* ==================== BAND 1 ==================== */
#band-1 {
  min-height: 0;
  height: auto;
  background-image: url('../img/greenBg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#band-1 .band-inner {
  max-width: 33vw;
}

#band-1 .band-inner img {
  width: 80% !important;
  max-width: none !important;
  height: auto;
}

/* ==================== BAND 2 ==================== */
#band-2 {
  min-height: 0;
  height: auto;
}

/* ==================== BAND 3 ==================== */
#band-3 {
  background-image: url('../img/cubesSm.jpg');
  background-size: 100vw auto;
  background-repeat: no-repeat;
  background-position-y: 0%;
  position: relative;
}

@media (max-width: 768px) {
  #band-3 {
    background-position-y: 30%;
  }
}

#band-3 .band-inner {
  padding-top: 2vw;
}

#band-3 .overlay-content {
  position: absolute;
  bottom: 35%;
  left: 0;
  right: 5%;
  transform: translateY(50%);
  z-index: 10;
}

@media (max-width: 768px) {
  #band-3 .overlay-content {
    display: none;
  }
}

#band-five-inner-div {
  padding-top: 5vw;
}

/* Card grid container needs wider width to show columns */
#card-grid-container {
  max-width: 60vw !important;
}

@media (max-width: 768px) {
  #card-grid-container {
    max-width: 70vw !important;
  }
}

#card-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 2rem;
  row-gap: 2rem;
  width: 100%;
}

@media (max-width: 768px) {
  #card-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.5rem;
    row-gap: 1.5rem;
  }
}

/* ==================== SHARED BAND CONTENT STYLES ==================== */
.band-inner {
  max-width: 50vw !important;
}

/* Mobile: Make band-inner 1/3 larger (66.67vw) */
@media (max-width: 768px) {
  .band-inner {
    max-width: 90vw !important;
  }
}

h2 {
  font-family: "montecatini-pro-stretto", sans-serif !important;
}

.bet-modal-content h2 {
  font-family: inherit !important;
}

.band-inner h2 {
  font-size: 4.25vw !important;
  line-height: 1 !important;
  margin-bottom: 1vw !important;
}

@media (max-width: 768px) {
  .band-inner h2 {
    font-size: 8.25vw !important;
    line-height: 1 !important;
    margin-bottom: 1vw !important;
  }
}

.band-inner p {
  font-size: 1.2vw !important;
  line-height: 1.5 !important;
}

@media (max-width: 768px) {
  .band-inner p {
    font-size: 3vw !important;
    line-height: 1.6 !important;
    margin-bottom: 1vw !important;
  }
}

.band-inner h3 {
  font-size: 1.2vw !important;
  line-height: 1.5 !important;
  font-family: "Optician Sans", sans-serif;
  text-align: center;
  margin-top: 5vw;
}

@media (max-width: 768px) {
  .band-inner h3 {
    font-size: 3vw !important;
    line-height: 2 !important;
    margin-bottom: 1vw !important;
  }
}

@media (max-width: 768px) {
  .canvas-overlay-text {
    font-size: 2vw !important;
    line-height: 1 !important;
    margin-bottom: 1vw !important;
    width: 100%;
  }
}

.diamond-content a,
.band-inner a,
.rootButton {
  font-size: 1.2vw !important;
  padding: 0.8vw 2vw !important;
  font-family: "Optician Sans", sans-serif !important;
}

/* Mobile: Scale band-inner button by 2/3 */
@media (max-width: 768px) {
  .diamond-content a,
  .band-inner a,
  .rootButton {
    font-size: 2vw !important;
    padding: 1.33vw 3.33vw !important;
  }
}

/* ==================== IMAGE CONTAINERS ==================== */
.diagonal-card-container {
  position: relative;
  width: 100vw;
  height: auto;
  z-index: 1;
  background-color: #9a7e48;
  aspect-ratio: 1514 / 949;
  min-height: calc(100vw * 949 / 1514);
}

.diagonal-card-img {
  display: block;
  width: 100%;
  height: auto;
  z-index: 1;
}

.green-table-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: auto;
  z-index: 0;
}

.red-queen-container {
  position: relative;
  width: 100vw;
  height: auto;
  z-index: 1;
}

.red-queen-img {
  display: block;
  width: 100%;
  height: auto;
}

.money-container {
  position: relative;
  width: 100vw;
  height: auto;
  margin: 0;
  padding: 0;
  line-height: 0;
  display: block;
}

.money-container img {
  display: block;
  width: 100%;
  height: auto;
}

/* ==================== CANVAS ANIMATIONS ==================== */
.canvas-container {
  position: relative;
  width: 100vw;
  height: calc(100vw * 840 / 1515);
  min-height: calc(100vw * 840 / 1515);
  margin: 0;
  flex-shrink: 0;
  background-color: #9a7e48;
}

.canvas-container-2 {
  height: calc(100vw * 2515 / 1515);
  min-height: calc(100vw * 2515 / 1515);
}

#animation_container,
#animation_container2 {
  background-color: transparent;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

#animation_container {
  min-height: calc(100vw * 840 / 1515);
}

#animation_container2 {
  min-height: calc(100vw * 2515 / 1515);
}

#canvas,
#canvas2 {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  image-rendering: auto;
}

#dom_overlay_container,
#dom_overlay_container2 {
  pointer-events: none;
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  display: block;
}

.canvas-overlay-text {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Optician Sans", sans-serif;
  font-size: 1.5vw;
  letter-spacing: 0.3em;
  line-height: 1.5;
  color: #f4ecd7;
  text-align: center;
  z-index: 10;
  margin: 0;
  pointer-events: auto;
}

/* ==================== COMPONENTS ==================== */
/* Rectangle grid with 7:3 aspect ratio */
.rectangle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2vw;
  width: 100%;
  margin-bottom: 10vw;
}

@media (max-width: 767px) {
  .rectangle-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4vw;
    padding: 0 5vw;
  }
}

@media (min-width: 768px) {
  .rectangle-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 3vw;
  }
}

@media (min-width: 1024px) {
  .rectangle-grid {
    gap: 4vw;
  }
}

.rectangle-item {
  position: relative;
  width: 100%;
  padding-bottom: 42.857%;
  /* 7:3 aspect ratio */
  background-color: #c5000f;
  border: 0.15vw solid #640606;
  opacity: 30%;
  border-radius: 1vw;
}

@media (max-width: 767px) {
  .rectangle-item {
    border-width: 0.4vw;
  }
}

@media (min-width: 768px) {
  .rectangle-item {
    border-width: 0.2vw;
  }
}

@media (min-width: 1024px) {
  .rectangle-item {
    border-width: 0.25vw;
    max-width: none;
  }
}

.rectangle-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rectangle-content img {
  width: 20%;
  height: auto;
}

.rectangle-content-logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rectangle-content-logo img {
  width: 80%;
  height: auto;
}

.rectangle-item-rsp {
  border: none !important;
  opacity: 100% !important;
}

/* Decorative label component */
.deco-label {
  position: relative;
  display: inline-block;
  width: 10vw;
  min-width: 150px;
}

.deco-label-bg {
  width: 100%;
  height: auto;
  display: block;
}

.deco-label-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Optician Sans", sans-serif;
  text-align: center;
  width: max-content;
  min-width: 100%;
  font-size: 1.5vw;
  letter-spacing: 0.3em;
  font-weight: 100;
  color: #f4ecd7;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .deco-label {
    max-width: 30vw;
  }

  .deco-label-text {
    font-size: 3.5vw;
  }
}

/* Ticker tape animation */
.ticker-wrapper {
  width: 100vw;
  height: 3vw;
  overflow: hidden;
  position: relative;
  background-color: #f4ecd7;
}

.ticker {
  display: flex;
  width: max-content;
  height: 100%;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ticker img {
  height: 100%;
  width: auto;
  display: block;
}

/* Social media buttons */
.social-media-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2vw;
  margin-top: 5vw;
}

@media (max-width: 768px) {
  .social-media-buttons {
    gap: 5vw;
  }
}

.social-link {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-link:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.social-icon {
  width: 3vw;
  min-width: 40px;
  max-width: 60px;
  height: auto;
  display: block;
}

/* ==================== CARD FLIP ANIMATION ==================== */
.card-flip-container {
  perspective: 1500px;
  cursor: pointer;
  overflow: visible;
  max-width: 280px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .card-flip-container {
    max-width: 150px;
  }
}

.card-flip-container:focus {
  outline: 2px solid #f4ecd7;
  outline-offset: 4px;
  border-radius: 4px;
}

.card-flip-inner {
  position: relative;
  width: 100%;
  height: auto;
  transform-style: preserve-3d;
  overflow: visible;
  will-change: transform;
  transition: transform 0.6s ease;
}

.card-flip-front,
.card-flip-back {
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-flip-front {
  position: relative;
}

.card-flip-back {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateY(180deg);
}

.card-flip-front img,
.card-flip-back img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hover flip for devices with fine pointer (mouse) */
@media (hover: hover) and (pointer: fine) {
  .card-flip-container:hover .card-flip-inner,
  .card-flip-container:focus .card-flip-inner {
    transform: rotateY(180deg);
  }
}

/* Tap/click flip state for touch devices */
.card-flip-container.is-flipped .card-flip-inner {
  transform: rotateY(180deg);
}

/* Reduced motion: disable 3D flip, use opacity swap instead */
@media (prefers-reduced-motion: reduce) {
  .card-flip-inner {
    transition: none;
  }

  .card-flip-front,
  .card-flip-back {
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
    transition: opacity 0.3s ease;
  }

  .card-flip-back {
    transform: none;
    opacity: 0;
  }

  .card-flip-front {
    opacity: 1;
  }

  /* Hover state for reduced motion */
  @media (hover: hover) and (pointer: fine) {
    .card-flip-container:hover .card-flip-front,
    .card-flip-container:focus .card-flip-front {
      opacity: 0;
    }

    .card-flip-container:hover .card-flip-back,
    .card-flip-container:focus .card-flip-back {
      opacity: 1;
    }
  }

  /* Tap/click state for reduced motion */
  .card-flip-container.is-flipped .card-flip-inner {
    transform: none;
  }

  .card-flip-container.is-flipped .card-flip-front {
    opacity: 0;
  }

  .card-flip-container.is-flipped .card-flip-back {
    opacity: 1;
  }
}

/* ==================== CARD BACK CONTENT ==================== */
.card-back__content {
  position: absolute;
  inset: 0;
  padding: 8cqw 16cqw 10cqw 16cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Portrait block */
/* Reference: 774px x 1092px card, image 346x425 at position 171,86 */
.card-back__portrait {
  position: absolute;
  left: 22.1cqw;
  top: 11.1cqw;
  width: 44.7cqw;
  aspect-ratio: 346 / 425;
  border-radius: 4cqw;
  overflow: hidden;
  margin: 0;
}

.card-back__portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 4cqw;
}

/* Bio text */
/* Positioned below the portrait, left-aligned with photo */
.card-back__bio {
  position: absolute;
  left: 22.1cqw;
  top: 69cqw;
  font-family: Arial, sans-serif;
  font-weight: 400;
  color: #000000;
  font-size: 3.6cqw;
  line-height: 1.18;
  white-space: pre-line;
  margin: 0;
}

/* Vertical names */
.card-back__name {
  position: absolute;
  color: #f21a27;
  letter-spacing: 0.04em;
  font-size: 5.2cqw;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
}

.card-back__name--left {
  left: 6cqw;
  top: 32cqw;
  transform: rotate(-90deg);
  transform-origin: left top;
}

.card-back__name--right {
  right: 6cqw;
  top: 74cqw;
  transform: rotate(90deg);
  transform-origin: right top;
}

/* Pin icons */
.card-back__pin {
  position: absolute;
  width: 14cqw;
  height: auto;
  pointer-events: none;
}

.card-back__pin img {
  width: 100%;
  height: auto;
  display: block;
}

.card-back__pin--tl {
  left: 8cqw;
  top: 7cqw;
}

.card-back__pin--br {
  right: 8cqw;
  bottom: 7cqw;
  transform: rotate(180deg);
  transform-origin: center;
}

/* ==================== DIAMOND CONTAINER ==================== */
.diamond-container {
  position: relative;
  width: 60vw;
  max-width: 60vw;
  margin: 0 auto;
  margin-top: -40vw;
  background-image: url('../img/diamondCream.svg');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  min-height: 60vw;
  max-height: 60vw;
  aspect-ratio: 1 / 1;
  contain: layout size;
  overflow: visible;
}

@media (max-width: 768px) {
  .diamond-container {
    width: 100vw;
    max-width: 1000vw;
    min-height: 100vw;
    max-height: 100vw;
    background-size: contain;
  }
}

.diamond-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: 0 7.2vw;
}

.diamond-container .pin-icon {
  width: 3vw;
  height: auto;
  margin-bottom: 0.5vw;
}

@media (max-width: 768px) {
  .diamond-container .pin-icon {
    width: 4vw;
    margin-bottom: 1.5vw;
  }
}

.diamond-container h2 {
  font-size: 4.25vw !important;
  line-height: 1.2em !important;
  margin-bottom: 1vw !important;
  margin-top: 0 !important;
  font-family: "montecatini-pro-stretto", sans-serif !important;
}

@media (max-width: 768px) {
  .diamond-container h2 {
    font-size: 6.25vw !important;
  }
}

.diamond-container p {
  font-size: 1.2vw !important;
  line-height: 1.5 !important;
  margin-bottom: 1.5vw !important;
}

@media (max-width: 768px) {
  .diamond-container p {
    font-size: 2vw !important;
    line-height: 1.5 !important;
  }
}

/* Desktop/Mobile visibility toggles */
.mobile-only {
  display: none;
}

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

  .mobile-only {
    display: block !important;
  }
}

/* ADFED link styling */
.adfed-link {
  color: inherit;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.adfed-link:hover {
  color: #c5000f;
}
