:root{
  --bg:#0b1220;
  --card:#111b2e;
  --muted:#9fb1d1;
  --text:#e8efff;
  --border:rgba(255,255,255,.10);
  --shadow: 0 14px 34px rgba(0,0,0,.35);
  --radius:18px;
  --accent:#7c3aed;
  --accent2:#06b6d4;
}
[data-theme="light"]{
  --bg:#f6f8ff;
  --card:#ffffff;
  --muted:#4b5563;
  --text:#0b1220;
  --border:rgba(15,23,42,.12);
  --shadow: 0 10px 26px rgba(2,6,23,.10);
  --accent:#6d28d9;
  --accent2:#0891b2;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  background: radial-gradient(1200px 500px at 20% -10%, rgba(124,58,237,.25), transparent 60%),
              radial-gradient(1000px 500px at 90% 0%, rgba(6,182,212,.22), transparent 55%),
              var(--bg);
  color:var(--text);
}
a{color:inherit; text-decoration:none}
.container{max-width:1050px; margin:0 auto; padding:22px; min-height:100vh; display:flex; flex-direction:column}
.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 18px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background: rgba(255,255,255,.03);
}
.brand{display:flex; align-items:center; gap:12px}
.brand img{height:42px; width:auto}
.brand .title{font-weight:800; letter-spacing:.2px}
.brand .sub{font-size:12px; color:var(--muted); margin-top:2px}
.actions{display:flex; gap:10px; flex-wrap:wrap}
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  user-select:none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{transform: translateY(-1px); border-color: rgba(124,58,237,.35); background: rgba(124,58,237,.10)}
.btn.primary{
  border-color: rgba(124,58,237,.45);
  background: linear-gradient(135deg, rgba(124,58,237,.28), rgba(6,182,212,.18));
}
.grid{
  display:grid; gap:16px;
  /* Responsive cards: 2 columns most of the time, 3 columns on wide screens */
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  margin-top:18px;
}
@media (max-width: 820px){ .grid{grid-template-columns:1fr} }
.card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background: rgba(255,255,255,.02);
  box-shadow: var(--shadow);
  padding:18px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  position:relative;
  overflow:hidden;
}
.card::before{
  content:"";
  position:absolute; inset:-2px;
  background: radial-gradient(420px 200px at 20% 0%, rgba(124,58,237,.28), transparent 60%),
              radial-gradient(420px 240px at 80% 10%, rgba(6,182,212,.18), transparent 60%);
  opacity:.0;
  transition:opacity .12s ease;
}
.card:hover{transform: translateY(-2px); border-color: rgba(6,182,212,.35); background: rgba(255,255,255,.04)}
.card:hover::before{opacity:.9}
.card > *{position:relative}
.card h3{margin:0 0 6px 0; font-size:18px}
.card p{margin:0; color:var(--muted); line-height:1.6}
.card .meta{margin-top:12px; display:flex; gap:10px; flex-wrap:wrap}
.pill{
  font-size:12px; color:var(--muted);
  border:1px solid var(--border);
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.03);
}
.footer{
  margin-top:auto;
  padding-top:26px;
  text-align:left;
  color:var(--muted);
  font-size:13px;
}
.page{
  margin-top:18px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background: rgba(255,255,255,.02);
  box-shadow: var(--shadow);
  padding:18px;
}
.row{display:flex; gap:12px; flex-wrap:wrap; align-items:center}
.spacer{flex:1}
.h1{font-size:22px; font-weight:850; margin:0}
.muted{color:var(--muted)}
.progress{
  width:100%;
  height:10px;
  border-radius:999px;
  border:1px solid var(--border);
  overflow:hidden;
  background: rgba(255,255,255,.02);
}
.progress > div{height:100%; width:0%; background: linear-gradient(90deg, var(--accent), var(--accent2))}
.qbox{
  margin-top:14px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background: rgba(255,255,255,.02);
}
.qtitle{font-size:18px; margin:0 0 10px 0}
.options{display:grid; gap:10px; margin-top:10px}
.option{
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px 12px;
  background: rgba(255,255,255,.02);
  cursor:pointer;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
  display:flex; gap:10px; align-items:flex-start;
}
.option:hover{border-color: rgba(124,58,237,.35); background: rgba(124,58,237,.08); transform: translateY(-1px)}
.option input{margin-top:3px}
.likert{
  display:grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap:8px;
}
@media (max-width: 650px){ .likert{grid-template-columns: repeat(3, minmax(0,1fr));} }
.likert .option{justify-content:center; text-align:center}
.table{
  width:100%;
  border-collapse: collapse;
  margin-top:12px;
  overflow:hidden;
  border-radius:14px;
}
.table th, .table td{
  border-bottom:1px solid var(--border);
  padding:10px 10px;
  text-align:left;
  font-size:14px;
}
.table th{color:var(--muted); font-weight:700}
.badge{
  display:inline-flex;
  border:1px solid var(--border);
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
  color:var(--muted);
}
.notice{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background: rgba(255,255,255,.02);
  color: var(--muted);
  font-size:13px;
}
input[type="password"], input[type="text"], input[type="url"]{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.02);
  color: var(--text);
  outline:none;
  width: min(420px, 100%);
}

