/* =========================================================
   iHACKER — robots.txt Checker
   Red console theme · style.css  (v3, matches checker.css)
   ========================================================= */

:root {
  --bg:        #0B0B0D;
  --bg-2:      #111013;
  --surface:   #17161A;
  --surface-2: #1F1D22;
  --border:    #2C2A30;
  --border-2:  #413E46;

  --text:      #F1F1F3;
  --text-dim:  #A0A0A8;
  --text-mute: #6E6E78;

  --red:        #DD0000;
  --red-bright: #FF2020;
  --red-deep:   #A60000;
  --red-soft:   rgba(221, 0, 0, 0.12);
  --red-line:   rgba(221, 0, 0, 0.45);
  --red-glow:   rgba(221, 0, 0, 0.30);

  --green:      #22C55E;
  --green-soft: rgba(34, 197, 94, 0.12);
  --amber:      #F59E0B;
  --amber-soft: rgba(245, 158, 11, 0.12);

  --font-ui:   'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  padding: 0 0 40px;
  font-family: var(--font-ui);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 520px at 50% -10%, var(--red-soft), transparent 68%),
    linear-gradient(var(--bg-2), var(--bg));
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--red-bright);
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 5px;
}

/* ---------- Main container ---------- */

.main-container {
  max-width: 1120px;
  width: 95%;
}
.main-container p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
  text-align: left;
}
.main-container a {
  text-decoration: none;
  color: var(--red-bright);
  font-weight: 600;
}
.main-container a:hover { text-decoration: underline; }
.main-container ul,
.main-container ol { color: var(--text-dim); line-height: 1.7; font-size: 14px; }

/* ---------- Panels ---------- */

.container {
  max-width: 1120px;
  margin: 22px auto;
  padding: 26px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

h1, h2, h3 { color: var(--text); letter-spacing: -0.4px; }
h1 {
  font-size: clamp(24px, 5vw, 34px);
  margin: 2px 0 20px;
  font-weight: 700;
  text-align: center;
  color: var(--red);
  text-shadow: 0 0 30px var(--red-glow);
}
h2 { font-size: 21px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 17px; font-weight: 600; margin: 22px 0 8px; color: var(--text); }

/* ---------- Form ---------- */

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}
form label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .4px;
  color: var(--text-dim);
}

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

.input-wrap {
  flex: 1 1 260px;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .prompt {
  position: absolute;
  left: 16px;
  color: var(--red-bright);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}

#rtInput {
  width: 100%;
  padding: 15px 44px 15px 84px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
#rtInput::placeholder { color: var(--text-mute); }
#rtInput:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.input-clear {
  position: absolute;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.input-clear:hover { color: #fff; background: var(--surface-2); }

/* ---------- Buttons ---------- */

.start-check {
  padding: 15px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .2px;
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--red-glow);
  transition: background .2s, transform .12s, opacity .2s;
}
.start-check:hover:not(:disabled) { background: var(--red-bright); }
.start-check:active:not(:disabled) { transform: scale(.985); }
.start-check:disabled,
.start-check.busy { opacity: .6; cursor: progress; }

/* ---------- Progress + summary ---------- */

.progress {
  height: 6px;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0 10px;
}
.progress[hidden] { display: none; }
.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red-deep), var(--red-bright));
  border-radius: 999px;
  transition: width .25s ease;
}
.summary {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin: 2px 0 6px;
}
.summary[hidden] { display: none; }
.summary b { color: var(--text); font-weight: 600; }
.summary .muted { color: var(--text-mute); }
.summary.warn { color: var(--amber); }

/* ---------- Form error ---------- */

.form-err {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #FFB3B3;
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  border-radius: 10px;
  padding: 10px 13px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  line-height: 1.5;
}

/* ---------- Turnstile ---------- */

.cf-turnstile { margin: 4px auto; }

/* ---------- Result header (op-head) ---------- */

