:root{
  --bg1:#0b0f1a;
  --bg2:#060814;
  --card: rgba(255,255,255,0.06);
  --stroke: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(59,130,246,0.25), transparent 60%),
    radial-gradient(900px 600px at 80% 30%, rgba(168,85,247,0.20), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  min-height: 100vh;
}

.wrap{
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 18px 40px;
}

/* HERO */
.hero{
  text-align:center;
  margin-bottom: 18px;
}
.brand{
  display:inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke);
  font-weight: 800;
  letter-spacing: 0.2px;
}
h1{
  margin: 14px 0 10px;
  font-size: 34px;
  line-height: 1.08;
}
.sub{
  margin: 0 auto;
  max-width: 780px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* TOOLS SECTION */
.toolsHome{
  margin: 18px 0 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 18px;
}

.toolsHeader{
  text-align:center;
  margin-bottom: 12px;
}
.toolsTitle{
  margin: 0;
  font-size: 22px;
}
.toolsSub{
  margin: 6px auto 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 14px;
}

.toolsGrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 900px){
  .toolsGrid{ grid-template-columns: 1fr; }
}

.toolCard{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}
.toolIcon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(59,130,246,0.22);
  border: 1px solid rgba(59,130,246,0.35);
  font-size: 20px;
  margin-bottom: 10px;
}
.toolIcon.alt{
  background: rgba(168,85,247,0.22);
  border-color: rgba(168,85,247,0.35);
}

.toolCard h3{
  margin: 0 0 6px;
  font-size: 18px;
}
.toolCard p{
  margin: 0 0 12px;
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  line-height: 1.5;
}

.toolActions{
  display:flex;
  gap: 10px;
}
.toolBtn{
  display:inline-block;
  width: 100%;
  text-align:center;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(59,130,246,0.22);
  border: 1px solid rgba(59,130,246,0.40);
  color: rgba(255,255,255,0.92);
  text-decoration:none;
  font-weight: 800;
  transition: all .2s ease;
}
.toolBtn:hover{
  background: rgba(59,130,246,0.32);
}
.toolBtn.alt{
  background: rgba(168,85,247,0.22);
  border-color: rgba(168,85,247,0.40);
}
.toolBtn.alt:hover{
  background: rgba(168,85,247,0.32);
}

/* GENERATOR CARD */
.card{
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}
.cardHead{
  text-align:center;
  margin-bottom: 12px;
}
.cardTitle{
  margin: 0 0 6px;
  font-size: 22px;
}
.cardSub{
  margin: 0 auto;
  max-width: 780px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
}

.label{
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 8px;
}

.file{
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.previewWrap{
  margin-top: 12px;
  display:flex;
  justify-content:center;
  align-items:center;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
  padding: 10px;
}
.previewWrap img{
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 14px;
  display:block;
}

.byok{
  margin-top: 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.byok label{
  font-size: 13px;
  opacity: 0.85;
}
.byok input{
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  outline: none;
}
.byok input:focus{
  border-color: rgba(59,130,246,0.45);
}
.byok-note{
  font-size: 12px;
  opacity: 0.7;
  line-height: 1.35;
}

.btn{
  margin-top: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(59,130,246,0.20);
  color: var(--text);
  font-weight: 800;
  cursor:pointer;
}
.btn:hover{ background: rgba(59,130,246,0.28); }
.btn:disabled{ opacity: 0.55; cursor:not-allowed; }

.btn.ghost{
  background: rgba(255,255,255,0.06);
}
.btn.ghost:hover{ background: rgba(255,255,255,0.10); }

.progressWrap{
  margin-top: 12px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  overflow:hidden;
}
.progressBar{
  height: 100%;
  width: 0%;
  background: rgba(34,197,94,0.75);
  transition: width 0.2s ease;
}

.status{
  margin-top: 10px;
  font-size: 13px;
  opacity: 0.8;
}

.resultTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom: 8px;
}
.count{
  font-size: 12px;
  opacity: 0.75;
}
.textarea{
  width:100%;
  min-height: 300px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,0.22);
  color: var(--text);
  outline:none;
  resize: vertical;
}

.actions{
  margin-top: 12px;
  display:flex;
  gap: 10px;
}

.trust{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display:flex;
  gap: 14px;
  flex-wrap:wrap;
  color: rgba(255,255,255,0.70);
  font-size: 12px;
}

/* FOOTER */
.footer{
  margin-top: 18px;
  display:flex;
  justify-content:center;
  gap: 10px;
  flex-wrap:wrap;
  color: rgba(255,255,255,0.70);
  font-size: 13px;
}
.footer a{
  color: rgba(255,255,255,0.80);
  text-decoration:none;
}
.footer a:hover{ text-decoration: underline; }

/* Notice */
.notice{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
}
.notice.success{
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.12);
}
.notice.info{
  border-color: rgba(59,130,246,0.35);
  background: rgba(59,130,246,0.12);
}
.notice.error{
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.12);
}
.notice small{
  display:block;
  opacity:0.8;
  margin-top:6px;
}
