/* ==========================
   ROOT VARIABLES
========================== */
:root {
  --glaucous: #6382a3ff;
  --dark-cyan: #559997ff;
  --bar-start: #559989ff;
  --bar-middle: #1be07eff;
  --bar-end: #0b8e6bff;
  --aquamarine: #96f5c6ff;
  --white: #ffffffff;
  --pale-purple: #e8d9f0ff;
  --mauve: #d99affff;
  --lavender-floral: #bb66eeff;
  --dark-violet: #9526d2ff;
  --tekhelet: #601787ff;
  --gold-light: #ffd700ff;
  --gold-medium: #ffc700ff;
  --gold-dark: #ffb600ff;
}

/* ==========================
   GLOBAL RESET
========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================
   BASE LAYOUT
========================== */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================
   FONT UTILITY CLASSES
========================== */
.climate-crisis-<uniquifier > {
  font-family: "Climate Crisis", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "YEAR" 1979;
}

.almendra-sc-regular {
  font-family: "Almendra SC", serif;
  font-weight: 400;
  font-style: normal;
}

/* ==========================
   DYNAMIC BACKGROUND
========================== */
#background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -100;
  transition: background 2s ease;
}

#stars,
#clouds {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

body.day #background {
  background: #38b6ff;
}

body.night #background {
  background: #000;
}

/* ==========================
   CLOUDS & STARS
========================== */
.cloud {
  position: absolute;
  pointer-events: none;
  user-select: none;
  opacity: 0.9;
  animation-name: drift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes drift {
  from {
    transform: translateX(-30vw);
  }
  to {
    transform: translateX(130vw);
  }
}

.star {
  position: absolute;
  pointer-events: none;
  user-select: none;
  opacity: 0.85;
  animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
  0% {
    transform: scale(0.8);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.7;
  }
}

body.day #stars {
  display: none;
}

body.night #stars {
  display: block;
}

/* ==========================
   VERSION
========================== */
.version-number {
  position: absolute;
  top: 20px;
  left: 25px;
  color: var(--white);
  font-family: "Germania One", system-ui;
  font-size: 18px;
  opacity: 0.8;
  letter-spacing: 2px;
}

/* ==========================
   SETTINGS BUTTON
========================== */
.settings-button {
  position: absolute;
  top: 20px;
  right: 25px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 28px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  padding: 0;
  transition: 0.3s ease;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.15);
}

.settings-button:hover {
  transform: rotate(90deg) scale(1.1);
  box-shadow:
    0 0 20px var(--lavender-floral),
    inset 0 0 15px rgba(255, 255, 255, 0.25);
}

/* ==========================
   LAUNCHER
========================== */
.launcher-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* ==========================
   LOGO
========================== */
.logo {
  width: clamp(220px, 80vw, 750px);
  height: auto;
  flex-shrink: 0;
  display: block;
  margin-bottom: clamp(60px, 8vh, 120px);
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(187, 102, 238, 0.9)) drop-shadow(0 0 70px rgba(149, 38, 210, 0.6));
}

/* ==========================
   GLASS PANELS
========================== */
.glass-panel {
  border-radius: 35px;
  background: linear-gradient(145deg, rgba(149, 38, 210, 0.35), rgba(96, 23, 135, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 0 30px rgba(255, 255, 255, 0.1),
    0 15px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

/* ==========================
   BUTTONS
========================== */
.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(25px, 4vh, 45px);
}

.glass-button {
  font-family: "Germania One", system-ui;
  font-size: clamp(24px, 2.5vw, 40px);
  font-weight: bold;
  width: clamp(280px, 32vw, 480px);
  padding: clamp(14px, 1.5vw, 22px) clamp(40px, 5vw, 70px);
  border-radius: 35px;
  background: linear-gradient(145deg, var(--dark-violet), var(--lavender-floral));
  color: var(--white);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 0 15px rgba(255, 255, 255, 0.2),
    0 0 25px var(--lavender-floral),
    0 0 50px var(--dark-violet);
  transition: all 0.4s ease;
}

.glass-button::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.35) 0%, transparent 70%);
  transform: rotate(45deg) scale(0);
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
}