.op-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.op-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 2px solid var(--border-2);
  object-fit: contain;
  padding: 7px;
  flex: 0 0 auto;
}
.op-logo.ph {
  display: grid;
  place-items: center;
  color: var(--red-bright);
  font-size: 26px;
}
.op-ht { min-width: 0; flex: 1; }
.op-ht .num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-mute);
  margin-bottom: 3px;
  word-break: break-all;
}
.op-ht h2 {
  margin: 0;
  font-size: clamp(22px, 4.5vw, 28px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}
.op-ht .subline {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-top: 2px;
  word-break: break-word;
}
.op-ht .subline b { color: var(--text); }

/* ---------- Result grid cells ---------- */

.op-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.op-cell {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-left-width: 4px;
  border-radius: 12px;
  padding: 13px 15px;
  min-width: 0;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.op-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,.4);
}
.op-cell.hero { border-left-color: var(--green); }
.op-cell .k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.op-cell .k i { color: var(--red-bright); font-size: 8px; }
.op-cell .v {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  line-height: 1.3;
}
.op-cell .v.mono { font-family: var(--font-mono); font-size: 15px; }

/* ---------- Section headings ---------- */

.sec-h {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 22px 2px 12px;
}
.sec-h::before { content: "# "; color: var(--red); }
.sec-h:first-of-type { margin-top: 18px; }

/* ---------- Redirect chain ---------- */

.chain {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.chain li {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-left-width: 4px;
  border-left-color: var(--amber);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-dim);
  word-break: break-all;
}
.chain li code {
  background: transparent;
  color: var(--red-bright);
  padding: 0;
  font-size: 12px;
}
.chain li i { color: var(--text-mute); margin: 0 6px; font-size: 11px; }

/* ---------- Parsed groups ---------- */

.group {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.group-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.group-h .ua {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--red-bright);
  letter-spacing: .3px;
}
.group-h .cd {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--amber);
  background: var(--amber-soft);
  padding: 3px 9px;
  border-radius: 6px;
}

.rules {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rules li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.rules li .t {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 5px;
}
.rules li.allow .t { background: var(--green-soft); color: var(--green); }
.rules li.disallow .t { background: rgba(221, 0, 0, .18); color: #FF7070; }
.rules li .p { color: var(--text); word-break: break-all; flex: 1; }

.muted {
  font-size: 12.5px;
  color: var(--text-mute);
  margin: 8px 0 0;
  line-height: 1.55;
}
.muted b { color: var(--text-dim); font-weight: 600; }

/* ---------- Warnings ---------- */

.warn {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-family: var(--font-mono);
}
.warn li {
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, .35);
  border-radius: 10px;
  padding: 9px 13px;
  color: #FCD34D;
}

/* ---------- URL tests table ---------- */

.tests {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.tests thead th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-mute);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.tests tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
.tests tbody tr:last-child td { border-bottom: 0; }
.tests tbody td code { background: transparent; color: var(--text); padding: 0; font-size: 12.5px; }
.tests .ok {
  color: var(--green);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tests .no {
  color: #FF7070;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Result actions ---------- */

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.result-actions button,
.result-actions a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .15s;
}
.result-actions button:hover,
.result-actions a:hover { border-color: var(--red); color: #fff; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  opacity: 0;
  z-index: 999;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0,0,0,.5);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- FAQ ---------- */

.faq { margin-top: 6px; }
.faq details {
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 42px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--red-bright);
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.6;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  margin: 16px 2px 2px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { color: var(--red-bright); }
.breadcrumb span[aria-current] { color: var(--text); }

/* ---------- Tool sub ---------- */

.tool-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  margin: -10px 0 18px;
}

/* ---------- Filter safety ---------- */

.card[hidden] { display: none !important; }

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .container { padding: 18px; }
  .head h1 { margin-bottom: 14px; }
  .op-ht .subline { font-size: 12.5px; }
  .tests { font-size: 11.5px; }
  .tests thead th,
  .tests tbody td { padding: 8px 10px; }
}
@media (max-width: 400px) {
  .search-row .start-check { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}