:root{
  --bg1:#eaf3ff;
  --bg2:#f6fbff;
  --panel:rgba(255,255,255,0.85);
  --fg:#0f172a;
  --muted:#64748b;
  --line:rgba(15,23,42,0.08);
  --card:rgba(255,255,255,0.72);
  --shadow: 0 14px 40px rgba(15,23,42,0.08);
  --shadow2: 0 10px 26px rgba(15,23,42,0.06);
  --radius:18px;
  --radius2:24px;
  --accent:#0f172a;
}

/* Dark mode (toggled by adding class="dark" on body) */
body.dark{
  --bg1:#070b16;
  --bg2:#0b1530;
  --panel:rgba(15,23,42,0.72);
  --fg:#e5e7eb;
  --muted:#a3b3c7;
  --line:rgba(255,255,255,0.10);
  --card:rgba(15,23,42,0.56);
  --shadow: 0 18px 50px rgba(0,0,0,0.40);
  --shadow2: 0 12px 30px rgba(0,0,0,0.30);
  --accent:#e5e7eb;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  color:var(--fg);
  background: radial-gradient(1200px 600px at 30% 0%, var(--bg2), transparent 60%),
              radial-gradient(900px 500px at 80% 10%, rgba(180,220,255,0.55), transparent 60%),
              linear-gradient(180deg, var(--bg1), #ffffff 55%);
}
body.dark{
  background: radial-gradient(1200px 600px at 30% 0%, rgba(99,102,241,0.18), transparent 60%),
              radial-gradient(900px 500px at 80% 10%, rgba(56,189,248,0.12), transparent 60%),
              linear-gradient(180deg, var(--bg1), var(--bg2));
}

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

/* Header */
.header{
  position:sticky;
  top:0;
  z-index:50;
  background: var(--panel);
  backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}
.header-inner{display:flex; align-items:center; justify-content:space-between; height:64px; gap:14px;}

.brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--fg);}
.brand-dot{width:36px; height:36px; border-radius:50%; background:rgba(15,23,42,0.08); border:1px solid var(--line); box-shadow: var(--shadow2);}
body.dark .brand-dot{background:rgba(255,255,255,0.10);}
.brand-text{display:flex; flex-direction:column; line-height:1.1;}
.brand-title{font-weight:900; font-size:15px; letter-spacing:.2px;}
.brand-sub{font-weight:600; font-size:12px; color:var(--muted); margin-top:5px;}

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

.nav{display:flex; gap:10px; opacity:0.95;}
.nav-link{color:var(--muted); text-decoration:none; font-size:13px; padding:8px 10px; border-radius:12px;}
.nav-link.active{color:var(--fg); background:rgba(15,23,42,0.06);}
body.dark .nav-link.active{background:rgba(255,255,255,0.10);}

.theme-toggle{appearance:none; border:none; background:transparent; padding:6px 2px; cursor:pointer;}
.toggle-track{display:inline-flex; width:44px; height:26px; border-radius:999px; background:rgba(15,23,42,0.10); border:1px solid var(--line); align-items:center; padding:3px; transition:background .2s ease;}
.toggle-thumb{width:20px; height:20px; border-radius:50%; background:rgba(255,255,255,0.92); box-shadow: 0 6px 14px rgba(15,23,42,0.18); transform: translateX(0); transition: transform .2s ease;}
body.dark .toggle-track{background:rgba(255,255,255,0.14);}
body.dark .toggle-thumb{transform: translateX(18px); background: rgba(15,23,42,0.88); box-shadow: 0 10px 18px rgba(0,0,0,0.35);}

/* Hero */
.hero{padding: 34px 0 10px; position:relative;}
.hero-v2{padding-top: 44px;}
.h1{font-size: 28px; margin: 0 0 10px; letter-spacing:.2px;}
.lead{margin:0; color:var(--muted); line-height:1.9; font-size:15px;}

