/* ═══════════════════════════════════════════════════════
   GSCH — страничные стили
   Подключается ПОСЛЕ css/common.css
   ═══════════════════════════════════════════════════════ */

/* ── Акцент страницы: синий ── */
:root {
  --page-accent: #38bdf8;
  --page-accent-dim: rgba(56,189,248,.10);
  --page-accent-glow: rgba(56,189,248,.28);
  --page-accent-light: #38bdf8;
  --a3: #ffaa00; --a3-dim: rgba(255,170,0,.10); --a3-glow: rgba(255,170,0,.25);
  --err: #ff4466;
}
[data-theme="light"] {
  --page-accent: #0077aa;
  --page-accent-dim: rgba(0,119,170,.10);
  --page-accent-glow: rgba(0,119,170,.28);
  --page-accent-light: #0077aa;
  --a3: #b37b00; --a3-dim: rgba(179,123,0,.10); --a3-glow: rgba(179,123,0,.25);
}

/* ── Main grid: wider right column ── */
.main-grid { grid-template-columns: 1fr 360px }

/* ── Form controls ── */
.form-group { margin-bottom: 18px }
.form-group:last-child { margin-bottom: 0 }
.lbl { display: block; font-family: 'Space Mono', monospace; font-size: .62rem; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px }
.lbl-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px }
.lbl-row .lbl { margin-bottom: 0 }
.lbl-val { font-family: 'Space Mono', monospace; font-size: .72rem; font-weight: 700; color: var(--page-accent-light) }

input[type=number], input[type=text], textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); font-family: 'Space Mono', monospace; font-size: .84rem; padding: 10px 14px;
  outline: none; transition: border-color .2s; resize: vertical;
}
input[type=number]:focus, input[type=text]:focus, textarea:focus { border-color: var(--page-accent-light) }
input[type=number]::-webkit-inner-spin-button { opacity: .5 }
textarea { min-height: 70px; line-height: 1.5 }

.input-row { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 8px; align-items: center }
.input-row-sep { font-family: 'Space Mono', monospace; font-size: .9rem; color: var(--muted); text-align: center }

input[type=range] { width: 100%; -webkit-appearance: none; height: 4px; background: var(--border2); border-radius: 2px; outline: none; cursor: pointer }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: var(--page-accent-light); border-radius: 50%; box-shadow: 0 0 8px var(--page-accent-glow); transition: transform .15s }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15) }

.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0 }

/* ── Checkbox ── */
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); cursor: pointer; transition: all .2s; user-select: none; margin-bottom: 8px }
.check-row:last-child { margin-bottom: 0 }
.check-row:hover { border-color: var(--border2) }
.check-row.active { border-color: rgba(56,189,248,.4); background: rgba(56,189,248,.06) }
.check-row input[type=checkbox] { display: none }
.check-box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border2); background: var(--surface); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .2s }
.check-row.active .check-box { background: var(--page-accent-light); border-color: var(--page-accent-light); box-shadow: 0 0 8px var(--page-accent-glow) }
.check-box svg { width: 10px; height: 10px; opacity: 0; transition: opacity .15s }
.check-row.active .check-box svg { opacity: 1 }
.check-label { font-size: .84rem; font-weight: 600 }
.check-hint { font-family: 'Space Mono', monospace; font-size: .6rem; color: var(--muted); margin-left: auto }

/* ── Mode tabs (Range/List) ── */
.mode-tabs { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 4px }
.mode-tab { flex: 1; padding: 9px 12px; font-family: 'Space Mono', monospace; font-size: .65rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); background: transparent; border: none; cursor: pointer; transition: all .2s; text-align: center }
.mode-tab + .mode-tab { border-left: 1px solid var(--border) }
.mode-tab.active { background: var(--page-accent-dim); color: var(--page-accent-light) }
.mode-tab:hover:not(.active) { background: var(--surface2); color: var(--text) }
.mode-section { display: none }
.mode-section.active { display: block }

