:root{
  --bg:#0f1020;
  --card:#1b1d3a;
  --text:#ffffff;
  --muted:#cfd2ff;
  --primary:#6c63ff;
  --secondary:#ff6584;
  --bar:#14162e;
}

body.light{
  --bg:#f4f6ff;
  --card:#ffffff;
  --text:#0f1020;
  --muted:#555;
  --bar:#ffffff;
}

*{box-sizing:border-box;margin:0;padding:0}

body{
  background:var(--bg);
  color:var(--text);
  font-family:'Poppins',sans-serif;
  transition:.6s;
}

/* TOP BAR */
.top-bar{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(20,22,46,.85);
  backdrop-filter:blur(12px);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:.7rem 1rem;
}

.brand{display:flex;align-items:center;gap:.6rem}
.logo{
  width:36px;height:36px;border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--secondary));
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-family:'Montserrat',sans-serif;
}

.theme-toggle{
  width:34px;height:34px;border-radius:50%;
  border:none;background:var(--card);color:var(--text);
  cursor:pointer;font-size:1.1rem;
}

/* FORM */
.container{max-width:520px;margin:2.5rem auto;padding:1rem}
.form-card{
  background:var(--card);
  border-radius:20px;
  padding:2rem;
  box-shadow:0 25px 60px rgba(0,0,0,.25);
}

h1{text-align:center;font-family:'Montserrat'}
.subtitle{text-align:center;color:var(--muted);margin:1rem 0 1.5rem}

label{display:block;margin-top:1rem;font-size:.9rem}
input,textarea{
  width:100%;margin-top:.4rem;
  padding:.75rem .9rem;border-radius:12px;
  border:none;background:rgba(255,255,255,.08);
  color:var(--text);
}
textarea{min-height:90px}

.captcha-box{
  margin-top:1.4rem;
  background:rgba(108,99,255,.12);
  border:1px solid rgba(108,99,255,.35);
  border-radius:14px;padding:1rem;text-align:center;
}

/* CHECKBOX – FIXED & RESPONSIVE */
.checkbox {
  margin-top: 1.4rem;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.checkbox-wrap input {
  width: 16px;
  height: 16px;
  margin-top: 0;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}

.checkbox-text {
  display: inline;
}

.checkbox-text a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.checkbox-text a:hover {
  text-decoration: underline;
}

.submit-btn{
  width:100%;margin-top:1.6rem;padding:.9rem;
  border:none;border-radius:50px;font-weight:600;
  background:linear-gradient(135deg,var(--primary),var(--secondary));
  color:#fff;cursor:pointer;
}

/* FOOTER */
footer{text-align:center;margin:2rem 0;font-size:.8rem;color:var(--muted)}

/* MODAL */
.modal{
  position:fixed;inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:2000;
}

.modal-content{
  background:var(--card);
  max-width:520px;
  width:90%;
  max-height:80vh;
  overflow:auto;
  padding:1.5rem;
  border-radius:16px;
}

.modal h2{font-family:'Montserrat';margin-bottom:.8rem}
.modal p{color:var(--muted);font-size:.9rem;line-height:1.6;margin-bottom:1rem}

.close-btn{
  width:100%;
  margin-top:1rem;
  padding:.7rem;
  border:none;border-radius:30px;
  background:var(--primary);
  color:#fff;cursor:pointer;
}

@media(max-width:600px){
  .brand span{display:none}
}

/* === CHECKBOX ENHANCEMENTS (NON-DESTRUCTIVE) === */

/* animated tick */
input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%) scale(1);
  font-size: 12px;
  color: white;
  animation: checkboxTick 0.25s ease;
}

@keyframes checkboxTick {
  from { transform: translate(-50%, -55%) scale(0); }
  to { transform: translate(-50%, -55%) scale(1); }
}

/* error highlight */
.checkbox.error input[type="checkbox"] {
  outline: 2px solid #ff6b6b;
  outline-offset: 2px;
}

/* shake animation */
.checkbox.error {
  animation: checkboxShake 0.4s ease;
}

@keyframes checkboxShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

textarea {
  resize: none;
  overflow: hidden;
}
