/* ===============================
   Fonts
================================ */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600&display=swap');

/* ===============================
   CSS Variables (Theme)
================================ */
:root {
  --primary: #5ab2ff;
  --secondary: #3a7cff;
  --bg-top: #2a2b30;
  --bg-bottom: #0b0e1a;
  --panel-top: #2a2f4a;
  --panel-bottom: #14172b;
  --accent-glow: rgba(90, 178, 255, 0.35);
  --slider-thumb-image: none;
}

/* ===============================
   Reset / Base
================================ */
* {
  box-sizing: border-box;
  font-family: 'Baloo 2', system-ui, sans-serif;
}

body {
  margin: 0;
  padding: 20px;
  color: #ffffff;
  background:
    radial-gradient(circle at top, var(--bg-top) 0%, var(--bg-bottom) 65%);
}

/* ===============================
   Layout
================================ */
.container {
  max-width: 420px;
  margin: 0 auto;
}

.panel {
  background: linear-gradient(
    160deg,
    var(--panel-top) 0%,
    var(--panel-bottom) 100%
  );
  border-radius: 22px;
  padding: 22px;
  margin-bottom: 22px;
  border: 2px solid var(--primary);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 25px var(--accent-glow);
}

/* ===============================
   Theme Logo
================================ */
.theme-logo {
  display: block;
  max-width: 160px;
  margin: 0 auto 12px auto;
}

.hidden {
  display: none;
}

/* ===============================
   Headings
================================ */
h1 {
  margin: 0 0 18px 0;
  font-size: 30px;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  text-shadow: 0 0 12px var(--accent-glow);
}

h2 {
  margin-top: 0;
  font-size: 22px;
  font-weight: 600;
}

/* ===============================
   Fields
================================ */
.field {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

/* ===============================
   Inputs
================================ */
input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  font-size: 16px;
  background: #eef3ff;
  color: #000;
}

/* ===============================
   Slider (Theme Handle)
================================ */
input[type="range"] {
  width: 100%;
  height: 10px;
  appearance: none;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--secondary)
  );
  border-radius: 999px;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    var(--slider-thumb-image) center / contain no-repeat,
    #ffffff;
  box-shadow:
    0 6px 16px rgba(0,0,0,0.45),
    inset 0 0 0 3px var(--primary);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    var(--slider-thumb-image) center / contain no-repeat,
    #ffffff;
  border: 3px solid var(--primary);
}

/* ===============================
   Buttons
================================ */
button {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--secondary)
  );
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px var(--accent-glow);
}

button:active {
  transform: translateY(1px);
}

/* ===============================
   Generator
================================ */
.generator {
  margin-top: 22px;
  text-align: center;
}

/* Keep the generation line visually centered even while dots animate */
#genText {
  margin: 0;
}

.gen-text-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 18px;                 /* reserve space for dots, but smaller */
  max-width: 100%;
  flex-wrap: nowrap;               /* keep on one line */
  white-space: nowrap;             /* keep on one line */
  font-size: clamp(13px, 3.6vw, 16px); /* shrink slightly on small widths to avoid wrapping */
  line-height: 1.35;
}

#genTextMain {
  white-space: nowrap;
  flex: 0 0 auto;
}

.gen-dots {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px; /* fixed width => no jitter */
  text-align: left;
  color: rgba(255,255,255,0.9);
  pointer-events: none;
}

.gen-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;              /* tighter so it fits better */
  margin-left: 8px;      /* tighter so it fits better */
  vertical-align: middle;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex: 0 0 auto;
}

.gen-inline-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.55));
  flex: 0 0 auto;
}

.gen-inline-count {
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 12px var(--accent-glow);
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums; /* stable digit widths */
  width: 9ch;               /* enough for 4.434.353, keeps layout stable */
  text-align: right;
}

.gen-inline-label {
  opacity: 0.95;
  flex: 0 0 auto;
}

.verify-help {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.92;
}

/* ===============================
   Spinner
================================ */
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 14px;
}

/* ===============================
   Progress Bar (FIXED)
================================ */
.progress {
  position: relative;
  width: 100%;
  height: 12px;
  background: rgba(0,0,0,0.35);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}

#progressBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--secondary)
  );
  border-radius: 999px;
  transition: width 0.6s ease;
  box-shadow: inset 0 0 6px rgba(255,255,255,0.4);
}

/* ===============================
   Cheats List
================================ */
.cheats {
  padding-left: 18px;
}

.cheats li {
  margin: 10px 0;
  font-size: 16px;
}

/* ===============================
   Animations
================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===============================
   Page Lock Helper
================================ */
.page-hidden {
  visibility: hidden;
}

/* ===============================
   Premium "blank while locker loads"
   (shows nothing meaningful; just a subtle loader)
================================ */
.locker-blank {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, var(--bg-top) 0%, var(--bg-bottom) 65%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.locker-blank .spinner {
  margin: 0;
}
/* ===============================
   (TUTTO IL TUO FILE RESTA IDENTICO)
================================ */
/* ... FILE IDENTICO FINO ALLA FINE ... */

/* ===============================
   Footer
================================ */
.site-footer {
  margin-top: 40px;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.85;
}

.site-footer hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 16px 0;
}

.site-footer h3 {
  font-size: 15px;
  margin: 12px 0 6px;
  color: var(--primary);
}

.site-footer p {
  margin: 6px 0;
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
}
