:root{
  --bg:#f5f7fa;
  --card:#ffffff;
  --border:#e5e7eb;
  --text:#111827;
  --muted:#6b7280;
  --accent:#f97316;
  --accent2:#fb923c;
  --shadow: 0 12px 30px rgba(0,0,0,0.06);
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  background: radial-gradient(1200px 600px at 20% 0%, #fff7ed 0%, var(--bg) 55%);
  color:var(--text);
}

.container{
  max-width:1100px;
  margin:auto;
  padding:0 16px;
}

/* Topbar */
.topbar{
  position:sticky;
  top:0;
  z-index:10;
  background: rgba(245,247,250,0.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.brand-mark{
  width:36px;
  height:36px;
  border-radius:12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:800;
  letter-spacing:1px;
  box-shadow: 0 8px 18px rgba(249,115,22,0.25);
}

.brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.brand-text span{
  font-size:12px;
  color:var(--muted);
}

.nav{
  display:flex;
  gap:14px;
}

.nav a{
  text-decoration:none;
  font-weight:600;
  font-size:13px;
  color:#374151;
  padding:8px 10px;
  border-radius:10px;
}

.nav a:hover{
  background:#fff;
  border:1px solid var(--border);
}

/* Hero */
.hero{
  padding:26px 0 18px;
}

.hero-inner{
  display:grid;
  grid-template-columns: 1.4fr 1fr;
  gap:18px;
  align-items:stretch;
}

.hero h1{
  margin:0 0 8px;
  font-size:34px;
  letter-spacing:-0.5px;
}

.subtitle{
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

.hero-badges{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.badge{
  font-size:12px;
  font-weight:700;
  color:#7c2d12;
  background:#ffedd5;
  border:1px solid #fed7aa;
  padding:6px 10px;
  border-radius:999px;
}

.hero-card{
  background:rgba(255,255,255,0.8);
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px 14px 12px;
  box-shadow: var(--shadow);
}

.hero-card-title{
  font-weight:800;
  margin-bottom:8px;
}

.quick-steps{
  margin:0;
  padding-left:18px;
  color:#374151;
  line-height:1.6;
  font-size:13px;
}

.mini-note{
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}

/* Layout */
.layout{
  display:flex;
  gap:18px;
  padding:16px 0 10px;
}

.layout > .card{
  width:50%;
  min-width:0;
}

@media(max-width:900px){
  .hero-inner{
    grid-template-columns: 1fr;
  }
  .layout{
    flex-direction:column;
  }
  .layout > .card{
    width:100%;
  }
}

/* Cards */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
  box-shadow: var(--shadow);
}

/* Tool Card */
.tool-head{
  margin-bottom:10px;
}

.card-title{
  margin:0;
  font-size:18px;
}

.card-subtitle{
  margin:4px 0 0;
  font-size:13px;
  color:var(--muted);
}

.toolbar-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:10px;
}

/* Buttons */
.tool{
  border:1px solid var(--border);
  background:#fff;
  padding:8px 12px;
  border-radius:12px;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  position:relative;
  transition: 0.18s ease;
}

.tool:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}

.tool:active{
  transform: translateY(0px);
  box-shadow:none;
}

.tool-primary{
  border-color:#fed7aa;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#fff;
}

.tool-primary:hover{
  box-shadow: 0 12px 25px rgba(249,115,22,0.25);
}

/* Tooltip (Fixed) */
.smart-tooltip{
  position:absolute;
  background:#111827;
  color:#fff;
  font-size:12px;
  padding:6px 10px;
  border-radius:8px;
  white-space:nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  display:none;
  z-index:9999;
  pointer-events:none;
  transition: opacity 0.15s ease;
}

/* Textarea */
textarea{
  width:100%;
  min-height:320px;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  font-size:15px;
  line-height:1.6;
  resize:vertical;
  outline:none;
}

textarea:focus{
  border-color:#fdba74;
  box-shadow: 0 0 0 4px rgba(251,146,60,0.18);
}

/* Footer row */
.footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:12px;
}

.counter{
  font-size:12px;
  color:var(--muted);
}

/* Copy button */
.copy{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#fff;
  border:none;
  padding:10px 16px;
  border-radius:14px;
  font-weight:800;
  cursor:pointer;
  transition:0.2s;
  box-shadow: 0 10px 20px rgba(249,115,22,0.22);
}

.copy:hover{
  transform: translateY(-1px);
}

.copy.copied{
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 10px 20px rgba(34,197,94,0.18);
}

/* Micro help */
.micro-help{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fafafa;
}

.micro-help-title{
  font-weight:800;
  margin-bottom:6px;
}

.micro-help ul{
  margin:0;
  padding-left:18px;
  color:#374151;
  font-size:13px;
  line-height:1.6;
}

/* Preview */
.preview-card{
  padding:16px;
}

.preview-header{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

.avatar{
  width:42px;
  height:42px;
  border-radius:50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:900;
  font-size:13px;
  letter-spacing:1px;
  box-shadow: 0 10px 20px rgba(249,115,22,0.18);
}

.preview-title{
  font-weight:900;
}

.meta{
  font-size:12px;
  color:var(--muted);
}

.preview-surface{
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  min-height: 360px;
}

.preview-text{
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size:15px;
  line-height:1.6;
}

.preview-footer{
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid var(--border);
  font-size:12px;
  color:var(--muted);
}

/* Content sections */
.content-section{
  padding:18px 0;
}

.content-section h2{
  margin:0 0 10px;
  font-size:22px;
  letter-spacing:-0.2px;
}

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}

@media(max-width:900px){
  .grid-3{
    grid-template-columns: 1fr;
  }
}

.info-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.04);
}

.info-card h3{
  margin:0 0 6px;
  font-size:15px;
}

.info-card p{
  margin:0;
  color:#4b5563;
  font-size:13px;
  line-height:1.6;
}

.tips{
  margin:0;
  padding-left:18px;
  color:#374151;
  line-height:1.8;
}

/* FAQ */
.faq details{
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px 14px;
  margin-bottom:10px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.03);
}

.faq summary{
  cursor:pointer;
  font-weight:800;
}

.faq p{
  margin:10px 0 0;
  color:#4b5563;
  line-height:1.6;
}

/* Footer */
.site-footer{
  margin-top:22px;
  border-top:1px solid var(--border);
  background: rgba(255,255,255,0.65);
}

.footer-inner{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:16px 0;
}

.footer-note{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  max-width:520px;
}

.footer-links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-start;
}

.footer-links a{
  color:#374151;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
}

.footer-links a:hover{
  text-decoration:underline;
}