/* ============ Theme Vars ============ */
:root {
  --page-bg: rgb(178, 178, 178);
  --ui-bg: rgba(0, 0, 0, 0.75);
  --ui-hover: rgba(118, 118, 118, 0.9);
  --ui-border: rgba(255, 255, 255, 0.15);
  --ui-border-strong: rgba(255, 255, 255, 0.35);
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(0, 0, 0, 0.12);
  --text-light: #fff;
  --text-dark: #111;
  --surface-light: #fff;
  --accent: #038cab;
  --btn-desktop: rgb(223, 223, 223);
  --btn-mobile: rgb(195, 195, 195);
}

* {
  margin: 0;
  padding: 0;
}
body {
  background-color: var(--page-bg);
}

/* ============ Loading ============ */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--surface-light);
}

#logo-pa {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-70%, -40%);
  font-family: "Prosto One", sans-serif;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#logo-pa .a {
  color: #999;
  font-size: 250px;
  position: relative;
  z-index: 1;
  transform: translateX(100px) translateY(50px);
}

#logo-pa .p {
  color: #333;
  font-size: 300px;
  position: absolute;
  z-index: 2;
}

#loading-text {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #616161;
  font: 500 26px "Orbitron", sans-serif;
}

/* ============ Start CTA ============ */
#startBtn {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 24px;
  border: 0;
  border-radius: 8px;
  background: var(--ui-bg);
  color: var(--text-light);
  font: 16px "Orbitron", sans-serif;
  cursor: pointer;
  display: none;
  transition: background 0.2s, transform 0.15s;
  z-index: 2100;
  animation: pulseScale 1.2s ease-in-out infinite alternate;
}
#startBtn:hover {
  background: var(--ui-hover);
  transform: translate(-50%, -50%) scale(1.05);
}
@keyframes pulseScale {
  from {
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    transform: translate(-50%, -50%) scale(1.08);
  }
}

/* ============ Canvas ============ */
.canvas {
  position: fixed;
  left: 0;
  top: 0;
}

/* ============ Controls Bar ============ */
.controls {
  position: fixed;
  top: 25px;
  right: 45px;
  z-index: 10000;
  display: none;
  gap: 4px;
  padding: 6px 10px;
  align-items: center;
  justify-content: flex-end;
}
.controls .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 5px;
  background: var(--btn-desktop);
  color: #000;
  font-size: 16px;
  cursor: pointer;
  border: 1px solid transparent;
  outline: none;
  backdrop-filter: blur(3px);
}
.controls .btn:hover {
  color: #555;
  border-color: #686868;
}

/* ============ Color Picker ============ */
.color-picker {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
}
.color-picker .color {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  border: 1px solid #000;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s;
}
.color-picker .color:hover {
  transform: scale(0.95);
}

/* ============ Popup ============ */
.popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  gap: 12px;
  width: clamp(260px, 80vw, 380px);
  padding: 18px 20px 20px;
  border-radius: 18px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  color: var(--text-dark);
  line-height: 1.5;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow: hidden;
}
.popup.visible {
  display: flex;
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.popup-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.popup .close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.95);
  font-weight: bold;
  color: #111;
  cursor: pointer;
  font-size: 28px;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  z-index: 99;
}
.popup .close-btn:hover {
  background: #fff;
  transform: scale(1.08);
}

/* ============ Buy Button (same on all devices) ============ */
.btn-buy {
  display: inline-block;
  padding: 10px 10px;
  margin: 10px 10px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

/* ===== ABOUT POPUP CONTENT ===== */
#aboutPopup #popup-content {
  text-align: center;
  font-family: "Poppins", "Inter", "Roboto", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dark);
  letter-spacing: 0.2px;
}

#aboutPopup .about-author {
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  color: var(--text-dark);
}

#aboutPopup .about-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
#aboutPopup .about-link:hover {
  opacity: 0.8;
}

#aboutPopup .about-info {
  margin-top: 10px;
  color: var(--text-dark);
  font-size: 13px;
  opacity: 0.9;
}

#logo-pa-about {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 12px;
  font-family: "Prosto One", sans-serif;
}

#logo-pa-about .logo-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  z-index: -1;
  border-radius: 16px;
}

#logo-pa-about .a,
#logo-pa-about .p {
  position: relative;
  font-size: 6rem;
  line-height: 1;
  z-index: 1;
  user-select: none;
  transition: transform 0.3s ease;
}

#logo-pa-about .a {
  color: #111;
  transform: translate(65px, 12px);
}

#logo-pa-about .p {
  color: #696969;
  transform: translate(-40px, -6px);
}

/* ============ Mobile (≤ 768px) ============ */
@media (max-width: 768px) {
  .controls {
    position: fixed;
    top: 2vh;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;

    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .controls .btn {
    background: var(--btn-mobile);
    padding: 20px 12px;
    transition: none !important;
  }
  .controls .btn:hover,
  .controls .btn:active {
    background: var(--btn-mobile) !important;
    color: #000 !important;
    border-color: transparent !important;
    transform: none !important;
  }
  .color-picker {
    order: 2;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
  }
  #logo-pa .p {
    font-size: 200px;
  }

  #logo-pa .a {
    font-size: 160px;
    transform: translateX(55px) translateY(36px);
  }

  #loading-text {
    top: 65%;
  }

  #startBtn {
    top: 65%;
  }
}

/* ============ Mobile Landscape (≤ 920px) ============ */
@media (orientation: landscape) and (max-width: 920px) {
  .popup {
    width: min(52vw, 220px);
    max-height: 64vh;
    padding: 10px 12px;
    gap: 6px;
  }
  .popup-image {
    max-height: 35vh;
  }
  #popup-content {
    max-height: 30vh;
    font-size: 10px;
    overflow: auto;
  }

  #startBtn {
    top: 77%;
  }
  .controls .btn {
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
  }
}

/* ============ Small Portrait (≤ 390px) ============ */
@media (orientation: portrait) and (max-width: 390px) {
  .popup {
    max-height: 64vh;
    padding: 5px 12px;
    gap: 5px;
  }
  .popup-image {
    max-height: 50vh;
  }
  #popup-content {
    max-height: 30vh;
    font-size: 13px;
    overflow: auto;
  }

  #logo-pa .p {
    font-size: 170px;
  }

  #logo-pa .a {
    font-size: 130px;
    transform: translateX(50px) translateY(26px);
  }

  #loading-text {
    top: 60%;
  }

  #startBtn {
    top: 60%;
  }
  .color-picker,
  .controls .btn {
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }
}









/* ============ Laptop / Medium Screens (1024px–1600px) ============ */
@media (min-width: 1024px) and (max-width: 1600px) {
  #logo-pa .p {
    font-size: 240px;
  }
  #logo-pa .a {
    font-size: 200px;
    transform: translateX(80px) translateY(40px);
  }

  #loading-text {
    font-size: 22px;
    top: 70%;
  }

  #startBtn {
    font-size: 15px;
    padding: 10px 20px;
    top: 70%;
  }

  .controls {
    right: 30px;
    top: 20px;
  }
}





body.demo-mode .controls .btn:not(#demoBtn):not(.color-picker) {
  display: none !important;
}
