* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  height: 100%;
  min-height: -webkit-fill-available;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  height: 100vh;
}
#app {
  width: 100vw;
  max-width: 1280px;
  height: 100dvh;
  min-height: 100vh;
  background: #000;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
#scene {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
  user-select: none;
  height: 100%;
}
#backgroundImage,
#videoPlayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
#videoPlayer {
  display: none;
}
#fallbackText {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: gold;
  font-size: 40px;
  text-align: center;
  z-index: 1;
  pointer-events: none;
}
.hidden {
  display: none !important;
}
#visorLayer {
  position: absolute;
  inset: 50px;
  z-index: 10;
  pointer-events: none;
}
.corner {
  position: absolute;
  width: 60px;
  height: 60px;
  border-color: #fff;
  border-style: solid;
}
.corner.tl { top: 0; left: 0; border-width: 3px 0 0 3px; }
.corner.tr { top: 0; right: 0; border-width: 3px 3px 0 0; }
.corner.bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; }
.corner.br { bottom: 0; right: 0; border-width: 0 3px 3px 0; }
#toleranceVisor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  transform: translate(-50%, -50%);
}
#middleCircle {
  position: absolute;
  inset: 0;
  border: 3px solid #fff;
  border-radius: 999px;
}
#lineH, #lineV {
  position: absolute;
  background: #fff;
}
#lineH {
  width: 3px;
  height: 150px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}
#lineV {
  width: 150px;
  height: 3px;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
#tapNow {
  position: absolute;
  top: 150px;
  left: 50%;
  transform: translateX(-50%);
  color: limegreen;
  font-size: 30px;
  font-weight: 700;
  text-align: center;
}
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.80);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.overlayCard {
  max-width: 900px;
  text-align: center;
}
.smallCard {
  max-width: 700px;
}
.demoCard {
  max-width: 980px;
}
#demoCompleteModal .bigGold {
  font-size: clamp(36px, 5.5vw, 58px);
}
#demoCompleteModal .midWhite {
  font-size: clamp(18px, 2.3vw, 25px);
}
.bigGold {
  color: gold;
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 700;
}
.midWhite {
  color: #fff;
  font-size: clamp(20px, 2.5vw, 28px);
  margin-top: 16px;
  line-height: 1.4;
}
.thanksText {
  margin-top: 22px;
}
.demoText {
  margin-top: 28px;
}
.linkGold {
  color: gold;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 700;
  margin-top: 28px;
  cursor: pointer;
}
.linkGold:hover {
  color: skyblue;
}
.bigWishlist {
  margin-top: 34px;
}
.closeDemo {
  font-size: 26px;
  margin-top: 20px;
}
#resultPanel {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
#statusText {
  font-size: clamp(60px, 10vw, 100px);
  font-weight: 700;
  text-align: center;
}
#starBox {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  min-height: 70px;
  align-items: center;
  justify-content: center;
}
.starImg {
  width: 70px !important;
  height: 70px !important;
  object-fit: contain;
}
#resultButtons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.resultButton {
  color: gold;
  font-size: 35px;
  font-weight: 700;
  cursor: pointer;
}
.resultButton:hover {
  color: skyblue;
}

/* ALT MENÜ SABİT VE DÜZENLİ */
#bottomArea {
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  background: #111;
  border-top: 1px solid gold;
  height: auto;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}
#menuBar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  flex: 1;
}
.menuButton {
  color: gold;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  text-align: center;
  cursor: pointer;
  padding: 0 10px;
  user-select: none;
  transition: color 0.2s ease;
}
.menuButton:hover {
  color: skyblue;
}
.staticText {
  color: gold;
  font-weight: 700;
  cursor: default;
}
#wishlistBar {
  padding: 8px 10px;
  text-align: center;
  background: #000;
  border-top: 1px solid #333;
  font-size: 18px;
  color: gold;
  font-weight: 700;
}

/* LEVELS POPUP – VİDEO ÜZERİNE AÇILIR */
#levelsPopup {
  position: fixed;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  max-height: 420px;
  background: #222;
  border: 2px solid gold;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.7);
  z-index: 1200;
  overflow: hidden;
  pointer-events: auto;
}
#levelsPopupHeader {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
  background: #111;
  border-bottom: 1px solid #444;
}
#levelsClose {
  color: #ff4444;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
}
#levelsList {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 0;
}
.levelRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  color: gold;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.levelRow:hover {
  background: rgba(255, 215, 0, 0.15);
  color: skyblue;
}

/* MOBİL AYARLAR */
@media (max-width: 900px) {
  #bottomArea {
    min-height: 136px;
  }
  #menuBar {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 50px;
  }
  #wishlistBar {
    font-size: 16px;
  }
  #visorLayer {
    inset: 28px;
  }
  #levelsPopup {
    bottom: 160px;
    width: 90%;
  }
}