/* Reset & Base HTML Styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: #1a221c; /* Background outside the phone */
  font-family: var(--font-family);
  color: var(--text-light);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Scrollbar customizations */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-panel);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}

/* Main Container Simulator for Desktop, Fullscreen on Mobile */
.phone-simulator {
  position: relative;
  width: var(--game-width);
  height: var(--game-height);
  background-color: var(--bg-dark);
  border-radius: var(--radius-lg);
  border: 12px solid #1f2b23; /* simulated bezel */
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 2px rgba(255, 255, 255, 0.05),
    inset 0 0 10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Phone notch on desktop */
.phone-simulator::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 25px;
  background: #1f2b23;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 1000;
  pointer-events: none;
}

/* Camera hole on notch */
.phone-simulator::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: #0d120f;
  border-radius: 50%;
  z-index: 1001;
  pointer-events: none;
}

/* Mobile responsive media query - strip the phone simulator frame on mobile screens */
@media (max-width: 480px), (max-height: 840px) {
  html, body {
    background-color: var(--bg-dark);
  }
  .phone-simulator {
    width: 100vw;
    height: 100dvh; /* dynamic viewport height to respect address bars */
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .phone-simulator::before,
  .phone-simulator::after {
    display: none; /* remove notch on real mobile devices to prevent double notches */
  }
}

/* Screen Wrapper */
.screen {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Scenes Container styling */
.scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-dark);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.95);
  z-index: 1;
}

.scene.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 2;
}

/* Basic Typography Utilities */
h1 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: var(--accent-yellow);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

h2 {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

p {
  font-size: 14px;
  line-height: 1.5;
}