html[lang="ar"] body{font-family: "Simplified Arabic", Tahoma, Arial, sans-serif;}
html[lang="ar"] .heroBalloons .heroText{text-align:right}
html[lang="ar"] .balloon{text-align:right}
html[lang="ar"] .balloon::after{right:20px; left:auto}

@media (max-width:720px){
  .topbar{flex-wrap:wrap; gap:12px}
  .actions{flex-wrap:wrap; justify-content:flex-start}
  .grid{grid-template-columns:1fr}
  .brand .title{font-size:18px}
  .card{padding:16px}
  .btn{padding:10px 12px}
  .pill{font-size:12px}
  .qbox{padding:14px}
  .table{font-size:12px}
}


.label{
  display:block;
  font-size:13px;
  color:var(--muted);
  margin-bottom:6px;
}
.input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  outline:none;
}
[data-theme="light"] .input{background:#fff}
.input:focus{border-color:rgba(124,58,237,.6); box-shadow:0 0 0 3px rgba(124,58,237,.15)}
.btn.primary{background:linear-gradient(135deg, var(--accent), var(--accent2)); border:none}
.brandLink{color:inherit; text-decoration:none}

/* Charts */
.chart{display:block; width:100%; height:260px;}
.chartCardTitle{font-weight:800; margin:0 0 10px 0; font-size:14px; color:var(--muted)}


/* Balloon hero */

/* ===== Creative balloons hero (fast + calm) ===== */
.heroBalloons{
  margin-top:16px;
  display:grid;
  grid-template-columns: 1.05fr 1fr;
  gap:14px;
  align-items:center;
}
.heroBalloons .heroText{
  padding:18px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background: rgba(255,255,255,.02);
}
.heroBalloons .kicker{
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:12px;
  opacity:.75;
}
.heroBalloons h1{
  margin:10px 0 10px 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height:1.05;
}
.heroBalloons p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

.balloonField{
  position:relative;
  min-height: 420px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background: rgba(255,255,255,.02);
  overflow:hidden;
}
.balloonCenter{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%);
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.20), rgba(0,0,0,.04));
  box-shadow: inset 0 0 0 1px var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:18px;
  pointer-events:none;
}
.balloonCenter span{
  font-weight:900;
  font-size:18px;
  letter-spacing:.03em;
}

.balloon{
  position:absolute;
  left: var(--x);
  top:  var(--y);
  transform: translate(-50%,-50%);
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.08);
  box-shadow: 0 12px 26px rgba(0,0,0,.12);
  cursor:pointer;
  user-select:none;
  transition: transform .18s ease, box-shadow .18s ease;
  animation: floaty var(--dur, 7.2s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  color:#0b1220;
  text-align:left;
  max-width: 270px;
}
.balloonTitle{
  font-weight:900;
  font-size:14px;
  line-height:1.1;
  margin-bottom:6px;
}
.balloonMeta{
  font-weight:700;
  font-size:12px;
  opacity:.78;
  line-height:1.25;
}
.balloon::after{
  content:"";
  position:absolute;
  left: 20px;
  bottom:-8px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-left: 1px solid rgba(0,0,0,.08);
  border-bottom: 1px solid rgba(0,0,0,.08);
  transform: rotate(45deg);
  border-radius: 3px;
}
.balloon:hover{
  transform: translate(-50%,-50%) scale(1.05);
  box-shadow: 0 16px 34px rgba(0,0,0,.16);
}
@keyframes floaty{
  0%,100% { translate: 0 0; }
  50%     { translate: 0 -8px; }
}
@media (prefers-reduced-motion: reduce){
  .balloon{ animation: none; }
}

@media (max-width: 900px){
  .heroBalloons{ grid-template-columns: 1fr; }
  .balloonField{ min-height: 360px; }
}
