:root{
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #f97316; /* orange */
  --accent2:#fff7ed;
  --shadow: 0 12px 30px rgba(15,23,42,.08);
}

html[data-theme="dark"]{
  --bg:#0b1220;
  --panel:#0f172a;
  --text:#e5e7eb;
  --muted:#a8b2c1;
  --border:#22314a;
  --accent:#f97316;
  --accent2:#1a2336;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height:1.5;
}
a{ color: var(--text); text-decoration: none; }
a:hover{ text-decoration: underline; }

.skip-link{
  position:absolute; left:-999px; top:auto;
  width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:16px; top:16px; width:auto; height:auto;
  background: var(--panel); border:1px solid var(--border);
  padding:10px 12px; border-radius:10px; z-index:999;
}

.container{
  width:min(1100px, 92vw);
  margin:0 auto;
}

.topbar{
  position: sticky;
  top:0;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
  z-index: 1000;
}
html[data-theme="dark"] .topbar{
  background: rgba(11,18,32,.75);
}
.topbar__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 0;
  gap:14px;
}

.brand{ display:flex; align-items:center; gap:10px; }
.brand__logo{ border-radius:10px; background: var(--accent2); padding:6px; border:1px solid var(--border); }
.brand__name {
  font-weight: 800;      /* Extra-bold */
  font-size: 1.45rem;    /* Slightly bigger to match logo height */
  line-height: 1;
}
.brand__tagline{ font-size:12px; color: var(--muted); }

.topbar__controls{ display:flex; gap:10px; align-items:center; }

.lang{ position:relative; }
.lang__btn{
  display:flex; align-items:center; gap:8px;
  border:1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
  box-shadow: none;
}
.lang__btn svg {
  margin-left: 4px;
}
.lang__list{
  position:absolute; right:0; top:46px;
  width:220px;
  background: var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:6px;
  margin:0;
  list-style:none;
  box-shadow: var(--shadow);
  display:none;
  z-index: 900;
}
.lang__list[data-open="true"]{ display:block; }
.lang__list li{
  display:flex; align-items:center; gap:10px;
  padding:10px 10px;
  border-radius:10px;
  cursor:pointer;
}
.lang__list li:hover{
  background: var(--accent2);
}

.theme{
  border:1px solid var(--border);
  background: var(--panel);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme svg {
  display: block;
  color: #0a398a
}

.hero{ padding:28px 0 14px; }
.card{
  background: var(--panel);
  border:1px solid var(--border);
  border-radius:18px;
  padding:18px;
  box-shadow: var(--shadow);
}

.text-center {
  text-align: center;
}
.h1{ margin:0 0 6px; font-size:28px; letter-spacing:-.02em; }
.h2{ margin:0 0 10px; font-size:18px; }
.sub{ margin:0 0 14px; color: var(--muted); }

.form{ margin-top:8px; }
.label{ display:block; font-weight:600; margin-bottom:8px; }
.row{
  display:flex; gap:10px; align-items:stretch;
}
.input{
  flex:1;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: transparent;
  color: var(--text);
  outline:none;
}
.input:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249,115,22,.18);
}
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--accent);
  background: var(--accent);
  color: #111827;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
.btn:disabled{
  opacity:.65;
  cursor:not-allowed;
}

.status{
  display:flex; align-items:center; gap:10px;
  margin-top:12px;
  padding:10px 12px;
  border-radius:14px;
  border:1px dashed var(--border);
  color: var(--muted);
}
.dot{
  width:10px; height:10px; border-radius:99px;
  background: var(--accent);
}
.spinner{
  width:14px; height:14px;
  border-radius:99px;
  border:2px solid var(--border);
  border-top-color: var(--accent);
  display:none;
  animation: spin 1s linear infinite;
  margin-left:auto;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

.fineprint{ margin:10px 0 0; font-size:12px; color: var(--muted); }

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  padding:14px 0;
}
.list{ margin:0; padding-left:18px; color: var(--muted); }
.list li{ margin:8px 0; }

