/* =========================================================
   FairDrawBox - Clean Mobile First CSS (Replace Full File)
   ========================================================= */

/* ---------- Root + Reset ---------- */
:root{
  --bg: #070b14;
  --bg2:#0b1220;
  --card:#0f1b2d;
  --card2:#0b1526;
  --text:#e7eefc;
  --muted:#aab8d6;
  --line: rgba(255,255,255,0.10);
  --primary:#3b82f6;
  --primary2:#2563eb;
  --good:#22c55e;
  --shadow: 0 20px 60px rgba(0,0,0,0.35);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: radial-gradient(1200px 500px at 50% -150px, rgba(59,130,246,.25), transparent 60%),
              linear-gradient(180deg, var(--bg), #050816);
  color:var(--text);
  line-height:1.55;
}

img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
a:hover{opacity:.95}

.container{
  width:min(1100px, 92%);
  margin:0 auto;
}

/* ---------- Header / Nav ---------- */
header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(12px);
  background: rgba(7,11,20,.72);
  border-bottom:1px solid var(--line);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:14px;
}

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

.brand-title{
  font-weight:800;
  letter-spacing:.2px;
  font-size:18px;
}

.nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.nav a{
  padding:9px 12px;
  border-radius:999px;
  color:var(--muted);
  border:1px solid transparent;
  transition:.15s ease;
  font-size:14px;
}

.nav a:hover{
  color:var(--text);
  border-color: rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

.nav .pro-btn{
  padding:9px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color:var(--text);
  font-weight:600;
}

.lang-select{
  padding:9px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color:var(--text);
  outline:none;
  font-size:14px;
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid transparent;
  cursor:pointer;
  font-weight:700;
  transition:.15s ease;
  user-select:none;
}

.btn-primary{
  background: linear-gradient(180deg, var(--primary), var(--primary2));
  color:white;
  box-shadow: 0 10px 30px rgba(37,99,235,.25);
}

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

.btn-ghost{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
  color: var(--text);
}
.btn-ghost:hover{ background: rgba(255,255,255,0.06); }

/* ---------- Ad placeholder ---------- */
.ad-slot{
  margin:16px auto 0;
  padding:14px;
  border-radius: var(--radius);
  border:1px dashed rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.60);
  text-align:center;
  font-size:14px;
}

/* ---------- Hero ---------- */
.hero{
  margin:18px auto 0;
  padding:18px;
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(180deg, rgba(15,27,45,.85), rgba(10,18,32,.78));
  border:1px solid var(--line);
  box-shadow: var(--shadow);
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(34,197,94,0.25);
  background: rgba(34,197,94,0.10);
  color:#d7ffe7;
  font-weight:700;
  font-size:13px;
}

.hero h1{
  margin:14px 0 8px;
  font-size: clamp(28px, 4.6vw, 44px);
  line-height:1.1;
  letter-spacing:-0.4px;
}

.hero p{
  margin:0 0 16px;
  color:var(--muted);
  max-width: 62ch;
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* ---------- Section title ---------- */
.section-title{
  margin:20px 0 10px;
  font-size:18px;
  color: var(--text);
  font-weight:800;
  letter-spacing:.2px;
}

/* ---------- Tool cards list (homepage) ---------- */
.tool-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:14px;
}

.tool-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 16px;
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(12,22,38,.75), rgba(9,16,28,.75));
  transition: .15s ease;
}

.tool-card:hover{
  transform: translateY(-1px);
  border-color: rgba(59,130,246,0.35);
  background: linear-gradient(180deg, rgba(13,25,44,.85), rgba(9,16,28,.75));
}

.tool-left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.tool-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.20);
  flex:0 0 auto;
  font-size:20px;
}

.tool-name{
  font-weight:800;
  font-size:16px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tool-sub{
  margin-top:2px;
  color: var(--muted);
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tool-right{
  flex:0 0 auto;
  color: rgba(255,255,255,0.70);
  font-weight:800;
}

/* ---------- Tool page form ---------- */
.card{
  margin:16px 0;
  padding:16px;
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(12,22,38,.75), rgba(9,16,28,.75));
  box-shadow: var(--shadow);
}

label{display:block;margin:0 0 8px;color:var(--muted);font-weight:700;font-size:13px}

.input, textarea, input[type="text"], input[type="number"], input[type="email"], select{
  width:100%;
  padding:14px 14px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  outline:none;
}

textarea{min-height:120px;resize:vertical}

.input:focus, textarea:focus, input:focus, select:focus{
  border-color: rgba(59,130,246,0.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.18);
}

/* Result highlight */
.result{
  margin-top:12px;
  padding:14px;
  border-radius: var(--radius);
  border:1px solid rgba(34,197,94,0.22);
  background: rgba(34,197,94,0.10);
  font-weight:900;
}

/* ---------- Footer ---------- */
footer{
  margin-top:28px;
  padding:22px 0 90px;
  border-top:1px solid var(--line);
  color: rgba(255,255,255,0.70);
}

.footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}

.footer-links a{
  padding:8px 10px;
  border-radius:999px;
  background: rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
}

/* ---------- Cookie Banner ---------- */
.cookie-banner{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:100;
  background: rgba(5,8,22,0.92);
  border-top:1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  padding:14px 16px;
}

.cookie-inner{
  width:min(1100px, 92%);
  margin:0 auto;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.cookie-text{
  color: rgba(255,255,255,0.78);
  font-size:14px;
}

.cookie-text a{
  text-decoration:underline;
  color: white;
}

.cookie-actions{
  display:flex;
  gap:10px;
  flex:0 0 auto;
}

/* ---------- Mobile Optimizations ---------- */
@media (max-width: 768px){

  .header-inner{
    padding:10px 0;
    gap:10px;
  }

  .nav{
    gap:6px;
  }

  .nav a{
    padding:8px 10px;
    font-size:13px;
  }

  .lang-select{
    padding:8px 10px;
    font-size:13px;
  }

  .hero{
    padding:16px;
  }

  /* Bigger tap targets */
  .tool-card, .btn, button{
    padding:16px 16px;
    font-size:16px;
  }

  .tool-icon{
    width:44px;
    height:44px;
  }

  /* Cookie banner buttons stacked */
  .cookie-inner{
    flex-direction:column;
    align-items:stretch;
  }
  .cookie-actions{
    width:100%;
  }
  .cookie-actions .btn{
    width:100%;
  }
}

/* ---------- Light Mode (optional) ----------
   If you ever enable a light theme switch, these are ready. */
body.light{
  --bg:#f6f8fc;
  --bg2:#ffffff;
  --card:#ffffff;
  --card2:#ffffff;
  --text:#0b1220;
  --muted:#52617a;
  --line: rgba(15,23,42,0.10);
  --shadow: 0 20px 60px rgba(2,6,23,0.12);
}

body.light header{
  background: rgba(246,248,252,.75);
}
body.light .tool-card,
body.light .hero,
body.light .card{
  background: #ffffff;
}
body.light .cookie-banner{
  background: rgba(255,255,255,.92);
}