:root{
  --bg:#f5f7fb;
  --bg-soft:#eef3f9;
  --panel:#ffffff;
  --panel-2:#f9fbfe;
  --text:#1f2a37;
  --muted:#6b7a90;
  --line:#dde6f0;
  --primary:#7dd3fc;
  --primary-2:#bae6fd;
  --accent:#dbeafe;
  --success:#22c55e;
  --shadow:0 10px 30px rgba(31,42,55,0.08);
  --shadow-soft:0 6px 18px rgba(31,42,55,0.05);
  --radius:22px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:'Inter',sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(186,230,253,.35), transparent 25%),
    radial-gradient(circle at top right, rgba(219,234,254,.45), transparent 22%),
    linear-gradient(180deg,#f8fbff 0%, #f2f6fb 100%);
}

a{text-decoration:none;color:inherit}
img{max-width:100%}
button,input,textarea{font:inherit}

.container{
  width:min(1160px, calc(100% - 24px));
  margin:0 auto;
}

/* Topbar */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,0.82);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(221,230,240,0.8);
}

.topbar-inner{
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-badge{
  width:52px;
  height:52px;
  border-radius:18px;
  display:grid;
  place-items:center;
  font-weight:800;
  color:#1e293b;
  background:linear-gradient(145deg,#ffffff,#dff4ff);
  border:1px solid #d8e9f7;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 8px 20px rgba(125,211,252,0.18);
}

.brand-text{
  display:flex;
  flex-direction:column;
}
.brand-text strong{
  font-size:28px;
  line-height:1;
  letter-spacing:-0.5px;
}
.brand-text span{
  color:var(--muted);
  font-size:14px;
  margin-top:2px;
}

.nav-links{
  display:flex;
  gap:28px;
  color:#55657b;
  font-weight:600;
}

.nav-links a:hover{
  color:#111827;
}

.nav-cta{
  padding:13px 20px;
  border-radius:16px;
  font-weight:800;
  color:#0f172a;
  background:linear-gradient(145deg,#eaf8ff,#bfefff);
  border:1px solid #cfeefb;
  box-shadow:var(--shadow-soft);
}

/* Hero */
.hero{
  padding:34px 0 16px;
}

.hero-grid{
  display:grid;
  grid-template-columns:1.08fr .92fr;
  gap:24px;
  align-items:stretch;
}

.hero-panel,
.studio-panel,
.result-panel,
.preview-card,
.feature-card,
.how-card{
  background:linear-gradient(180deg,var(--panel),var(--panel-2));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.hero-panel{
  padding:34px;
  position:relative;
  overflow:hidden;
}

.hero-panel::before{
  content:"";
  position:absolute;
  right:-40px;
  bottom:-30px;
  width:220px;
  height:220px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(125,211,252,.22), transparent 65%);
}

.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 16px;
  border-radius:999px;
  background:#f5fbff;
  color:#4b5e77;
  border:1px solid #dbeaf5;
  font-size:14px;
  font-weight:600;
  margin-bottom:18px;
}

.hero-title{
  margin:0 0 16px;
  font-size:clamp(34px, 5vw, 66px);
  line-height:1.02;
  font-weight:800;
  letter-spacing:-1.8px;
  color:#172030;
}

.hero-title .glow{
  background:linear-gradient(135deg,#5ebde8,#8b5cf6);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.hero-text{
  margin:0 0 26px;
  color:var(--muted);
  font-size:17px;
  line-height:1.75;
  max-width:720px;
}

.hero-actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

.btn{
  border:none;
  cursor:pointer;
  transition:.2s ease;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn-primary{
  padding:15px 22px;
  border-radius:18px;
  color:#0f172a;
  background:linear-gradient(145deg,#dff6ff,#8fe2ff);
  font-weight:800;
  box-shadow:0 10px 24px rgba(125,211,252,.18);
}

.btn-secondary{
  padding:15px 22px;
  border-radius:18px;
  color:#1f2937;
  background:linear-gradient(145deg,#ffffff,#edf4fb);
  border:1px solid #dbe5ef;
  font-weight:700;
}

/* Preview side */
.hero-preview{
  padding:18px;
}

.preview-card{
  padding:18px;
  height:100%;
}

.preview-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  height:100%;
}

.preview-item{
  min-height:190px;
  border-radius:22px;
  position:relative;
  overflow:hidden;
  border:1px solid #dfe8f1;
  background:linear-gradient(145deg,#ffffff,#edf5fb);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 6px 18px rgba(15,23,42,0.05);
}

.preview-item::before{
  content:"";
  position:absolute;
  inset:18px;
  border-radius:18px;
  background:radial-gradient(circle at top right, rgba(125,211,252,.35), transparent 38%);
}

.preview-item::after{
  content:attr(data-label);
  position:absolute;
  left:14px;
  bottom:14px;
  padding:8px 12px;
  font-size:13px;
  font-weight:700;
  color:#253246;
  background:rgba(255,255,255,0.86);
  border:1px solid #e2eaf2;
  border-radius:999px;
  box-shadow:0 4px 12px rgba(31,42,55,0.05);
}

.preview-item.one{
  background:
    radial-gradient(circle at top right, rgba(125,211,252,.28), transparent 35%),
    linear-gradient(145deg,#ffffff,#eef6fc);
}
.preview-item.two{
  background:
    radial-gradient(circle at center, rgba(167,139,250,.20), transparent 28%),
    linear-gradient(145deg,#ffffff,#f3f3ff);
}
.preview-item.three{
  background:
    radial-gradient(circle at center, rgba(34,197,94,.16), transparent 28%),
    linear-gradient(145deg,#ffffff,#eefcf4);
}
.preview-item.four{
  background:
    radial-gradient(circle at center, rgba(251,191,36,.14), transparent 28%),
    linear-gradient(145deg,#ffffff,#fff8ee);
}

/* Section */
.section{
  padding:22px 0 34px;
}

.section-title{
  margin:0 0 10px;
  font-size:42px;
  font-weight:800;
  letter-spacing:-1px;
  color:#182233;
}

.section-text{
  margin:0 0 22px;
  color:var(--muted);
  line-height:1.75;
  font-size:16px;
}

/* Studio */
.studio-wrap{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:22px;
}

.studio-panel,
.result-panel{
  padding:24px;
}

.form-label{
  display:block;
  margin:0 0 10px;
  color:#213044;
  font-weight:700;
}

.prompt-box{
  width:100%;
  min-height:160px;
  resize:vertical;
  padding:18px;
  border-radius:20px;
  border:1px solid #dbe5ef;
  background:linear-gradient(145deg,#ffffff,#f6faff);
  color:#1f2937;
  outline:none;
  line-height:1.7;
  box-shadow:inset 0 1px 2px rgba(255,255,255,0.9);
}

.prompt-box:focus{
  border-color:#b7e8fb;
  box-shadow:0 0 0 4px rgba(125,211,252,0.16);
}

.control-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:16px;
}

.upload-box,
.voice-box{
  border:1px solid #dce6f0;
  border-radius:20px;
  padding:18px;
  background:linear-gradient(145deg,#ffffff,#f7fbff);
  box-shadow:var(--shadow-soft);
}

.upload-box strong,
.voice-box strong{
  display:block;
  color:#203044;
}

.upload-box input[type="file"]{
  width:100%;
  margin-top:12px;
  color:#314156;
}

.fake-voice-btn{
  margin-top:12px;
  width:100%;
  padding:14px;
  border-radius:16px;
  border:1px solid #e8dfc8;
  cursor:pointer;
  color:#3a2c00;
  background:linear-gradient(145deg,#fffaf0,#ffe8b8);
  font-weight:800;
  box-shadow:0 6px 14px rgba(251,191,36,0.12);
}

.action-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}

.generate-btn{
  min-width:190px;
  padding:16px 22px;
  border-radius:18px;
  border:none;
  cursor:pointer;
  color:#0f172a;
  font-weight:900;
  background:linear-gradient(145deg,#dcf7ff,#8fe4ff);
  box-shadow:0 10px 24px rgba(125,211,252,0.16);
}

.clear-btn{
  min-width:140px;
  padding:16px 20px;
  border-radius:18px;
  border:1px solid #dce5ef;
  cursor:pointer;
  color:#243347;
  background:linear-gradient(145deg,#ffffff,#eff5fa);
  font-weight:700;
}

/* Result */
.result-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}

.result-top h3{
  color:#1b2738;
  font-size:28px;
}

.status-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  color:#38506a;
  padding:10px 13px;
  border-radius:999px;
  background:#f5fbff;
  border:1px solid #dbeaf5;
  font-weight:700;
}

.result-view{
  min-height:430px;
  border-radius:22px;
  border:1px solid #dce6ef;
  background:
    radial-gradient(circle at top, rgba(125,211,252,.10), transparent 32%),
    linear-gradient(180deg,#fbfdff,#f4f8fc 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  position:relative;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.9);
}

.result-placeholder{
  text-align:center;
  padding:28px;
  color:var(--muted);
  max-width:340px;
}

.result-placeholder strong{
  display:block;
  margin-bottom:10px;
  font-size:20px;
  color:#243246;
}

.result-image{
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}

.result-actions{
  margin-top:14px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.download-btn,
.retry-btn{
  padding:14px 16px;
  border-radius:15px;
  border:none;
  cursor:pointer;
  font-weight:700;
}

.download-btn{
  color:#0f172a;
  background:linear-gradient(145deg,#eafef0,#aaf2c2);
  border:1px solid #c7eed3;
}

.retry-btn{
  color:#243347;
  background:linear-gradient(145deg,#ffffff,#edf4fb);
  border:1px solid #dce6ef;
}

/* Cards */
.feature-grid,
.how-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}

.feature-card,
.how-card{
  padding:24px;
}

.card-icon{
  width:56px;
  height:56px;
  border-radius:18px;
  display:grid;
  place-items:center;
  margin-bottom:14px;
  font-size:22px;
  font-weight:800;
  color:#173047;
  background:linear-gradient(145deg,#ffffff,#dff4ff);
  border:1px solid #d9ebf7;
  box-shadow:0 6px 18px rgba(125,211,252,0.12);
}

.feature-card h3,
.how-card h3{
  margin:0 0 10px;
  font-size:22px;
  color:#182334;
}

.feature-card p,
.how-card p{
  margin:0;
  color:var(--muted);
  line-height:1.75;
}

/* Footer */
.site-footer{
  border-top:1px solid #dde6f0;
  margin-top:24px;
  background:rgba(255,255,255,0.65);
  backdrop-filter:blur(8px);
}

.footer-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:22px;
  padding:32px 0 18px;
}

.site-footer h3,
.site-footer h4{
  margin-top:0;
  color:#1b2738;
}

.site-footer p,
.site-footer li,
.site-footer span{
  color:var(--muted);
  line-height:1.75;
}

.site-footer ul{
  list-style:none;
  padding:0;
  margin:0;
}

.footer-bottom{
  padding:14px 0 24px;
  color:var(--muted);
  font-size:14px;
  border-top:1px solid rgba(221,230,240,0.8);
}

.notice{
  margin-top:12px;
  font-size:14px;
  color:#40607a;
}

.notice.error{color:#dc2626}
.notice.success{color:#16a34a}

.hidden{display:none !important}

/* Mobile */
@media (max-width: 1024px){
  .hero-grid,
  .studio-wrap,
  .feature-grid,
  .how-grid,
  .footer-grid{
    grid-template-columns:1fr;
  }

  .nav-links{
    display:none;
  }

  .hero-title{
    font-size:52px;
  }
}

@media (max-width: 768px){
  .topbar-inner{
    min-height:70px;
  }

  .brand-badge{
    width:46px;
    height:46px;
    border-radius:16px;
  }

  .brand-text strong{
    font-size:24px;
  }

  .nav-cta{
    padding:11px 16px;
    font-size:14px;
  }

  .hero{
    padding:22px 0 10px;
  }

  .hero-panel,
  .hero-preview,
  .studio-panel,
  .result-panel{
    padding:18px;
    border-radius:18px;
  }

  .hero-title{
    font-size:40px;
    line-height:1.06;
  }

  .hero-text{
    font-size:15px;
  }

  .preview-item{
    min-height:150px;
    border-radius:18px;
  }

  .section-title{
    font-size:34px;
  }

  .control-row{
    grid-template-columns:1fr;
  }

  .result-view{
    min-height:300px;
    border-radius:18px;
  }

  .feature-card,
  .how-card{
    padding:18px;
  }
}

@media (max-width: 520px){
  .container{
    width:min(100% - 16px, 100%);
  }

  .topbar-inner{
    gap:10px;
  }

  .brand{
    gap:10px;
  }

  .brand-text strong{
    font-size:21px;
  }

  .brand-text span{
    font-size:12px;
  }

  .nav-cta{
    padding:10px 14px;
    border-radius:14px;
  }

  .hero-title{
    font-size:34px;
  }

  .hero-actions{
    flex-direction:column;
  }

  .btn-primary,
  .btn-secondary,
  .generate-btn,
  .clear-btn,
  .download-btn,
  .retry-btn{
    width:100%;
    text-align:center;
  }

  .preview-grid{
    grid-template-columns:1fr 1fr;
    gap:12px;
  }

  .preview-item{
    min-height:120px;
  }

  .section-title{
    font-size:30px;
  }

  .result-top h3{
    font-size:22px;
  }
}