.hero-bg-word{
  position:absolute;
  left:0;
  right:0;
  top:10px;
  font-size:56px;
  font-weight:800;
  letter-spacing:2px;
  color: rgba(15,23,42,0.06);
  text-align:center;
  user-select:none;
  pointer-events:none;
  white-space:nowrap;
  overflow:hidden;
}
body.dark .hero-bg-word{color: rgba(255,255,255,0.08);}

.hero-main{
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
}
.hero-actions{display:flex; justify-content:flex-end;}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.70);
  color: var(--fg);
  text-decoration:none;
  font-size:14px;
  box-shadow: var(--shadow2);
}
body.dark .btn{background: rgba(15,23,42,0.55);}

.section{padding: 24px 0 52px;}
.h2{font-size: 18px; margin: 0 0 14px;}
.center{text-align:center;}

/* Screenshot cards */
.section-shots{padding-top: 14px; padding-bottom: 10px;}
.shot-grid{
  display:grid;
  grid-template-columns: repeat(4, 200px);
  justify-content: space-between;
  gap:16px;
}
.shot-card{
  height: 320px;
  border-radius: 28px;
  border:1px solid rgba(255,255,255,0.55);
  box-shadow: 0 18px 55px rgba(15,23,42,0.10);
  overflow:hidden;
  background: rgba(255,255,255,0.55);
  position:relative;
}
body.dark .shot-card{
  background: rgba(15,23,42,0.34);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 22px 60px rgba(0,0,0,0.45);
}

/* soft highlight like frosted glass */
.shot-card:before{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(600px 300px at 30% 15%, rgba(255,255,255,0.55), transparent 60%);
  opacity:0.9;
  pointer-events:none;
}
body.dark .shot-card:before{
  background: radial-gradient(600px 300px at 30% 15%, rgba(255,255,255,0.16), transparent 60%);
  opacity:0.7;
}

.shot-a{background-image: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(214,240,255,0.9));}
.shot-b{background-image: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(232,226,255,0.9));}
.shot-c{background-image: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(214,255,242,0.9));}
.shot-d{background-image: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,238,214,0.9));}

body.dark .shot-a{background-image: linear-gradient(145deg, rgba(56,189,248,0.16), rgba(99,102,241,0.10));}
body.dark .shot-b{background-image: linear-gradient(145deg, rgba(99,102,241,0.18), rgba(236,72,153,0.08));}
body.dark .shot-c{background-image: linear-gradient(145deg, rgba(34,197,94,0.12), rgba(56,189,248,0.10));}
body.dark .shot-d{background-image: linear-gradient(145deg, rgba(245,158,11,0.12), rgba(236,72,153,0.08));}

/* Testimonials horizontal scroll */
.section-testimonials{padding-top: 18px;}
.t-scroll{
  display:flex;
  gap:14px;
  overflow-x:auto;
  padding: 12px 2px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.t-scroll::-webkit-scrollbar{height:10px;}
.t-scroll::-webkit-scrollbar-thumb{background:rgba(15,23,42,0.12); border-radius:999px;}
body.dark .t-scroll::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.18);}

