/* ZillaKit design system — Agent A shared infrastructure */
:root{
  --bg:#060809; --panel:#0e1417; --panel2:#131b1f; --border:#1e2a30;
  --cyan:#2DD4DF; --cyan-deep:#0E7490; --text:#f2f6f7; --muted:#93a1ab;
  --radius:14px;
  --shadow:0 10px 30px rgba(0,0,0,.45);
  --font:'Segoe UI', system-ui, -apple-system, sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--font); line-height:1.6; font-size:16px;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--cyan); text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%}
h1,h2,h3{line-height:1.2; margin:0 0 .5em}
h1{font-size:2rem}
.container{max-width:1200px; margin:0 auto; padding:0 1.25rem}

/* ---------- Header ---------- */
.zk-header{
  position:sticky; top:0; z-index:50;
  background:rgba(6,8,9,.85); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.zk-header .zk-bar{
  max-width:1200px; margin:0 auto; padding:.6rem 1.25rem;
  display:flex; align-items:center; gap:1rem;
}
.zk-logo{display:flex; align-items:center; gap:.5rem; font-weight:800; font-size:1.2rem; color:var(--text)}
.zk-logo:hover{text-decoration:none}
.zk-logo img{height:32px; width:auto}
.zk-logo .zk-brand span{color:var(--cyan)}
.zk-nav{display:flex; align-items:center; gap:1.25rem; margin-left:auto}
.zk-nav a{color:var(--muted); font-weight:600}
.zk-nav a:hover{color:var(--text); text-decoration:none}
.zk-search-mini{
  display:flex; align-items:center; background:var(--panel2);
  border:1px solid var(--border); border-radius:20px; padding:.35rem .8rem;
}
.zk-search-mini input{
  background:transparent; border:0; color:var(--text); outline:none; width:150px;
}
.zk-search-mini input::placeholder{color:var(--muted)}

/* ---------- Buttons ---------- */
.btn,.btn-ghost{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  font-family:inherit; font-size:1rem; font-weight:700; cursor:pointer;
  border-radius:10px; padding:.7rem 1.4rem; border:2px solid transparent;
  transition:transform .08s ease, background .15s ease, box-shadow .15s ease;
  text-decoration:none;
}
.btn{background:var(--cyan); color:#052227}
.btn:hover{background:#3fe0ea; text-decoration:none; box-shadow:0 6px 20px rgba(45,212,223,.3)}
.btn:active{transform:translateY(1px)}
.btn-ghost{background:transparent; color:var(--cyan); border-color:var(--cyan)}
.btn-ghost:hover{background:rgba(45,212,223,.1); text-decoration:none}
.btn:disabled,.btn-ghost:disabled{opacity:.5; cursor:not-allowed}
.btn-lg{padding:.9rem 2rem; font-size:1.1rem}

/* ---------- Cards ---------- */
.card{
  background:var(--panel); border:1px solid var(--border);
  border-radius:var(--radius); padding:1.25rem;
}

/* ---------- Inputs ---------- */
input[type=text],input[type=email],input[type=number],input[type=search],
input[type=password],input[type=url],select,textarea{
  width:100%; background:var(--panel2); color:var(--text);
  border:1px solid var(--border); border-radius:8px; padding:.65rem .8rem;
  font-family:inherit; font-size:1rem; outline:none;
}
input:focus,select:focus,textarea:focus{border-color:var(--cyan)}
textarea{resize:vertical; min-height:120px; line-height:1.5}
label{display:block; font-weight:600; margin:.75rem 0 .35rem; color:var(--muted)}
select{appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%2393a1ab'%3E%3Cpath d='M0 0h12L6 8z'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right .8rem center; padding-right:2rem}

/* ---------- Drop zone ---------- */
.dropzone{
  border:2px dashed var(--border); border-radius:var(--radius);
  padding:2.5rem 1.5rem; text-align:center; color:var(--muted);
  cursor:pointer; transition:border-color .15s ease, background .15s ease;
}
.dropzone:hover,.dropzone.dragover{border-color:var(--cyan); background:rgba(45,212,223,.05); color:var(--text)}
.dropzone .dz-icon{font-size:2.5rem; display:block; margin-bottom:.5rem}

/* ---------- Tool layout: main + 320px sidebar ---------- */
.tool-layout{
  display:grid; grid-template-columns:minmax(0,1fr) 320px;
  gap:2rem; padding-top:2rem; padding-bottom:3rem; align-items:start;
}
.tool-main{min-width:0}
.tool-side{display:flex; flex-direction:column; gap:1.25rem; position:sticky; top:80px}
.lede{color:var(--muted); font-size:1.1rem; margin-top:-.25rem}
.seo-content{margin-top:2.5rem; color:var(--text)}
.seo-content h2{margin-top:1.75rem; color:var(--cyan)}
.seo-content h3{margin-top:1.25rem; font-size:1.05rem}
.seo-content ol,.seo-content ul{padding-left:1.25rem}
.related h3{margin-top:0; font-size:1rem; color:var(--muted); text-transform:uppercase; letter-spacing:.05em}
.related a{display:flex; align-items:center; gap:.6rem; padding:.55rem 0; color:var(--text); border-bottom:1px solid var(--border)}
.related a:last-child{border-bottom:0}
.related a:hover{color:var(--cyan); text-decoration:none}
.related .r-icon{font-size:1.3rem}

/* ---------- Ad slots ---------- */
.ad-slot{
  display:flex; align-items:center; justify-content:center; flex-direction:column;
  border:1px dashed var(--border); border-radius:10px; color:var(--muted);
  background:repeating-linear-gradient(45deg,transparent,transparent 10px,rgba(255,255,255,.015) 10px,rgba(255,255,255,.015) 20px);
  font-size:.75rem; letter-spacing:.12em; text-transform:uppercase;
}
.ad-slot small{opacity:.7; text-transform:none; letter-spacing:normal; margin-top:.25rem}
.ad-slot.ad-side{width:300px; max-width:100%; height:250px; margin:0 auto}
.ad-slot.ad-footer{width:728px; max-width:100%; height:90px; margin:1.5rem auto}

/* ---------- Rewarded modal ---------- */
.zk-modal-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.75); backdrop-filter:blur(4px);
  display:flex; align-items:center; justify-content:center; z-index:200; padding:1rem;
}
.zk-modal{
  background:var(--panel); border:1px solid var(--border); border-radius:var(--radius);
  padding:2rem; max-width:420px; width:100%; text-align:center; box-shadow:var(--shadow);
}
.zk-modal h3{color:var(--cyan)}
.zk-modal p{color:var(--muted)}
.zk-ring{margin:1.5rem auto; display:block}
.zk-ring-bg{stroke:var(--border)}
.zk-ring-fg{stroke:var(--cyan); stroke-linecap:round; transition:stroke-dashoffset 1s linear; transform:rotate(-90deg); transform-origin:50% 50%}
.zk-ring-num{font-size:1.6rem; font-weight:800; fill:var(--text)}
.zk-modal-actions{display:flex; gap:.75rem; justify-content:center; margin-top:1rem}
.zk-ad-placeholder{
  background:var(--panel2); border:1px dashed var(--border); border-radius:10px;
  padding:1.5rem; margin:1rem 0; color:var(--muted); font-size:.9rem;
}

/* ---------- Toast ---------- */
.zk-toast-wrap{position:fixed; bottom:1.5rem; left:50%; transform:translateX(-50%); z-index:300; display:flex; flex-direction:column; gap:.5rem; align-items:center}
.zk-toast{
  background:var(--panel2); color:var(--text); border:1px solid var(--border);
  border-left:3px solid var(--cyan); border-radius:8px; padding:.7rem 1.1rem;
  box-shadow:var(--shadow); font-size:.95rem; max-width:90vw;
  animation:zk-toast-in .2s ease;
}
.zk-toast.err{border-left-color:#ff5c6c}
@keyframes zk-toast-in{from{opacity:0; transform:translateY(10px)}to{opacity:1; transform:none}}

/* ---------- Footer ---------- */
.zk-footer{
  border-top:1px solid var(--border); background:var(--panel);
  margin-top:3rem; padding:2rem 0; color:var(--muted); font-size:.9rem;
}
.zk-footer .zk-bar{max-width:1200px; margin:0 auto; padding:0 1.25rem; display:flex; flex-wrap:wrap; gap:.75rem 1.25rem; align-items:center}
.zk-footer a{color:var(--muted)}
.zk-footer a:hover{color:var(--cyan)}
.zk-footer .zk-foot-note{margin-left:auto; opacity:.7}

/* ---------- Home page ---------- */
.hero{text-align:center; padding:3.5rem 1.25rem 2rem}
.hero img{height:72px; margin-bottom:1rem}
.hero h1{font-size:2.6rem; background:linear-gradient(90deg,var(--text),var(--cyan)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent}
.hero p{color:var(--muted); font-size:1.2rem; max-width:640px; margin:.5rem auto 0}
.home-search{max-width:620px; margin:2rem auto 1rem; position:relative}
.home-search input{padding:1rem 1.2rem; font-size:1.1rem; border-radius:30px; text-align:center}
.pills{display:flex; flex-wrap:wrap; gap:.5rem; justify-content:center; margin:1.25rem auto 2rem; max-width:800px}
.pill{
  background:var(--panel2); border:1px solid var(--border); color:var(--muted);
  border-radius:20px; padding:.4rem 1rem; font-size:.9rem; cursor:pointer; font-weight:600;
  transition:all .15s ease;
}
.pill:hover{border-color:var(--cyan); color:var(--text)}
.pill.active{background:var(--cyan); color:#052227; border-color:var(--cyan)}
.tool-grid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
  gap:1rem; padding-bottom:2rem;
}
.tool-card{
  background:var(--panel); border:1px solid var(--border); border-radius:var(--radius);
  padding:1.25rem; display:flex; flex-direction:column; gap:.4rem;
  transition:transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}
.tool-card:hover{transform:translateY(-3px); border-color:var(--cyan); box-shadow:var(--shadow); text-decoration:none}
.tool-card .tc-icon{font-size:2rem}
.tool-card .tc-name{font-weight:700; color:var(--text); font-size:1.1rem}
.tool-card .tc-desc{color:var(--muted); font-size:.9rem}
.tool-card .tc-cat{margin-top:auto; font-size:.7rem; text-transform:uppercase; letter-spacing:.08em; color:var(--cyan-deep)}
.empty-state{text-align:center; color:var(--muted); padding:3rem; grid-column:1/-1}

/* ---------- Premium ---------- */
.feature-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; margin:2rem 0}
.feature{display:flex; gap:.75rem; align-items:flex-start}
.feature .f-icon{font-size:1.6rem; flex:0 0 auto}
.price-tag{font-size:3rem; font-weight:800; color:var(--cyan)}
.price-tag small{font-size:1rem; color:var(--muted); font-weight:400}
.notice{background:rgba(45,212,223,.08); border:1px solid var(--cyan-deep); border-radius:10px; padding:1rem 1.25rem; color:var(--text)}

/* ---------- Prose (privacy/terms/404) ---------- */
.prose{max-width:760px; margin:0 auto}
.prose h2{color:var(--cyan); margin-top:2rem}
.prose p,.prose li{color:var(--muted)}
.center-page{text-align:center; padding:5rem 1.25rem}
.center-page .big{font-size:5rem; margin:0; color:var(--cyan)}

/* ---------- Mobile breakpoints ---------- */
@media(max-width:960px){
  .tool-layout{grid-template-columns:1fr}
  .tool-side{position:static; flex-direction:row; flex-wrap:wrap}
  .tool-side>*{flex:1 1 300px}
}
@media(max-width:720px){
  h1{font-size:1.6rem}
  .hero h1{font-size:2rem}
  .hero p{font-size:1.05rem}
  .zk-search-mini{display:none}
  .zk-nav{gap:1rem}
  .tool-side{flex-direction:column}
  .zk-footer .zk-bar{flex-direction:column; align-items:flex-start}
  .zk-footer .zk-foot-note{margin-left:0}
}

/* ---------- Mobile hardening (phone usability, ~390px) ---------- */
/* Never let a page scroll sideways */
html,body{max-width:100%; overflow-x:hidden}
.container{width:100%}
@media(max-width:720px){
  /* Comfortable tap targets */
  .btn,.btn-ghost{min-height:44px; padding:.7rem 1.1rem}
  .pill{min-height:44px; display:inline-flex; align-items:center; padding:.5rem 1rem}
  .tool-grid{grid-template-columns:1fr}
  /* Full-width drop zones and single-column tool controls */
  .dropzone{padding:2rem 1rem}
  /* Wide grids/tables inside tool cards scroll instead of pushing the page */
  .card table{max-width:100%}
}
/* Reusable scroll container for overflowing grids/tables on any width */
.zk-scroll-x{overflow-x:auto; -webkit-overflow-scrolling:touch; max-width:100%}