.glass-button:hover::before {
  transform: rotate(45deg) scale(1.2);
  opacity: 0.6;
}

.glass-button:hover {
  background: linear-gradient(145deg, var(--lavender-floral), var(--tekhelet));
  box-shadow:
    inset 0 0 25px rgba(255, 255, 255, 0.3),
    0 0 35px var(--aquamarine),
    0 0 60px var(--dark-violet);
  transform: translateY(-2px);
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 15px var(--aquamarine);
}

.glass-button:active::after {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 80%);
  left: -50%;
  top: -50%;
  border-radius: 50%;
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* ==========================
   SETTINGS PANEL
========================== */
.settings-panel {
  position: absolute;
  top: 90px;
  right: 25px;
  width: clamp(280px, 25vw, 400px);
  padding: 30px;
  border-radius: 35px;
  background: linear-gradient(145deg, rgba(149, 38, 210, 0.85), rgba(96, 23, 135, 0.85));
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.2),
    0 0 35px var(--lavender-floral),
    0 0 70px var(--dark-violet);
  color: white;
  display: none;
  flex-direction: column;
  gap: 20px;
  z-index: 1000;
}

.settings-panel.show {
  display: flex;
}

.settings-panel h2 {
  text-align: center;
  font-family: "Germania One";
  font-size: 32px;
}

.settings-option {
  min-height: 55px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  border-radius: 25px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(145deg, var(--dark-violet), var(--lavender-floral));
  color: white;
  font-family: "Germania One";
  font-size: 22px;
  cursor: pointer;
  transition: 0.3s ease;
}

.settings-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--aquamarine);
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-size: 30px;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.link-option a {
  color: white;
  text-decoration: none;
  font-family: "Germania One";
  font-size: 22px;
}

.link-option a:hover {
  text-shadow: 0 0 12px var(--aquamarine);
}

.support-id {
  text-align: center;
  font-size: 18px;
  opacity: 0.9;
}

.support-id span {
  display: block;
  margin-top: 5px;
  font-family: monospace;
  color: var(--aquamarine);
}

/* ==========================
   INFO POPUPS
========================== */
.info-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, 80vw);
  padding: 40px;
  border-radius: 35px;
  background: linear-gradient(145deg, rgba(149, 38, 210, 0.9), rgba(96, 23, 135, 0.9));
  backdrop-filter: blur(25px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  text-align: center;
  box-shadow:
    0 0 40px var(--lavender-floral),
    0 0 80px var(--dark-violet);
  display: none;
  z-index: 1000;
}

.info-popup.show {
  display: block;
}

.info-popup h2 {
  font-family: "Germania One";
  font-size: 36px;
  margin-bottom: 25px;
}

.info-popup p {
  font-size: 20px;
  line-height: 1.6;
}

/* ===============================
   INFORMATION POPUP IMAGES
=============================== */

.information-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.information-images img {
    width: 80px;
    height: auto;
    display: block;
}

/* ===============================
   DEVLOG LINK
=============================== */

.devlog-link {
    color: #ffffff;
    text-decoration: none;
}

.devlog-link:hover {
    opacity: 0.8;
}
/* ==========================
   CACHE CONFIRMATION POPUP
========================== */

.cache-popup {
  width: min(450px, 80vw);
}

.cache-popup p {
  margin-bottom: 30px;
}

.cache-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.cache-buttons .settings-option {
  width: 160px;
  font-size: 18px;
}

/* ==========================
   AUTH POPUPS
========================== */
.auth-popup {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 1000;
}

.auth-popup.show {
  display: flex;
}

.auth-popup input {
  width: 100%;
  height: 55px;
  border-radius: 25px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 20px;
  padding: 0 20px;
  outline: none;
  text-align: center;
}

