/*
 * sequi37788 — stile ripreso dal progetto paolomonti37788
 * Copyright (C) 2026 Pietro Giannini
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
:root { color-scheme: dark; }
html, body {
  height: 100%; margin: 0; background: #000; overflow: hidden; overscroll-behavior: none;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #f2f2f2;
  -webkit-user-select: none; user-select: none;
}
#canvas-wrap { position: fixed; inset: 0; touch-action: none; }
canvas { display: block; width: 100%; height: 100%; }

.ui-layer {
  position: fixed; inset: 0; pointer-events: none;
  padding-top: calc(env(safe-area-inset-top, 0px) + clamp(8px, 2.5vw, 14px));
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(8px, 2.5vw, 14px));
  padding-left: clamp(8px, 2.5vw, 14px);
  padding-right: clamp(8px, 2.5vw, 14px);
  box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: space-between;
}
.top-row { display: flex; justify-content: flex-end; align-items: flex-start; gap: 8px; }
.btn-row { display: flex; flex-direction: row; gap: 8px; pointer-events: auto; flex-wrap: wrap; justify-content: flex-end; position: relative; }

.icon-btn {
  font-family: inherit; color: #fff;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  width: clamp(36px, 9vw, 42px); height: clamp(36px, 9vw, 42px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex: none; padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  box-sizing: border-box;
}
.icon-btn svg { width: 56%; height: 56%; display: block; }
.icon-btn .dollar-icon {
  font-size: 1.15em; font-weight: 700; line-height: 1; display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.icon-btn:hover { background: rgba(255,255,255,0.14); }
.icon-btn:active { background: rgba(255,255,255,0.22); }

.msg {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  font-size: 10.5px; color: #bbb; background: rgba(20,20,20,0.9);
  border: 1px solid rgba(255,255,255,0.25); border-radius: 8px; padding: 6px 10px;
  width: max-content; max-width: 200px; text-align: right; pointer-events: none;
  opacity: 0; transform: translateY(-4px); transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: normal;
}
.msg.show { opacity: 1; transform: translateY(0); }

.bottom-row { display: flex; justify-content: flex-start; }
.info-panel {
  pointer-events: none; font-variant-numeric: tabular-nums;
  background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.28);
  border-radius: 8px; padding: 6px 9px; font-size: 10px; line-height: 1.45;
  color: #e6e6e6; min-width: 0; max-width: 58vw; backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0; transform: translateY(6px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.info-panel.show { opacity: 1; transform: translateY(0); }
.info-panel .sat-name {
  font-size: 10.5px; font-weight: 700; color: #fff; letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 5px; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.info-panel .sat-name .pulse {
  width: 5px; height: 5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 5px 1px rgba(255,255,255,0.9); animation: pulse 2s ease-in-out infinite; flex: none;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.info-panel .row { display: flex; justify-content: space-between; gap: 10px; color: #cfcfcf; white-space: nowrap; }
.info-panel .row b { color: #fff; font-weight: 600; }
.info-panel .row b.dim { color: #9a9a9a; }
.info-panel .row.hidden { display: none; }

.start-overlay {
  position: fixed; inset: 0; background: #000; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px; z-index: 50; transition: opacity 0.4s ease; padding: 30px;
  box-sizing: border-box; text-align: center;
}
.start-overlay.gone { opacity: 0; pointer-events: none; }
.start-btn { width: 64px; height: 64px; font-size: 26px; }
.start-title { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: 0.08em; margin-top: 6px; }
.start-hint { font-size: 11px; color: #888; letter-spacing: 0.05em; text-transform: uppercase; }
.start-text { font-size: 12px; color: #9a9a9a; line-height: 1.5; max-width: 300px; margin: 14px 0 0; }

.fallback {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: #000; color: #ccc; font-size: 13px; padding: 30px; text-align: center; box-sizing: border-box;
}
