:root {
  --bg-primary: #0e0e11;
  --bg-panel: #16161c;
  --border: #252528;
  --accent: #24ffd1;
  --accent-alt: #ff2a45;
  --text: #e4e4e7;
  --muted: #9ca3af;
  --success: #46ff80;
  --warning: #ffdc63;
  --neutral: #3a3a40;
}

body {
  background: var(--bg-primary);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  margin: 0;
  line-height: 1.6;
}

.mono { font-family: 'Share Tech Mono', monospace; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-alt); }

.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
}

.logo { font-size: 1.4rem; letter-spacing: 0.5px; }
.logo .accent { color: var(--accent); }

.top-nav a {
  margin: 0 1rem;
  color: var(--text);
  opacity: 0.8;
}
.top-nav a:hover { opacity: 1; }

.cta-onion {
  background: var(--accent);
  color: #000;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
}

.container { display: flex; max-width: 1440px; margin: 0 auto; padding: 2rem; }

.sidebar {
  width: 260px;
  margin-right: 2rem;
  background: var(--bg-panel);
  border-radius: 10px;
  padding: 1.5rem;
}

.nav-block .nav-link {
  display: block;
  margin: 0.2rem 0;
  padding: 0.5rem;
  color: var(--text);
  border-radius: 6px;
}
.nav-block .nav-link.active, .nav-block .nav-link:hover {
  background: var(--neutral);
  color: var(--accent);
}

.status-panel {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  font-size: 0.9rem;
}

.status-item { margin: 0.3rem 0; }
.status-item.success { color: var(--success); }
.status-item.warning { color: var(--accent); }
.status-item.idle { color: var(--muted); }

main { flex: 1; }

.hero-block {
  background: var(--bg-panel);
  border-radius: 10px;
  padding: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}
.hero-content { max-width: 70%; }
.hero-stats { text-align: right; }

.btn-primary {
  background: var(--accent);
  color: #000;
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
}

.panel { background: var(--bg-panel); padding: 2rem; border-radius: 10px; margin-bottom: 2rem; border: 1px solid var(--border); }

.card-grid { display: grid; gap: 2rem; }
.card-grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.guide-card {
  background: var(--neutral);
  border-radius: 8px;
  padding: 1.5rem;
  transition: 0.2s all ease-in-out;
}
.guide-card:hover { transform: translateY(-4px); background: var(--border); }

.card-icon { font-size: 2rem; color: var(--accent); }

.badge {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
}
.badge.success { background: rgba(70,255,128,0.15); color: var(--success); }
.badge.warning { background: rgba(255,220,99,0.15); color: var(--warning); }
.badge.neutral { background: rgba(255,255,255,0.1); color: var(--text); }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  padding: 2rem;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
}
.footer-col h3 { margin-bottom: 1rem; }
.footer-col ul { padding: 0; list-style: none; line-height: 1.8; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--accent); }

.footer-4 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: 2.5rem;
}

.footer-col.about p {
  color: var(--muted);
  max-width: 320px;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* === ONION LINKS & COPY BUTTONS === */

.onion-input,
.fingerprint {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: 'Share Tech Mono', monospace;
  width: 100%;
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.6rem;
  outline: none;
  transition: 0.15s ease-in-out;
}

.onion-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(36, 255, 209, 0.15);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.copy-btn:hover {
  background: var(--accent-alt);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(255, 42, 69, 0.35);
}

.copy-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* For fingerprint block styling */
.fingerprint-block {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 1rem 1.2rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.fingerprint {
  font-size: 0.95rem;
  word-spacing: 4px;
  color: var(--accent);
  background: transparent;
  border: none;
  margin: 0.6rem 0;
}

.copy-btn i {
  font-size: 0.85rem;
}

/* Optional subtle animation for successful copy (visual feedback) */
.copy-btn.copied {
  background: var(--success);
  color: #000;
}

.copy-btn.copied i::before {
  content: "\f00c"; /* checkmark icon */
}
/* === TEXT WRAPPING FIXES FOR CARDS === */

.card-content,
.card-list,
.guide-card,
.guide-card p,
.guide-card ul li {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  line-break: anywhere;
  hyphens: auto;
}

.card-content p,
.card-list li {
  line-height: 1.6;
  font-size: 0.95rem;
}

.onion-input,
.fingerprint {
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

/* Optional: prevent button/icon overflow inside cards */
.copy-btn,
.card-icon,
h3.mono {
  flex-shrink: 0;
}

/* Maintain card layout and padding integrity */
.card-grid--2 .guide-card,
.card-grid--3 .guide-card {
  min-width: 0; /* critical for flex/grid child overflow fix */
}

.card-grid {
  align-items: stretch;
}
/* === HERO BLOCK WRAPPING FIX === */

.hero-block {
  display: flex;
  flex-wrap: wrap;            /* ✅ разрешаем перенос элементов */
  gap: 1.5rem;                /* добавляем ровный отступ */
  justify-content: space-between;
  align-items: flex-start;
}

.hero-content {
  flex: 1 1 600px;            /* адаптивная ширина */
  min-width: 320px;
  white-space: normal;        /* ✅ возвращаем перенос текста */
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.hero-content p {
  line-height: 1.7;
  margin-top: 1rem;
  font-size: 1rem;
  max-width: 800px;
}

.hero-stats {
  flex: 0 1 200px;
  text-align: right;
  white-space: normal;        /* ✅ перенос бейджей при узком экране */
}

.hero-stats .badge {
  display: inline-block;
  margin-left: 0.3rem;
  margin-top: 0.3rem;
}
/* --- force text wrapping even with non-breaking spaces --- */
.hero-block, .panel, .guide-card p, .guide-card, main {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}
/* === FOOTER TEXT WRAP FIX === */

.footer-col p,
.footer-col li,
.footer-col a {
  white-space: normal;           /* вернуть стандартный перенос */
  word-wrap: break-word;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.footer-col.about p {
  max-width: 340px;              /* ограничить ширину для читаемости */
  hyphens: auto;                 /* включить мягкие переносы */
  word-break: break-word;
}
