/* Android 14/15 Easter Egg "Landroid" - 1:1 Source Palette & Typography */

:root {
  /* Exact Colors from Colors.kt and Universe.kt */
  --color-eigengrau: #16161D;
  --color-eigengrau2: #292936;
  --color-eigengrau3: #3C3C4F;
  --color-eigengrau4: #A7A7CA;
  --color-console: #B7B7FF;
  --color-autopilot: #4285F4;
  --color-android-green: #34A853;
  --color-flag: #C6FF00;
  --color-orbit: rgba(0, 255, 255, 0.50);
  --color-thrust: #FF8800;
  --color-ringfence: #800000;
  --color-flightstick: #00FF00;
  
  --font-mono: 'Roboto Mono', 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-eigengrau);
  font-family: var(--font-mono);
  color: var(--color-console);
  touch-action: none;
}

#app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--color-eigengrau);
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#game-canvas {
  z-index: 1;
}

#stick-canvas {
  z-index: 2;
  cursor: crosshair;
}

/* 1:1 Telemetry Overlay - directly on screen matching MainActivity.kt padding(6.dp) */
.hud-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.top-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

/* Monospace Telemetry: 1:1 with TextStyle in MainActivity.kt */
.telemetry-raw {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  line-height: 12px;
  letter-spacing: 1px;
  white-space: pre-wrap;
  color: var(--color-console);
  text-shadow: 0 0 1px rgba(183, 183, 255, 0.4);
  opacity: 0;
  transition: opacity 0.05s ease;
}

#top-telemetry {
  max-width: 50vw;
  max-height: 60vh;
  overflow: hidden;
}

#autopilot-telemetry {
  color: var(--color-autopilot);
  margin-bottom: 6px;
}

#bottom-telemetry {
  color: var(--color-console);
}

.bottom-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

/* Wide screen telemetry placement matching Compose `if (wide) Alignment.BottomEnd else Alignment.BottomStart` */
@media (min-aspect-ratio: 1/1) {
  .bottom-section {
    flex-direction: row-reverse;
  }
  .telemetry-group {
    text-align: right;
    width: 45%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }
}

@media (max-aspect-ratio: 1/1) {
  .bottom-section {
    flex-direction: column;
    align-items: flex-start;
  }
  .telemetry-group {
    text-align: left;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Discreet Helper Toolbar (Can be hidden with key 'H') */
.toolbar {
  pointer-events: auto;
  display: flex;
  gap: 6px;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.toolbar:hover {
  opacity: 1.0;
}

.toolbar.hidden {
  display: none !important;
}

.hud-btn {
  background: rgba(41, 41, 54, 0.6);
  border: 1px solid rgba(183, 183, 255, 0.25);
  color: var(--color-console);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.15s ease;
}

.hud-btn:hover {
  background: rgba(60, 60, 79, 0.85);
  border-color: var(--color-console);
}

.hud-btn.active {
  background: rgba(66, 133, 244, 0.3);
  border-color: var(--color-autopilot);
  color: #8AB4F8;
}

/* Help & Seed Modal */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(22, 22, 29, 0.92);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--color-eigengrau);
  border: 1px solid var(--color-eigengrau3);
  padding: 20px;
  max-width: 440px;
  width: 90%;
}

.modal-card h2 {
  font-size: 13px;
  color: var(--color-console);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.modal-card p, .modal-card ul {
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 10px;
  color: var(--color-eigengrau4);
}

.modal-card ul {
  list-style: none;
}

.modal-card kbd {
  background: var(--color-eigengrau2);
  border: 1px solid var(--color-eigengrau4);
  padding: 1px 4px;
  color: #fff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.input-group input {
  width: 100%;
  background: var(--color-eigengrau2);
  border: 1px solid var(--color-eigengrau3);
  padding: 6px 10px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 6px;
  outline: none;
}

/* 1:1 Android 14 Easter Egg Mission Patch Screen */
#patch-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

#patch-overlay.launched {
  transform: scale(2.8);
  opacity: 0;
  pointer-events: none;
}

.patch-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
  cursor: pointer;
  border-radius: 50%;
  touch-action: none;
}

.patch-icon-svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
}

.hold-ring-svg {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 220px;
  height: 220px;
  pointer-events: none;
  transform: rotate(-90deg);
}

#hold-progress-ring {
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.05s linear;
}

.patch-caption {
  margin-top: 24px;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--color-console);
  text-transform: uppercase;
}

.skip-btn {
  margin-top: 16px;
  background: transparent;
  border: 1px solid rgba(183, 183, 255, 0.3);
  color: var(--color-eigengrau4);
  font-family: inherit;
  font-size: 10px;
  padding: 4px 12px;
  cursor: pointer;
  border-radius: 12px;
}
