/* =========================================================
   NAMTANFILM FANCON — INTERACTIVE SEAT CLAIM
   style.css
========================================================= */

:root {
  --primary-teal: #05a8b0;
  --primary-yellow: #f9d72f;

  --secondary-teal: #41c1ce;
  --secondary-yellow: #fee050;

  --bg: #050505;
  --panel: #101010;
  --panel-2: #151515;

  --text: #ffffff;
  --muted: #999999;
  --border: #292929;

  --dark-seat-opacity: .32;
}


/* =========================================================
   RESET
========================================================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 20px 30px;
  width: 100%;
  min-height: 100%;
  background-image: url("images/bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);

  font-family:
    Arial,
    Helvetica,
    sans-serif;
}

body {
  min-height: 100vh;
}

@media (max-width: 700px) {
body {
   padding: 0px 10px;
  }

}

@media (max-width: 400px) {
html, body {
   padding: 0px 10px;
  }

}


/* =========================================================
   HEADER
========================================================= */

.site-header {
  width: 100%;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 20px 32px;

  background: transparent;
  border: none;
  box-shadow: none;

  position: relative;
  z-index: 100;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo {
  display: block;
  width: auto;
  height: 100px;
  max-width: 280px;
  object-fit: contain;
}

.header-date {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-date label {
  color: #ffffff;
  font-size: 22px;
  font-weight: 600;
}

.header-date select:focus {
  border-color: #f9d72f;
}

/* =========================================================
   MAP HEADER — TWO COLUMN LAYOUT
========================================================= */

.map-header-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.map-header-left {
  display: flex;
  flex-direction: column;
}

.map-header-right {
  min-width: 0;
}


/* Keep the quick claim form filling
   the right column */

.map-header-layout > .quick-claim {
  height: 100%;
}


/* Mobile */

@media (max-width: 800px) {

  .map-header-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

}

/* =========================================================
   QUICK CLAIM — TWO ROW FORM
========================================================= */

.quick-claim-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.quick-claim-field {
  min-width: 0;
}


/* Mobile */

@media (max-width: 600px) {

  .quick-claim-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

}


/* =========================================================
   CLAIMED COUNTER
========================================================= */

.claimed-counter {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-left: auto;
  margin-right: 20px;
  white-space: nowrap;
}

.claimed-counter #claimedNumber,
.claimed-counter #totalSeatNumber {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.claimed-counter #claimedNumber {
  color: var(--primary-teal);
       font-size: 22px;
}

.claimed-counter #totalSeatNumber {
  color: var(--text);
}

.claimed-separator {
  color: var(--muted);
  font-size: 15px;
}

.claimed-label {
  margin-left: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}


/* =========================================================
   DATE SELECTOR
========================================================= */

.header-date {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 220px;
}

.header-date label {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.header-date select {
  margin-top: 10px;
  text-align: center;
  width: 100%;
  padding: 10px 38px 10px 38px;
  border: 2px solid #05a8b0;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.35);
  background-color: #111;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.header-date select:hover {
  border-color: var(--primary-teal);
}

.header-date select:focus {
  border-color: var(--secondary-teal);

  box-shadow:
    0 0 0 3px rgba(65,193,206,.12);
}


/* =========================================================
   PAGE
========================================================= */

.page {
  width: 80%;
  margin: 0 auto;
}

@media (max-width: 700px) {
.page {
  width: 100%;
  margin: 0 auto;
}
}



/* =========================================================
   INTRO
========================================================= */

.intro {

  text-align: center;

  margin-bottom: 15px;
}

.intro h1 {

  margin: 0 0 6px;

  font-size:
    clamp(25px, 3vw, 38px);

  line-height: 1.1;
}

.intro p {
  margin: 0 0 13px;
  color: #999;
  font-size: 21px;
}


/* =========================================================
   SELECTED INFO
========================================================= */

.selected-info {

  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 34px;

  padding: 7px 15px;

  border:
    1px solid #303030;

  border-radius: 999px;

  color: #bbb;

  background: rgba(255,255,255,.025);

  font-size: 13px;

  transition:
    border-color .15s ease,
    color .15s ease;
}

.selected-info.has-seat {

  color: #fff;

  border-color:
    rgba(5,168,176,.65);

  background:
    rgba(5,168,176,.08);
}


/* =========================================================
   LEGEND
========================================================= */

.legend {

  display: flex;

  justify-content: center;
  align-items: center;

  flex-wrap: wrap;

  gap: 18px;

  margin:
    0 auto
    20px;

  color: #aaa;

  font-size: 12px;
}

.legend-item {

  display: inline-flex;

  align-items: center;

  gap: 7px;
}

.legend-seat {

  display: inline-flex;

  justify-content: center;
  align-items: center;

  width: 18px;
  height: 18px;

  border-radius: 3px;

  font-size: 10px;

  line-height: 1;
}

.legend-available {

  background: rgba(255,255,255,.20);

  border:
    1px solid rgba(255,255,255,.12);
}

.legend-claimed {

  background:
    var(--primary-teal);

  border:
    1px solid rgba(255,255,255,.15);
}



/* =========================================================
   QUICK CLAIM
========================================================= */

.quick-claim {
  width: 100%;
  max-width: 1200px;
  padding: 18px 20px 20px;
  background: rgba(16, 16, 16, 0.92);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-sizing: border-box;
}

.quick-claim-title {
  margin-bottom: 14px;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--primary-teal);
  text-align: left;
}


