:root{
  --bg1: #eafff3;          /* mint */
  --bg2: #ffeaf4;          /* soft pink */
  --ink: #153a2e;
  --muted: #2f6b56;
  --card: rgba(255,255,255,.85);
  --border: rgba(21,58,46,.18);
  --shadow: 0 18px 50px rgba(21,58,46,.12);
  --accent: #2fbf71;       /* mint accent */
  --accent2:#ff6fb1;       /* pink accent */
  --chip: rgba(47,191,113,.12);
  --chipBorder: rgba(47,191,113,.25);
  --inputBg: rgba(255,255,255,.8);
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 10% 10%, var(--bg1), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, var(--bg2), transparent 55%),
    linear-gradient(180deg, #f7fff9, #fff6fb);
  line-height: 1.7;
}

/* ===== ADS OFF MODE ===== */
body.ads-off .sidebar {
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

body.ads-off .sidebar * {
  display: none !important;
}
/* ======================== */


a{ color: inherit; text-decoration: underline; text-underline-offset: 3px; }
a:hover{ color: #0d2a21; }

.layout{
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px 16px 24px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: start;
}

@media (max-width: 1100px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ position: static !important; }
  .sidebar.left{ order: 2; }
  .sidebar.right{ order: 3; }
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.headerRow{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}

.titleGradient {
  font-weight: 800;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.02em;
  margin: 0;
}

.titleLink {
  text-decoration: none;
  cursor: pointer;

  background: linear-gradient(90deg, #2fbf71, #ff6fa3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.titleLink:hover {
  opacity: 0.9;
  transition: 0.15s ease;
}

.sub{
  margin: 0 0 12px;
  color: var(--muted);
}

.pills{
  display:flex;
  gap:8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill{
  background: var(--chip);
  border: 1px solid var(--chipBorder);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 14px;
}

.pill strong{ color: var(--ink); font-variant-numeric: tabular-nums; }

.section{
  margin-top: 14px;
}

.hero{
  border: 1px solid rgba(255,111,177,.22);
  background: linear-gradient(135deg, rgba(47,191,113,.10), rgba(255,111,177,.10));
  border-radius: 18px;
  padding: 14px 14px;
}

.hero h2{
  margin: 0 0 8px;
  font-size: 18px;
}
.hero p{
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.45;
}

.controlsTop{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.modeWrap{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  align-items: center;
}

label{ font-size: 14px; color: var(--muted); }

select, button, input[type="number"]{
  border-radius: 14px;
  border: 1px solid rgba(21,58,46,.20);
  background: var(--inputBg);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
  transition: transform .06s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

select:hover, button:hover, input[type="number"]:hover{
  border-color: rgba(21,58,46,.30);
}
input[type="number"]:focus, select:focus{
  border-color: rgba(47,191,113,.55);
  box-shadow: 0 0 0 4px rgba(47,191,113,.14);
}

button{
  cursor: pointer;
  white-space: nowrap;
}
button:active{ transform: translateY(1px); }

.primary{
  background: linear-gradient(135deg, var(--accent), #3adf86);
  border-color: rgba(47,191,113,.35);
  color: white;
  font-weight: 650;
}
.primary:hover{
  background: linear-gradient(135deg, #28b566, #33d57e);
}
.secondary{
  background: linear-gradient(135deg, rgba(255,111,177,.18), rgba(255,111,177,.10));
  border-color: rgba(255,111,177,.30);
}
.secondary:hover{
  background: linear-gradient(135deg, rgba(255,111,177,.22), rgba(255,111,177,.14));
}

.q{
  margin: 12px 0 10px;
  font-size: 20px;
}

.timerBarWrap{
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(21,58,46,.18);
  background: rgba(47,191,113,.10);
  overflow: hidden;
  margin-top: 10px;
}
.timerBar{
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 0.1s linear;
}

.controls{
  display:grid;
  gap: 10px;
  margin-top: 10px;
}

.inputRow{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
input[type="number"]{ flex: 1; min-width: 220px; }

.hint{
  font-size: 13px;
  color: var(--muted);
}

.resultBox{
  margin-top: 10px;
  border: 1px solid rgba(21,58,46,.16);
  background: rgba(255,255,255,.72);
  border-radius: 16px;
  padding: 12px 14px;
  display:none;
}
.resultLine{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #1f4f3e;
}
.tag{
  display:inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(21,58,46,.16);
  background: rgba(47,191,113,.10);
  font-size: 12px;
  color: var(--muted);
}

.footerRow{
  margin-top: 14px;
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.legalFooter{
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid rgba(21,58,46,.16);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* Sidebars (ads) */
.sidebar{
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
}
.adCard{
  border: 1px dashed rgba(21,58,46,.26);
  border-radius: 18px;
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(10px);
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.adCard strong{ color: var(--ink); }
.adBox{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(21,58,46,.14);
  background: rgba(47,191,113,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--muted);
  margin-top: 10px;
}
.ad-300x250{ height: 250px; }
.ad-300x600{ height: 600px; }

@media (max-width: 1100px){
  .ad-300x250{ height: 180px; }
  .ad-300x600{ height: 240px; }
}

/* Simple page wrapper for legal pages */
.pageNav{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}
.smallTitle{
  margin: 0;
  font-size: 18px;
}
.content{
  color: var(--muted);
  line-height: 1.55;
}
.content h2{ color: var(--ink); margin-top: 18px; }
.content ul{ margin-top: 8px; }
.hidden{ display:none !important; }
