:root{
  --bg:#0a0e1a; 
  --card:#111827;
  --accent:#14f195; 
  --text:#e5e7eb;
  --muted:#94a3b8;
}

body{ margin:0; font-family:Arial; background:var(--bg); color:var(--text); }

/* ===== NAVBAR BARU ===== */
.navbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  background:#0f172a;
  border-bottom:1px solid #1e293b;
  position:sticky;
  top:0;
  z-index:10;
  flex-wrap: wrap; /* <--- BIAR GAK PECAH DI HP KECIL */
}
.nav-brand{
  font-size:20px;
  font-weight:bold;
  color:var(--accent);
}
.nav-links{
  display:flex;
  gap:16px; /* <--- JARAK MENU */
}
.nav-links a{
  font-size:13px;
  color:var(--muted);
  font-weight:600;
  text-decoration:none;
  padding-bottom:4px;
}
.nav-links a.active{ /* <--- MENU YANG AKTIF */
  color:var(--accent);
  border-bottom:2px solid var(--accent);
}
/* ======================= */

.container{ max-width:520px; margin:0 auto; padding:20px 15px; }
.page-title{ font-size:28px; font-weight:700; margin:0 0 5px 0; color:var(--text); }
.card{ background:var(--card); padding:18px; border-radius:16px; margin-bottom:16px; border:1px solid #1e293b; }

input,button{ width:100%; padding:12px; margin-top:10px; border-radius:10px; border:1px solid #334155; font-size:15px; box-sizing: border-box; background:#1e293b; color:#fff; }
button{ background:var(--accent); color:#000; font-weight:bold; cursor:pointer; border:none; }
button:disabled{ opacity:0.5; }

.small{ font-size:13px; color:var(--muted); text-align:center; }
#questionMath{ text-align:center; font-size:18px; margin:10px 0; }
.cf-turnstile{ display:flex !important; justify-content:center; margin-top:10px; }

#animalBox{ display:grid; grid-template-columns:repeat(5,1fr); gap:6px; margin-top:10px; }
.animal{ background:#1e293b; border:2px solid #334155; padding:6px 4px; border-radius:10px; text-align:center; cursor:pointer; font-size:11px; display:flex; flex-direction:column; align-items:center; gap:2px; user-select:none; min-height:55px; justify-content:center; }
.animal::before{ content: attr(data-emoji); font-size:22px; line-height:1; }
.animal.active{ border-color:var(--accent); background:var(--accent); color:#000; }
#result{ margin-top:10px; min-height:20px; font-weight:bold; text-align:center; }

#history{ list-style:none; padding:0; margin:8px 0 0 0; max-height:220px; overflow-y:auto; }
#history li{ background:#1e293b; padding:8px 12px; margin-bottom:6px; border-radius:8px; font-size:12px; display:flex; justify-content:space-between; align-items:center; gap:8px; }
#history li span.user{ font-weight:bold; color:#fff; flex: 0 1 60px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#history li span.detail{ color:var(--muted); font-size:11px; flex-shrink: 0; }

/* ===== FOOTER LINK HIJAU TOSCA ===== */
.footer{ 
  text-align:center; 
  color:#64748b; 
  font-size:13px; 
  padding:20px 0; 
  margin-top:30px; 
  border-top:1px solid #1e293b; 
}

.footer a{
  color: #2dd4bf; /* <--- HIJAU TOSCA */
  text-decoration: none; /* <--- BUANG GARIS BAWAH UNGU */
  font-weight: 600;
}

.footer a:visited{
  color: #2dd4bf; /* <--- BIAR GA JADI UNGU SETELAH DIKLIK */
}

.footer a:hover{
  color: #5eead4; /* <--- HIJAU LEBIH TERANG PAS HOVER */
  text-decoration: underline; /* <--- MUNCUL GARIS BAWAH PAS HOVER */
}

.ad-banner{
  margin: 20px auto;
  text-align: center;
  max-width: 100%;
}
.ad-label{
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.ad-box iframe{
  max-width: 100%;
  border-radius: 8px;
}

.btn-claim:disabled{ background:#334155 !important; color:#94a3b8; cursor:not-allowed; }
.modal {
  position: fixed; z-index: 9999; left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.8);
  display: flex; justify-content: center; align-items: center;
}
.modal-content {
  background-color: #1e293b; color: #fff;
  padding: 24px; border-radius: 16px;
  width: 90%; max-width: 380px;
  text-align: center; position: relative;
}
.close { position: absolute; right: 15px; top: 10px; font-size: 24px; cursor: pointer; }
.emoji-grid { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.emoji-grid button { padding: 10px 12px; border-radius: 8px; border: 1px solid #334155; background: #0f172a; color:#fff; cursor: pointer; }
.emoji-grid button.active { border: 2px solid #2dd4bf; }
.cf-turnstile { margin: 15px auto; display:flex; justify-content:center; }
#mathAnswer{ width:100%; margin:10px 0; padding:10px; border-radius:8px; border:1px solid #334155; background:#0f172a; color:#fff; }
/* ================================== */

.ad-slot{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  margin:15px 0;
}

.ad-slot iframe{
  border:0;
  overflow:hidden;
  max-width:100%;
}