/* =========================================================
   FIRST ROW
========================================================= */

.quick-claim-row {
  display: grid;
  gap: 14px;
  align-items: end;
}


.quick-claim-field {
  min-width: 0;
}


.quick-claim-field label {
  display: block;

  margin-bottom: 7px;

  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;

  color: var(--muted);
}


.quick-claim-field input,
.quick-claim-field select {
  width: 100%;
  height: 42px;

  padding: 0 12px;

  box-sizing: border-box;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--panel-2);
  color: var(--text);

  font-family: inherit;
  font-size: 13px;

  outline: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}


.quick-claim-field input::placeholder {
  color: #666;
}


.quick-claim-field input:focus,
.quick-claim-field select:focus {
  border-color: var(--primary-teal);
  background: #181818;
}


/* =========================================================
   SEAT NUMBER
========================================================= */

.quick-seat-number {
  display: flex;
  align-items: center;
  gap: 8px;
}


.quick-seat-number select:first-child {
  flex: 1.2;
}


.quick-seat-number select:last-child {
  flex: 1;
}


.quick-seat-number span {
  flex: 0 0 auto;

  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}


/* =========================================================
   CLAIM BUTTON
========================================================= */

.quick-claim-action {
  display: flex;
  justify-content: center;

  margin-top: 16px;
}


#quickClaimBtn {
  min-width: 180px;
  height: 42px;

  padding: 0 28px;

  font-size: 13px;
  font-weight: 700;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 800px) {

  .quick-claim {
    margin: 16px auto 20px;
    padding: 16px;
  }


  .quick-claim-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }


  .quick-claim-field:first-child {
    grid-column: 1 / -1;
  }


  .quick-claim-field input,
  .quick-claim-field select {
    height: 40px;
  }


  .quick-claim-action {
    margin-top: 14px;
  }


  #quickClaimBtn {
    width: 100%;
  }

}

   @media (max-width: 600px) {

  .claimed-counter {
    margin-right: 10px;
    gap: 4px;
  }

  .claimed-counter #claimedNumber,
  .claimed-counter #totalSeatNumber {
    font-size: 15px;
  }

  .claimed-label {
    font-size: 8px;
  }

}


@media (max-width: 480px) {

  .quick-claim-row {
    grid-template-columns: 1fr;
  }


  .quick-claim-field:first-child {
    grid-column: auto;
  }

}


/* country-stats-grid*/

.country-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 20px;
}

.country-stat-name {
   font-size:13px;
}

.country-stat-count {
   font-size:13px;
   font-weight:600;
   color: #fee050;
}

@media (max-width: 700px) {
   .country-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
}

@media (max-width: 400px) {
   .country-stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
}


/* =========================================================
   MAP
========================================================= */

.map-container {
  width: 100%;
  position: relative;
}


/* =========================================================
   MAP VIEWPORT
========================================================= */

#mapViewport {
  width: 100%;
  /*
    Use the remaining visible screen height.
    This works together with the JS fit calculation.
  */
  height: calc(100vh - 260px);
  min-height: 400px;
  position: relative;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  background: transparent;
  cursor: grab;
  user-select: none;
  touch-action: none;
}


#mapViewport.dragging {
  cursor: grabbing;
}


/* =========================================================
   MAP STAGE
========================================================= */

#mapStage {
  position: relative;
  /* JS controls the actual width and height. */
  width: 100%;
  height: auto;
  aspect-ratio: 1500 / 1700;
  flex-shrink: 0;
  margin: 0 auto;
  /* Do NOT use transform for zoom.
    JS changes the actual stage size instead. */
  transform: none;
  transform-origin: center center;
  transition: none;
  will-change: width, height;
}