.auth-popup input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.auth-popup input:focus {
  box-shadow: 0 0 20px var(--aquamarine);
}

.auth-button {
  width: 100%;
  font-size: 22px;
  padding: 15px;
}

.auth-popup p {
  min-height: 20px;
  font-size: 18px;
}

.signup-agreements {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 18px;
}

.agreement-row {
  display: center;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.agreement-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--lavender-floral);
  cursor: pointer;
}

.agreement-row a,
.agreement-row a:visited {
  color: white;
  text-decoration: underline;
  font-weight: bold;
}

.agreement-row a:hover {
  color: var(--aquamarine);
}

/* ==========================
   APPS / DESKTOP LAUNCHER
========================== */
.desktop-launcher {
  position: fixed;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90%;
  padding: 35px;
  overflow: hidden;
  border-radius: 45px;
  background: linear-gradient(145deg, rgba(149, 38, 210, 0.75), rgba(96, 23, 135, 0.75));
  backdrop-filter: blur(25px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 0 40px rgba(255, 255, 255, 0.18),
    0 0 50px var(--lavender-floral),
    0 0 90px var(--dark-violet);
  color: white;
}
/* ===============================
   APP HOVER PREVIEW LAYER
=============================== */

#app-preview-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5000;
}


.app-preview {
    position: absolute;

    width: 230px;
    padding: 18px;

    border-radius: 25px;

    background: linear-gradient(
        145deg,
        rgba(149, 38, 210, 0.95),
        rgba(96, 23, 135, 0.95)
    );

    backdrop-filter: blur(20px);

    border: 2px solid rgba(255,255,255,0.25);

    box-shadow:
        0 0 25px var(--lavender-floral),
        0 0 50px var(--dark-violet);

    color: white;

    font-family: "Germania One";
    font-size: 16px;
    text-align: center;

    opacity: 0;
    transform: translateY(10px);

    transition:
        opacity .25s ease,
        transform .25s ease;
}


.app-preview.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================
   DESKTOP HEADER
========================== */
.launcher-header {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  white-space: nowrap;
  color: white;
}

.omni-title {
  font-family: "Climate Crisis", sans-serif;
  font-size: 42px;
  font-weight: 400;
  letter-spacing: 3px;
  filter: drop-shadow(0 0 15px var(--lavender-floral)) drop-shadow(0 0 30px var(--dark-violet));
}

.gateway-text {
  font-family: "Almendra SC", serif;
  font-size: 24px;
  letter-spacing: 2px;
  opacity: 0.95;
}

/* ==========================
   FEATURE ROW
========================== */
.feature-row {
  display: flex;
  gap: 30px;
  margin-top: 70px;
  align-items: stretch;
}

.game-feature {
  position: relative;
  width: 70%;
  height: 320px;
  margin-top: 0;
  overflow: hidden;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-radius: 35px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 0 30px rgba(255, 255, 255, 0.1),
    0 15px 40px rgba(0, 0, 0, 0.35);
}

/* ==========================
   PLAYER CARD
========================== */
.player-card {
  width: 30%;
  height: 320px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  border-radius: 35px;
  background: linear-gradient(145deg, rgba(149, 38, 210, 0.35), rgba(96, 23, 135, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 0 30px rgba(255, 255, 255, 0.1),
    0 15px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.player-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.35);
  margin-bottom: 15px;
  flex-shrink: 0;
}

.player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.player-card h3 {
  font-family: "Germania One";
  font-size: 28px;
}

.player-card p {
  margin: 10px 0 20px;
  opacity: 0.85;
}

.profile-button {
  width: 160px;
  min-width: 160px;
  height: 50px;
  font-size: 20px;
  padding: 0;
  border-radius: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 35px;
}

.game-overlay {
  position: absolute;
  inset: 0;
  border-radius: 35px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.75));
}

.game-info {
  position: relative;
  width: 380px;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}

.game-logo {
  width: 260px;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-bottom: 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.35)) drop-shadow(0 0 30px var(--lavender-floral));
}

