:root {
  /* Brand */
  --clr-primary-1: #2560ec;
  --clr-primary-2: #0b172a;
  --clr-primary-3: #3b5bdb;
  --clr-accent: #f36600;
  --clr-accent-2: #ffa037;
  --clr-danger: #d7263d;

  /* UI */
  --clr-bg-light: #eef2fa;
  --bg: #f7faff;
  --surface: #fff;
  --border: #e6e8ec;
  --text: #191919;
  --text-dim: #555;
  --text-light: #fff;

  /* Scale */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem;
  --s-4: 1rem;   --s-5: 1.5rem; --s-6: 2rem;

  --radius: 20px;
  --shadow: 0 10px 25px rgba(37,96,236,.06);
  --shadow-hover: 0 18px 44px rgba(37,96,236,.13);

  --ff: 'Inter','Plex-Ar',sans-serif;
  --trans: all .25s cubic-bezier(.4,0,.2,1);
}

/* Dark-mode overrides */
@media (prefers-color-scheme:dark) {
  :root {
    --bg: #181c23;
    --clr-bg-light: #161b22;
    --surface: #232936;
    --border: #32364b;
    --text: #f2f4fa;
    --text-dim: #a5b0d6;
    --clr-danger: var(--clr-primary-1);
    --shadow: 0 6px 24px rgba(37,96,236,.23);
    --shadow-hover: 0 14px 32px rgba(255,102,0,.18);
  }
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  min-height: 100vh;
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: var(--trans);
  letter-spacing: 0.01em;
}

/* Header */
header.site-header {
  background: linear-gradient(90deg, var(--clr-primary-1) 0%, var(--clr-primary-3) 100%);
  color: var(--text-light);
  padding: var(--s-6) 0 var(--s-4) 0;
  text-align: center;
  box-shadow: var(--shadow);
}
header.site-header h1 {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}
header.site-header p {
  margin-top: var(--s-2);
  font-size: 1.15rem;
  opacity: 0.92;
}

/* Main content */
main {
  /* flex: 1 1 auto; */
  flex-direction: column;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6) 0;
}

.container {
  width: 100%;
  max-width: 430px;
  padding: 0 var(--s-4);
  margin: 0 auto;
}

/* ========== HERO SECTION ========== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.8rem 10rem;
  margin-bottom: 1rem;
  margin-top: 2rem;
  border-radius: var(--radius);
}

.hero-title {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--clr-primary-1);
  margin-bottom: .5rem;
  letter-spacing: .5px;
  line-height: 1.19;
}

.hero-desc {
  color: var(--text-dim);
  font-size: 1.18rem;
  line-height: 1.5;
}

@media (max-width:600px) {
  .hero-title { font-size: 1.37rem; }
  .hero-desc  { font-size: 1rem; }
  .hero { padding: 2.2rem 0.3rem 1.2rem 0.3rem; margin-bottom: 1.2rem; min-height: 180px; }
}

/* Form */
#checkForm {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: box-shadow .22s;
}

#urlInput {
  flex: 1;
  padding: var(--s-5);
  font-size: 1.1rem;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: background .18s;
}
#urlInput:focus {
  background: var(--clr-bg-light);
}

#checkForm button {
  background: var(--clr-primary-1);
  color: #fff;
  font-weight: 700;
  font-size: 1.08rem;
  padding: 0 var(--s-6);
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background .22s;
}
#checkForm button:hover {
  background: var(--clr-primary-3);
}

/* Result Box */
#resultBox {
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  font-size: 1.07rem;
  color: var(--text);
  transition: var(--trans);
  display: none;
  min-height: 54px;
  padding: var(--s-5) var(--s-4);
  word-break: break-word;
}

.result-success   { border-left: 6px solid var(--clr-primary-1);}
.result-warning   { border-left: 6px solid var(--clr-accent);}
.result-danger    { border-left: 6px solid var(--clr-danger);}
.result-neutral   { border-left: 6px solid var(--border);}

/* Footer */
footer {
  text-align: center;
  color: var(--text-dim);
  font-size: .97rem;
  margin-top: auto;
  padding-bottom: 12px;
  letter-spacing: .01em;
  user-select: none;
}

/* Links */
a {
  color: var(--clr-primary-1);
  text-decoration: none;
  transition: color .18s;
}
a:hover {
  color: var(--clr-accent);
}

/* Responsive */
@media (max-width: 600px) {
  header.site-header h1 { font-size: 1.25rem; }
  .container { max-width: 100%; padding: 0 var(--s-2);}
  #checkForm { flex-direction: column; border-radius: var(--radius);}
  #urlInput {
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 1rem;
    padding: var(--s-5) var(--s-4);
    min-height: 54px;
  }
  #checkForm button {
    width: 100%;
    border-radius: 0 0 var(--radius) var(--radius);
    font-size: 1rem;
    padding: var(--s-5) 0;
    min-height: 54px;
    margin-top: -1.5px;
  }
  #resultBox { font-size: 1rem; }
}

/* ─────────────────────────────── */
/* Language Switcher Styles        */
/* ─────────────────────────────── */
.lang-switcher{
  position:absolute;top:22px;right:32px;z-index:10;user-select:none;
  font-family:inherit;
}
[dir="rtl"] .lang-switcher{right:auto;left:32px;}

.lang-switcher-btn{
  display:flex;align-items:center;gap:8px;
  background:var(--surface);color:var(--text);
  border:1.5px solid var(--border);border-radius:12px;
  font-size:1.04rem;font-weight:600;
  padding:8px 24px 8px 16px;cursor:pointer;
  box-shadow:var(--shadow);transition:var(--trans);
}
.lang-switcher-btn:hover,
.lang-switcher-btn:focus{
  background:var(--clr-bg-light);
}

.lang-switcher-list{
  position:absolute;right:0;margin-top:4px;display:none;
  min-width:140px;background:var(--surface);
  border:1.5px solid var(--border);border-radius:12px;
  box-shadow:var(--shadow);padding:4px 0;font-size:1.03rem;
}
[dir="rtl"] .lang-switcher-list{right:auto;left:0;}
.lang-switcher.open .lang-switcher-list{display:block;}

.lang-switcher-list button{
  width:100%;text-align:left;padding:8px 20px;
  background:none;border:none;color:var(--text);
  cursor:pointer;font-family:inherit;font-size:1em;
  transition:background .13s;
}
.lang-switcher-list button:hover,
.lang-switcher-list button:focus{
  background:var(--clr-bg-light);color:var(--clr-primary-1);
}
.lang-switcher-ico{width:1.2em;height:1.2em;opacity:.85;}

@media (max-width:600px){
  .lang-switcher{
    position:fixed;top:auto;bottom:20px;right:20px;
    z-index:999;
  }
  [dir="rtl"] .lang-switcher{right:auto;left:20px;}
  .lang-switcher-btn{
    padding:12px;border-radius:50%;box-shadow:var(--shadow-hover);
  }
  .lang-switcher-btn .lang-code{display:none;}
  .lang-switcher-list{
    right:0;bottom:52px;
  }
  [dir="rtl"] .lang-switcher-list{left:0;right:auto;}
}