/* =========================================================
   SVG
========================================================= */

#seatSvg,
.seat-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  margin: 0;
  padding: 0;
  max-width: none;
  overflow: visible;
  user-select: none;
}


.section-label {
  font-size: 28px;
  font-weight: 700;
  fill: #ffffff;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

/* =========================================================
   ZOOM BUTTONS
========================================================= */

.zoom-controls {
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 100;
  display: flex;
  gap: 6px;
}


.zoom-controls button {
  border: none;
  color:#fff;
  background: #111;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


.zoom-controls button:hover {
  background: #000;
}



/* =========================================================
   SVG SEATS
========================================================= */

.seat {

  cursor: pointer;

  transform-origin: center;

  transition:
    opacity .15s ease,
    filter .15s ease;
}


/*
   Available seats are rendered darker by JS.
*/

.seat:hover {

  filter:
    brightness(1.32)
    drop-shadow(
      0 0 3px
      rgba(255,255,255,.65)
    );
}


/*
   Claimed seat.
*/

.seat.claimed {

  cursor: pointer;
}

.seat.claimed:hover {

  filter:
    brightness(1.12)
    drop-shadow(
      0 0 3px
      rgba(255,255,255,.45)
    );
}


/*
   Selected seat while opening modal.
*/

.seat.selected rect {

  stroke:
    #fff !important;

  stroke-width:
    2px !important;

  filter:
    drop-shadow(
      0 0 5px
      rgba(254,224,80,.85)
    );
}


/* =========================================================
   FLAG INSIDE SVG
========================================================= */

.seat-flag {

  pointer-events: none;

  user-select: none;

  text-anchor: middle;

  dominant-baseline: central;

  font-family:
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Noto Color Emoji",
    sans-serif;

  font-size: 11px;

  opacity: 1;
}


/* =========================================================
   TOOLTIP
========================================================= */

.tooltip {

  position: fixed;

  z-index: 9999;

  display: none;

  pointer-events: none;

  padding:
    6px
    9px;

  border:
    1px solid #333;

  border-radius: 6px;

  background:
    rgba(10,10,10,.95);

  color: #fff;

  font-size: 12px;

  font-weight: 700;

  white-space: nowrap;

  box-shadow:
    0 5px 18px
    rgba(0,0,0,.4);
}

.tooltip.show {
  display: block;
}

.tooltip-name {
  font-weight: 700;
}

.tooltip-flag {
  font-size: 18px;
  line-height: 1.3;
}

.tooltip-seat {
  font-size: 12px;
  opacity: 0.7;
}


/* =========================================================
   MODAL
========================================================= */

.modal {

  position: fixed;

  inset: 0;

  z-index: 10000;

  display: none;

  justify-content: center;
  align-items: center;

  padding: 20px;
}

.modal.show {

  display: flex;
}

.modal-backdrop {

  position: absolute;

  inset: 0;

  background:
    rgba(0,0,0,.76);

  backdrop-filter:
    blur(5px);
}

.modal-box {

  position: relative;

  z-index: 1;

  width:
    min(430px, 100%);

  padding: 28px;

  border:
    1px solid #303030;

  border-radius: 18px;

  background:
    linear-gradient(
      145deg,
      #151515,
      #0d0d0d
    );

  box-shadow:
    0 25px 80px
    rgba(0,0,0,.65);

  animation:
    modalIn .18s ease-out;
}

@keyframes modalIn {

  from {
    opacity: 0;
    transform:
      translateY(10px)
      scale(.97);
  }

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


/* =========================================================
   MODAL CLOSE
========================================================= */

.modal-close {

  position: absolute;

  top: 12px;
  right: 14px;

  width: 34px;
  height: 34px;

  border: 0;

  border-radius: 50%;

  background: transparent;

  color: #888;

  font-size: 25px;

  line-height: 1;

  cursor: pointer;
}

.modal-close:hover {

  background: rgba(255,255,255,.07);

  color: #fff;
}


/* =========================================================
   MODAL HEADER
========================================================= */

.modal-header {

  margin-bottom: 25px;

  text-align: center;
}

.modal-kicker {

  margin-bottom: 7px;

  color:
    var(--primary-teal);

  font-size: 10px;

  font-weight: 900;

  letter-spacing: .15em;
}

.modal-header h2 {

  margin: 0 0 10px;

  font-size: 25px;
}

.modal-seat {

  display: inline-flex;

  padding: 7px 12px;

  border-radius: 999px;

  background:
    rgba(254,224,80,.09);

  border:
    1px solid
    rgba(254,224,80,.25);

  color:
    var(--secondary-yellow);

  font-size: 13px;

  font-weight: 800;
}


/* =========================================================
   FORM
========================================================= */

.form-group {

  margin-bottom: 18px;
}

.form-group label {

  display: block;

  margin-bottom: 7px;

  color: #ddd;

  font-size: 13px;

  font-weight: 700;
}

.form-group input,
.form-group select {

  width: 100%;

  height: 45px;

  padding:
    0
    13px;

  border:
    1px solid #333;

  border-radius: 9px;

  outline: none;

  background: #0b0b0b;

  color: #fff;

  font-family: inherit;

  font-size: 14px;
}

.form-group input::placeholder {
  color: #666;
}

.form-group input:focus,
.form-group select:focus {

  border-color:
    var(--primary-teal);

  box-shadow:
    0 0 0 3px
    rgba(5,168,176,.10);
}


/* =========================================================
   NOTICE
========================================================= */

.claim-notice {

  margin:
    4px
    0
    20px;

  padding: 10px 12px;

  border-radius: 8px;

  background:
    rgba(65,193,206,.06);

  border:
    1px solid
    rgba(65,193,206,.13);

  color: #999;

  font-size: 11px;

  line-height: 1.5;
}


/* =========================================================
   BUTTONS
========================================================= */

.modal-actions {

  display: flex;

  gap: 10px;
}

.btn {

  min-height: 44px;

  padding:
    0
    17px;

  border-radius: 9px;

  font-family: inherit;

  font-size: 13px;

  font-weight: 800;

  cursor: pointer;

  transition:
    transform .12s ease,
    opacity .12s ease,
    background .12s ease;
}

.btn:active {
  transform: scale(.98);
}

.btn-primary {

  flex: 1;

  border:
    1px solid
    var(--primary-teal);

  background:
    var(--primary-teal);

  color: #fff;
}

.btn-primary:hover {

  background:
    var(--secondary-teal);

  border-color:
    var(--secondary-teal);
}

.btn-secondary {

  border:
    1px solid #333;

  background:
    #171717;

  color: #ccc;
}

.btn-secondary:hover {

  background:
    #222;

  color: #fff;
}


/* =========================================================
   CLAIMED MODAL
========================================================= */

.claimed-box {

  text-align: center;

  padding-top: 35px;
}

.claimed-icon {

  display: flex;

  align-items: center;
  justify-content: center;

  width: 62px;
  height: 62px;

  margin:
    0
    auto
    18px;

  border-radius: 50%;

  background:
    rgba(5,168,176,.10);

  border:
    1px solid
    rgba(5,168,176,.25);

  font-size: 30px;
}

.claimed-box h2 {

  margin:
    4px
    0
    14px;

  font-size: 25px;
}

.claimed-name {

  margin-bottom: 5px;

  color: #fff;

  font-size: 17px;

  font-weight: 800;
}

.claimed-country {

  color: #999;

  font-size: 13px;
}

.claimed-close-btn {
  display: block;
  width: 100%;
  margin-top: 25px;
}

.release-seat-btn {
  display: block;
  width: 100%;
  margin-top: 25px;
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {

  padding:
    24px
    20px
    30px;

  border-top:
    1px solid #181818;

  text-align: center;

  color: #666;

  font-size: 12px;

  letter-spacing: .04em;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

  .site-header {
    padding: 14px 16px;
  }

  .site-logo {
    height: 48px;
    max-width: 190px;
  }

  .header-date {
    gap: 6px;
  }

  .header-date label {
    display: none;
  }

  .header-date select {
    padding: 8px 10px;
    font-size: 12px;
  }

  .header-date {
    width: 100%;
  }

  .intro h1 {
    font-size: 26px;
  }

  .intro p {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.5;
        font-size: 20px;
  }

  .legend {
    margin-bottom: 14px;
  }

  .map-wrap {
    justify-content: center;
  }

  .modal {
    padding: 14px;
  }

  .modal-box {
    padding:
      25px
      20px;
  }
}


@media (max-width: 400px) {
  .modal-box {
    border-radius: 15px;
  }

  .intro h1 {
        font-size: 21px;
  }
   
  .intro p {
        font-size: 14px;
  }
}
