:root{
  --bg:#07070c;
  --panel:#101019;
  --text:#f5f5ff;
  --muted:#b8b8d2;
  --accent:#8a2be2;
  --accent2:#5f2cff;
  --line:rgba(255,255,255,.10);
}

*{box-sizing:border-box}
html, body { width:100%; overflow-x:hidden; }

body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background: radial-gradient(900px 500px at 50% 0%, rgba(138,43,226,.28), transparent 55%), var(--bg);
  color:var(--text);
}

.container{
  max-width:900px;
  margin:0 auto;
  padding:50px 16px 60px;
  text-align:center;
}

/* Prevent “cut off” gradients/text on small screens */
h1{
  font-size:54px;
  line-height:1.05;
  margin:0 0 8px;
  padding:0 2px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  font-weight:900;
  word-break:break-word;
}

.subtitle{
  margin:0 0 26px;
  color:var(--muted);
  font-size:18px;
  line-height:1.35;
}

.input-box{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:stretch;
  justify-content:center;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(16,16,25,.7);
}

input{
  flex:1 1 280px;
  min-width:0;              /* IMPORTANT: prevents overflow on iOS */
  padding:16px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.35);
  color:var(--text);
  font-size:16px;
  outline:none;
}
input:focus{
  border-color: rgba(138,43,226,.65);
  box-shadow:0 0 0 4px rgba(138,43,226,.18);
}

button{
  flex:0 0 auto;
  padding:16px 18px;
  border-radius:12px;
  border:1px solid rgba(138,43,226,.6);
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  color:white;
  font-weight:800;
  font-size:16px;
  cursor:pointer;
}

#results{
  margin:18px auto 0;
  text-align:left;
  padding:18px;
  background: rgba(16,16,25,.65);
  border:1px solid var(--line);
  border-radius:16px;
  color:var(--muted);

  /* Mobile safety */
  overflow-wrap:anywhere;
  word-break:break-word;
}

.check{
  padding:14px;
  background: rgba(0,0,0,.25);
  border:1px solid var(--line);
  border-radius:12px;
  margin:12px 0;
}

.check h3{
  margin:0 0 8px;
  color:var(--text);
  font-size:16px;
  line-height:1.25;
}

footer{
  margin-top:26px;
  padding:20px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(16,16,25,.65);
  text-align:center;
}

.cta{
  display:inline-block;
  padding:12px 18px;
  background: rgba(138,43,226,.18);
  border:1px solid rgba(138,43,226,.55);
  color:var(--text);
  border-radius:12px;
  text-decoration:none;
  font-weight:800;
  margin-top:8px;
}

.fineprint{
  opacity:.75;
  margin-top:18px;
  font-size:.92rem;
  line-height:1.45;
  color:var(--muted);
  text-align:left;
}

/* ✅ MOBILE FIX PACK */
@media (max-width: 520px){
  .container{
    padding:28px 12px 44px;
  }

  h1{
    font-size:38px;
    letter-spacing:-0.2px;
  }

  .subtitle{
    font-size:15px;
    margin-bottom:16px;
  }

  .input-box{
    padding:12px;
    gap:10px;
  }

  input{
    flex:1 1 100%;
    padding:14px 12px;
    font-size:16px;
  }

  button{
    width:100%;
    padding:14px 14px;
    font-size:16px;
  }

  #results{
    padding:14px;
  }

  footer{
    padding:16px;
  }

  .cta{
    width:100%;
    text-align:center;
  }
}

/* Optional: reduce motion/overflow edge cases on iOS */
@supports (-webkit-touch-callout: none) {
  body { -webkit-text-size-adjust: 100%; }
}