.t-card{
  flex: 0 0 340px;
  scroll-snap-align: start;
  background: rgba(255,255,255,0.70);
  border:1px solid rgba(255,255,255,0.55);
  border-radius: 22px;
  padding:14px 14px 16px;
  box-shadow: 0 14px 40px rgba(15,23,42,0.08);
}
body.dark .t-card{
  background: rgba(15,23,42,0.46);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 18px 50px rgba(0,0,0,0.40);
}
.t-head{display:flex; gap:10px; align-items:center; margin-bottom:10px;}
.avatar{width:38px; height:38px; border-radius:50%; background:rgba(15,23,42,0.10); box-shadow: 0 10px 22px rgba(15,23,42,0.10) inset;}
body.dark .avatar{background:rgba(255,255,255,0.12);}
.t-meta{min-width:0;}
.t-name{font-weight:800; font-size:14px; display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
.tag{display:inline-block; font-size:12px; font-weight:700; color:var(--muted);}
.stars{color: var(--fg); font-size:12px; letter-spacing:1px; opacity:0.9;}
.t-body{margin:0; color:var(--muted); line-height:1.85; font-size:14px;}

/* Footer */
.footer{border-top:1px solid var(--line); padding:18px 0; background:transparent;}
.footer-inner{display:flex; justify-content:space-between;}
.muted{color:var(--muted); font-size:12px;}

@media (max-width: 980px){
  .hero-bg-word{font-size:46px;}
  .shot-grid{grid-template-columns: repeat(4, 180px);}
  .shot-card{height:280px;}
}

@media (max-width: 820px){
  .shot-grid{grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: initial;}
  .shot-card{height:320px;}
}

@media (max-width: 720px){
  .header-inner{height:58px;}
  .nav{display:none;}
  .h1{font-size:24px;}
  .hero-main{flex-direction:column; align-items:flex-start;}
  .hero-actions{width:100%; justify-content:flex-start;}
  .hero-bg-word{font-size:34px; top:18px;}
  .shot-card{height:300px;}
}

/* Simple content blocks */
.panel{
  background: rgba(255,255,255,0.70);
  border:1px solid rgba(255,255,255,0.55);
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 14px 40px rgba(15,23,42,0.06);
}
body.dark .panel{
  background: rgba(15,23,42,0.46);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}
.p{margin:0 0 10px; color: var(--muted); line-height:1.9;}
.p:last-child{margin-bottom:0;}
.hr{border:0; border-top:1px solid var(--line); margin:12px 0; opacity:0.7;}

/* Install helpers */
.row{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 2px; border-bottom:1px solid var(--line);}
.row:last-child{border-bottom:0;}
.row-left{display:flex; align-items:center; gap:10px; min-width:0;}
.row-label{font-weight:700; font-size:13px; color:var(--fg);}
.row-value{font-size:12px; color:var(--muted); max-width:55%; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.badge{display:inline-flex; align-items:center; justify-content:center; height:22px; min-width:38px; padding:0 8px; border-radius:999px; font-size:12px; font-weight:800; border:1px solid var(--line);}
.badge.ok{background: rgba(34,197,94,0.10); color: #16a34a;}
.badge.bad{background: rgba(239,68,68,0.10); color: #dc2626;}
.install-note{margin-top:14px;}
.code{margin:10px 0 0; padding:12px; border-radius:16px; background: rgba(15,23,42,0.05); border:1px solid var(--line); overflow:auto;}
body.dark .code{background: rgba(255,255,255,0.06);}

/* Forms */
.form{margin:0;}
.grid{display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px;}
.field{display:flex; flex-direction:column; gap:6px;}
.label{font-size:12px; color:var(--muted); font-weight:800; letter-spacing:.2px;}
.input{height:40px; padding:0 12px; border-radius:14px; border:1px solid var(--line); background: rgba(255,255,255,0.60); color: var(--fg); outline:none;}
body.dark .input{background: rgba(15,23,42,0.34);}
.form-actions{display:flex; gap:10px; margin-top:14px;}

/* Progress */
.progress{display:flex; flex-direction:column; gap:10px;}
.bar{height:12px; border-radius:999px; background: rgba(15,23,42,0.06); border:1px solid var(--line); overflow:hidden;}
body.dark .bar{background: rgba(255,255,255,0.08);}
.bar-inner{height:100%; width:0%; background: linear-gradient(90deg, rgba(56,189,248,0.85), rgba(99,102,241,0.75)); border-radius:999px; transition: width .2s ease;}
.progress-meta{display:flex; justify-content:space-between; gap:10px; font-size:12px;}

/* Log */
.log{margin-top:12px; max-height:180px; overflow:auto; padding:10px; border-radius:16px; background: rgba(15,23,42,0.04); border:1px solid var(--line);}
body.dark .log{background: rgba(255,255,255,0.06);}
.log-line{font-size:12px; color: var(--muted); line-height:1.7;}

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

/* Alerts */
.alert{padding:10px 12px; border-radius:16px; border:1px solid var(--line); margin-bottom:12px; font-size:13px;}
.alert-bad{background: rgba(239,68,68,0.08); color:#b91c1c;}

/* admin layout small tweaks */
body .footer .muted{opacity:0.9;}