.game-info p {
  line-height: 1.6;
  margin-bottom: 35px;
}

.play-button {
  width: 180px;
  align-self: flex-end;
  font-size: 20px;
  padding: 12px 20px;
  border-radius: 25px;
}

/* ==========================
   APP CAROUSEL
========================== */
.app-grid {
  position: relative;
  margin-top: 10px;
  width: 100%;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* visible window */
.app-window {
  width: 80%;
  overflow: visible;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}

/* cards row */
.app-track {
  display: flex;
  gap: 30px;
  width: max-content;
  transition: transform 0.8s ease;
}

/* ==========================
   GLASS APP CARDS
========================== */
.app-card {
  flex: 0 0 210px;
  height: 210px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-radius: 35px;
  background: linear-gradient(145deg, rgba(149, 38, 210, 0.55), rgba(96, 23, 135, 0.55));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 0 25px rgba(255, 255, 255, 0.15),
    0 15px 35px rgba(0, 0, 0, 0.35);
}

/* icons */
.app-card img {
  width: 95px;
  height: 95px;
  object-fit: contain;
}

/* buttons */
.app-button {
  width: 90%;
  height: 42px;
  font-size: 18px;
  padding: 5px;
}

/* ==========================
   CAROUSEL ARROWS
========================== */
.carousel-arrow {
  position: absolute;
  z-index: 10;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(149, 38, 210, 0.45);
  backdrop-filter: blur(15px);
  color: white;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 25px var(--lavender-floral);
  transition: 0.3s ease;

  /* consolidated from duplicate selector */
  font-family: Arial, sans-serif;
  padding: 0;
}

.carousel-arrow:hover {
  transform: scale(1.15);
  box-shadow: 0 0 40px var(--aquamarine);
}

.left-arrow {
  left: 0;
}

.right-arrow {
  right: 0;
}

/* ==========================
   SHARED UTILITIES
========================== */
.hidden {
  display: none;
}

.launcher-return {
  position: absolute;
  top: 30px;
  left: 30px;
  width: 180px;
  font-size: 22px;
  padding: 12px;
  z-index: 20;
}

.forgot-password {
  margin: 8px 0 18px;
  text-align: center;
}

.forgot-password a,
.forgot-password a:visited {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.2s;
}

.forgot-password a:hover,
.forgot-password a:focus {
  color: #ffffff;
  opacity: 0.8;
  text-decoration: none;
}

/* ==========================
   TERMS & PRIVACY POPUPS
========================== */

.terms-popup,
.privacy-popup {
  width: min(700px, 85vw);
  max-height: 80vh;
  padding: 35px;

  display: none;
  flex-direction: column;
  text-align: left;
}

.terms-popup.show,
.privacy-popup.show {
  display: flex;
}

/* Keep the title centered */

.terms-popup > h2,
.privacy-popup > h2 {
  flex-shrink: 0;
  text-align: center;
  margin-bottom: 25px;
}

/* Scrollable document */

.popup-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;

  padding-right: 12px;

  text-align: left;
  line-height: 1.7;
}

/* Headings inside the document */

.popup-content h1,
.popup-content h2,
.popup-content h3,
.popup-content h4 {
  text-align: left;
  font-family: "Germania One";
  font-weight: normal;
  margin: 24px 0 12px;
}

/* Paragraphs */

.popup-content p {
  text-align: left;
  font-size: 18px;
  margin-bottom: 16px;
}

/* Lists */

.popup-content ul,
.popup-content ol {
  margin: 0 0 18px 24px;
}

.popup-content li {
  margin-bottom: 8px;
}

/* Links */

.popup-content a {
  color: white;
  text-decoration: underline;
}

.popup-content a:hover {
  color: var(--aquamarine);
}

/* Scrollbar */

.popup-content::-webkit-scrollbar {
  width: 10px;
}

.popup-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.popup-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 10px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.popup-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.08);
}