.faq{ border-top:1px solid var(--border); padding:10px 0; }
.faq:first-of-type{ border-top:0; }
.faq summary{ cursor:pointer; font-weight:700; }
.faq p{ margin:8px 0 0; color: var(--muted); }

.toggleRow{
  margin-top:14px;
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  padding-top:10px;
  border-top:1px solid var(--border);
  color: var(--muted);
}
.toggle{
  border:1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius:999px;
  padding:8px 14px;
  cursor:pointer;
  font-weight:700;
}

.footer{
  margin-top:22px;
  border-top:1px solid var(--border);
  padding:18px 0 26px;
}
/* Make footer content stack vertically and center everything */
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px; /* Nice spacing between the three blocks */
}
.footer__disc{ margin:0; color: var(--muted); font-size:13px; }
/* Make the navigation links wrap nicely and stay centered */
.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px; /* Space between links */
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer__fine{ margin:0; color: var(--muted); font-size:12px; }

.hidden{ display:none; }

@media (max-width: 860px){
  .grid{ grid-template-columns: 1fr; }
  .row{ flex-direction:column; }
  .btn{ width:100%; justify-content:center; }
}
/* Optional: slight visual improvement for links on small screens */
@media (max-width: 480px) {
  .footer__links {
    gap: 14px 20px;
  }
}

.srOnly{
  position:absolute !important;
  height:1px; width:1px;
  overflow:hidden;
  clip:rect(1px,1px,1px,1px);
  white-space:nowrap;
}

.select{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  outline:none;
  min-width: 110px;
}
.select:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249,115,22,.18);
}

.result{
  margin-top: 14px;
  border-top:1px solid var(--border);
  padding-top: 14px;
}
.result__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 10px;
}
.result__label{
  font-size:12px;
  color: var(--muted);
  font-weight:600;
}
.result__title{
  font-weight:800;
  font-size:16px;
  margin-top: 2px;
}
.result__meta{
  font-size:12px;
  color: var(--muted);
  margin-top: 2px;
}

.tableWrap{
  overflow:auto;
  border:1px solid var(--border);
  border-radius:14px;
}
.qTable{
  width:100%;
  border-collapse:collapse;
  min-width: 520px;
  background: var(--panel);
}
.qTable th, .qTable td{
  padding:12px 12px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:middle;
}
.qTable th{
  font-size:12px;
  color: var(--muted);
  font-weight:700;
  background: var(--accent2);
}
.qTable tr:last-child td{ border-bottom:0; }

.right{ text-align:right; }

.btnSmall{
  padding:10px 12px;
  border-radius:12px;
  font-weight:800;
}
.btnGhost{
  border:1px solid var(--border);
  background: transparent;
  color: var(--text);
}
.btnGhost:hover{ background: var(--accent2); }

.badge{
  display:inline-block;
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  margin-left: 8px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center; /* centers heading + icon */
  text-align: center;      /* ensures multi-line text is centered */
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.section-title .icon {
  width: 28px;
  height: 28px;
  stroke: #ff4500;
  flex-shrink: 0;
}

.footer__sister-sites a {
  font-weight: 500;
  transition: color 0.2s;
}
@media (max-width: 480px) {
  .sm-hidden { display: none; }
}

/* ─────── FINAL FIX: Paste button ALWAYS on top of language dropdown ─────── */
.input-wrapper {
  position: relative;
  flex: 1;
  z-index: 0;                     /* important: keep input normal */
}

.btn-paste {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--panel);
  color: var(--accent);
  border: 1.8px solid var(--accent);
  border-radius: 12px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;                  /* wins against everything */
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(249,115,22,.2);
}

.btn-paste:hover,
.btn-paste:focus {
  background: var(--accent);
  color: white;
  transform: translateY(-50%) scale(1.08);
}

/* Input padding – perfect, no text gets hidden */
#urlInput {
  padding-right: 62px !important;   /* exactly fits the 40px button + spacing */
  width: 100%;
}

/* Force language dropdown BELOW the paste button */
.lang {
  position: relative;
  z-index: 100;                   /* dropdown container */
}

.lang__list {
  z-index: 90 !important;         /* lower than paste button (9999) */
}