:root{
  --bg-dark: linear-gradient(135deg,#071032,#0f172a);
  --card: rgba(255,255,255,0.03);
  --glass: rgba(0,0,0,0.04);
  --accent: #ffd166;
  --text: #e9f2ff;
  --muted: rgba(233,242,255,0.8);
  --radius: 14px;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%;margin:0;background:var(--bg-dark);color:var(--text);-webkit-font-smoothing:antialiased}
.app{min-height:100%;display:flex;flex-direction:column;align-items:center;padding:22px}

/* Top bar */
.topbar{width:100%;max-width:1100px;display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.brand{display:flex;gap:12px;align-items:center}
.brand-logo{font-size:28px;width:56px;height:56px;border-radius:12px;background:var(--card);display:flex;align-items:center;justify-content:center;color:var(--accent);font-weight:800}
.tag{font-size:12px;opacity:0.9}

/* Main card */
.card{width:100%;max-width:1100px;background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));padding:18px;border-radius:18px;box-shadow:0 20px 60px rgba(2,6,23,0.6);position:relative}
.bear-area{position:absolute;left:50%;transform:translateX(-50%);top:-56px;width:120px;height:120px;pointer-events:none}
.bear-area svg{width:120px;height:120px;display:block}

/* Grid layout */
.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:36px}
.box{background:rgba(0,0,0,0.25);padding:14px;border-radius:12px;min-height:220px;display:flex;flex-direction:column;gap:10px}

/* Labels and select/textarea */
label{font-size:13px;opacity:0.95;color:#fff;font-weight:500;}
select,textarea{
  width:100%;
  padding:10px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.25);
  color:#fff;
  font-weight:500;
  font-size:14px;
}
textarea{min-height:110px;resize:vertical}

/* Row buttons / live display */
.row{display:flex;align-items:center;gap:8px;margin-top:6px}
.btn{background:var(--accent);color:#072022;padding:8px 12px;border-radius:10px;border:none;cursor:pointer;font-weight:700}
.secondary{background:rgba(255,255,255,0.1);border:1px solid rgba(255,255,255,0.3);color:#fff;}
.live{margin-left:auto;font-size:13px;opacity:0.95;color:#fff;}

/* Instructions container */
.instructions{
  margin-top:14px;
  padding:12px;
  border-radius:10px;
  background: rgba(0,0,0,0.3);
  color:#fff;
  font-size:14px;
}

/* Footer */
.footer{margin-top:14px;font-size:13px;opacity:0.9;color:#fff;}

/* Theme classes for output language */
body.theme-english{background:linear-gradient(135deg,#0ea5e9,#0369a1)}
body.theme-arabic{background:linear-gradient(135deg,#047857,#065f46)}
body.theme-french{background:linear-gradient(135deg,#f97316,#ef4444)}
body.theme-spanish{background:linear-gradient(135deg,#fb923c,#ef4444)}
body.theme-portuguese{background:linear-gradient(135deg,#10b981,#047857)}
body.theme-russian{background:linear-gradient(135deg,#ef4444,#7c2d12)}
body.theme-chinese{background:linear-gradient(135deg,#ef4444,#f97316)}
body.theme-hindi{background:linear-gradient(135deg,#f97316,#f59e0b)}
body.theme-swahili{background:linear-gradient(135deg,#06b6d4,#0891b2)}
body.theme-german{background:linear-gradient(135deg,#f43f5e,#7c3aed)}

/* Light theme override */
body.light{
  --bg-dark: linear-gradient(135deg,#f0f6ff,#edf7ff);
  --card: rgba(0,0,0,0.03);
  --glass: rgba(0,0,0,0.04);
  --text: #072022;
}
body.light label, body.light select, body.light textarea, body.light .instructions, body.light .footer{
  color:#072022;
}

/* Responsive */
@media (max-width:900px){
  .grid{grid-template-columns:1fr}
  .bear-area{left:unset;right:18px;top:-40px;transform:none}
  .card{padding:14px}
  select,textarea{font-size:14px;}
}
