:root {
  --bg: #2c2e31;
  --panel: #24262b;
  --panel-2: #1b1c20;
  --panel-3: #111215;
  --line: #4e5a3e;
  --accent: #7a8b5e;
  --panic: #f5c542;
  --text: #e7e7e2;
  --muted: #a6a6a1;
  --danger: #b54a36;
  --success: #8fb36b;
  --radius: 14px;
}

/* Запрет выделения текста */
* {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Разрешаем выделение в полях ввода (чтобы можно было писать) */
input, textarea, select, [contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Times New Roman', 'Courier New', monospace;
  line-height: 1.55;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font: inherit;
}

button {
  cursor: pointer;
  background: #3a4230;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  background: #506043;
  border-color: var(--panic);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.panic-bar {
  background: var(--panic);
  color: #1d1d18;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 8px 14px;
}

/* ==================== ШАПКА — УВЕЛИЧЕННЫЙ ЛОГОТИП ==================== */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 25px 0 20px;
  border-bottom: 3px solid var(--accent);
}

.logo {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo img {
  height: 75px;
  width: auto;
  border-radius: 12px;
}

.logo h1 {
  margin: 0;
  line-height: 1.2;
  color: #c8d5ae;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
}

.logo p {
  margin: 6px 0 0;
  color: var(--muted);
  font-style: italic;
  font-size: 0.85rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.panic-btn {
  width: auto;
  background: #b54a36;
  color: #fff;
  padding: 10px 22px;
  font-size: 1rem;
  white-space: nowrap;
  border: none;
  transition: none;
}

.panic-btn:hover {
  background: #b54a36;
  transform: none;
}

.panic-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

/* ==================== НАВИГАЦИЯ + БЕЙДЖ ==================== */

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  background: var(--panel-3);
  border: 1px solid #38402f;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  transition: all 0.2s;
}

.nav a:hover,
.nav a.is-active {
  color: #17160f;
  background: var(--panic);
  border-color: #c6a240;
}

.badge {
  border: 1px solid var(--accent);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--panel-3);
  white-space: nowrap;
  text-align: center;
  flex-shrink: 0;
}

/* ==================== ОСТАЛЬНЫЕ БЛОКИ ==================== */

.page-grid {
  display: grid;
  gap: 22px;
  padding: 20px 0 40px;
}

.section {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)), var(--panel);
  border: 1px solid rgba(122, 139, 94, 0.25);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.section h2,
.section h3 {
  margin-top: 0;
}

.section h2 {
  color: var(--panic);
  margin-bottom: 16px;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 18px;
}

.hero-card {
  background: var(--panel-2);
  border: 1px solid rgba(245, 197, 66, 0.18);
  border-radius: 12px;
  padding: 18px;
}

.hero-card__title {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.stack {
  display: grid;
  gap: 14px;
}

.list-card {
  background: var(--panel-2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 16px;
}

.list-card--compact {
  padding: 14px;
}

.list-card h3,
.list-card p {
  margin: 0;
}

.list-card p + p,
.list-card h3 + p,
.list-card__meta + h3,
.list-card__meta + p {
  margin-top: 8px;
}

.list-card__meta,
.muted {
  color: var(--muted);
  font-size: 0.84rem;
}

.archive-item {
  background: var(--panel-2);
  border-left: 4px solid var(--panic);
  border-radius: 10px;
  padding: 14px;
}

.verdict {
  margin-top: 8px;
  color: #f0c365;
  font-weight: 700;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}

.info-row:last-child {
  border-bottom: none;
}

.tool-card,
.form-card {
  background: var(--panel-2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 18px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-actions > * {
  flex: 1 1 220px;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.status-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #16171a;
  border: 1px dashed rgba(122, 139, 94, 0.5);
}

.status-box.info {
  border-style: solid;
  border-color: rgba(245, 197, 66, 0.35);
}

.status-box.success {
  border-style: solid;
  border-color: rgba(143, 179, 107, 0.45);
}

.status-box.error {
  border-style: solid;
  border-color: rgba(181, 74, 54, 0.55);
}

.empty-state {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
}

.quote-box {
  background: #17181b;
  border-left: 4px solid var(--panic);
  border-radius: 10px;
  padding: 16px;
  font-style: italic;
}

.random-tip {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 280px;
  background: #0d0d0f;
  border-left: 4px solid var(--panic);
  border-radius: 12px;
  padding: 12px 14px;
  color: #ddd7ba;
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
  z-index: 1000;
}

.hidden {
  display: none !important;
}

footer {
  padding: 20px 0 34px;
  text-align: center;
  color: #94948d;
  font-size: 0.8rem;
}

/* ==================== КАСТОМНЫЕ СКРОЛЛБАРЫ ==================== */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #1b1c20;
  border-radius: 10px;
  border: 1px solid #2c2e31;
}

::-webkit-scrollbar-thumb {
  background: #4e5a3e;
  border-radius: 10px;
  transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background: #7a8b5e;
}

::-webkit-scrollbar-corner {
  background: #1b1c20;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #4e5a3e #1b1c20;
}

/* ==================== АДАПТИВНОСТЬ ==================== */

@media (max-width: 900px) {
  .hero,
  .grid-2,
  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .nav-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .badge {
    text-align: center;
    width: fit-content;
    margin: 0 auto;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 20px, 1120px);
  }

  .section {
    padding: 18px;
  }

  .site-header {
    flex-direction: column;
    text-align: center;
  }
  
  .logo {
    flex-direction: column;
    text-align: center;
  }
  
  .top-actions {
    width: 100%;
    justify-content: center;
  }

  .random-tip {
    position: static;
    margin: 0 auto 18px;
    max-width: min(100% - 20px, 1120px);
  }

  .info-row {
    flex-direction: column;
  }
}

/* ==================== РЕЖИМ ПАНИКИ ==================== */

body.panic-mode {
  filter: blur(0.5px);
  transition: filter 0.1s ease;
}