/* ── Big number display ── */
.result-display { display: flex; flex-direction: column; align-items: center; padding: 32px 20px 24px; gap: 0 }
.big-numbers { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 64px; width: 100%; align-items: center }
.num-chip {
  font-family: 'Space Mono', monospace;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700; color: var(--page-accent-light);
  text-shadow: 0 0 20px var(--page-accent-glow);
  animation: numIn .3s ease both;
  cursor: default; transition: color .2s, transform .2s; line-height: 1;
}
.num-chip:hover { color: #fff; transform: scale(1.06) }
.num-chip.sm { font-size: clamp(1.1rem, 2.5vw, 1.6rem); text-shadow: none }
.num-chip.sm:nth-child(odd) { color: var(--page-accent-light) }
.num-chip.sm:nth-child(even) { color: #a78bfa }
@keyframes numIn { from { opacity: 0; transform: scale(.7) translateY(-12px) } to { opacity: 1; transform: none } }
.result-empty { color: var(--border2); font-family: 'Space Mono', monospace; font-size: .88rem; letter-spacing: .06em }

/* ── Metadata row ── */
.result-meta { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; justify-content: center }
.result-meta-item { font-family: 'Space Mono', monospace; font-size: .6rem; color: var(--muted); display: flex; align-items: center; gap: 5px }
.result-meta-item strong { color: var(--page-accent-light); font-weight: 700 }

/* ── Action row ── */
.result-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; justify-content: center }
.btn-gen { display: inline-flex; align-items: center; gap: 8px; background: var(--page-accent-light); color: #000; font-family: 'Space Mono', monospace; font-size: .75rem; font-weight: 700; letter-spacing: .06em; padding: 12px 26px; border-radius: 10px; border: none; cursor: pointer; transition: all .2s; box-shadow: 0 0 24px var(--page-accent-glow) }
.btn-gen:hover { transform: translateY(-2px); box-shadow: 0 0 36px rgba(56,189,248,.45) }
.btn-gen:active { transform: scale(.97) }
.btn-secondary { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--text); font-family: 'Space Mono', monospace; font-size: .72rem; letter-spacing: .05em; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border2); cursor: pointer; transition: all .2s }
.btn-secondary:hover { border-color: var(--page-accent-light); color: var(--page-accent-light) }
.btn-secondary:disabled { opacity: .35; cursor: not-allowed }
.btn-secondary.copied { border-color: var(--accent); color: var(--accent); background: var(--accent-dim) }

/* ── Session log ── */
.session-wrap { margin-top: 14px }
.session-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px }
.session-count { font-family: 'Space Mono', monospace; font-size: .64rem; color: var(--muted); letter-spacing: .06em }
.session-clear { font-family: 'Space Mono', monospace; font-size: .6rem; color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; cursor: pointer; transition: all .2s }
.session-clear:hover { border-color: var(--err); color: var(--err) }
.session-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 160px; overflow-y: auto }
.session-num { font-family: 'Space Mono', monospace; font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); cursor: pointer; transition: all .2s; position: relative; animation: fadeIn .15s ease both }
.session-num:hover { border-color: var(--border2) }
.session-num.last { border-color: rgba(56,189,248,.4); color: var(--page-accent-light); background: var(--page-accent-dim) }
.session-num .sn-ts { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: .56rem; white-space: nowrap; color: var(--muted); pointer-events: none; z-index: 10 }
.session-num:hover .sn-ts { display: block }
@keyframes fadeIn { from { opacity: 0; transform: scale(.85) } to { opacity: 1; transform: none } }
.session-empty { font-family: 'Space Mono', monospace; font-size: .7rem; color: var(--muted); text-align: center; padding: 14px 0 }
.session-excluded-badge { display: inline-flex; align-items: center; gap: 5px; font-family: 'Space Mono', monospace; font-size: .62rem; color: var(--err); border: 1px solid rgba(255,68,102,.2); background: rgba(255,68,102,.06); padding: 3px 10px; border-radius: 100px; margin-top: 8px }

/* ── Stats ── */
.stats-grid { display: flex; flex-direction: column; gap: 7px }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: var(--surface2); border-radius: 8px; border: 1px solid var(--border) }
.stat-k { font-family: 'Space Mono', monospace; font-size: .6rem; color: var(--muted); letter-spacing: .06em }
.stat-v { font-family: 'Space Mono', monospace; font-size: .78rem; font-weight: 700; color: var(--page-accent-light) }

/* ── History ── */
.history-list { display: flex; flex-direction: column; gap: 5px }
.hist-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; transition: all .15s; cursor: pointer }
.hist-item:hover { background: var(--surface2); border-color: var(--border2) }
.hist-nums { font-family: 'Space Mono', monospace; font-size: .76rem; font-weight: 700; color: var(--page-accent-light); flex: 1; word-break: break-word; line-height: 1.5 }
.hist-meta { font-family: 'Space Mono', monospace; font-size: .56rem; color: var(--muted); text-align: right; flex-shrink: 0; line-height: 1.6 }
.hist-empty { font-family: 'Space Mono', monospace; font-size: .7rem; color: var(--muted); text-align: center; padding: 14px 0 }

/* ── Responsive ── */
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr }
}
@media (max-width: 640px) {
  .num-chip { font-size: 2rem }
}