:root{
  --bg:#0b0b12;
  --fg:#ffffff;
  --muted:#bfc3d6;
  --glass:rgba(255,255,255,.06);
  --ring:rgba(139,92,246,.45);
  --accent:#8b5cf6;
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial;
  color:var(--fg);
  background:
    radial-gradient(900px 500px at 110% 0%, rgba(34,211,238,.18), transparent 55%),
    radial-gradient(1200px 700px at 10% -10%, rgba(139,92,246,.18), transparent 60%),
    linear-gradient(180deg,#0a0a11,#0b0b12 40%);
}

.logo-container {
  text-align: center;
  margin-top: 0 px;
}

.logo {
  max-width: 120px;  
  height: auto;
}

.shell{
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 18px 20px;
}

.hero{
  text-align:center;
  margin-bottom: 28px;
}
.title{
  margin:0;
  font-size: clamp(28px, 6.5vw, 48px);
  letter-spacing:.5px;
  font-weight: 800;
}
.subtitle{
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--muted);
}

.input-block{
  display:flex;
  flex-direction:column;
  gap:12px;
}
textarea{
  resize: vertical;
  width:100%;
  min-height: 70px;
  background: var(--glass);
  color: var(--fg);
  border:1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 16px 14px;
  font-size: 16px;
  line-height: 1.4;
  outline:none;
  transition: box-shadow .15s ease, border .15s ease, background .15s ease;
}
textarea:focus{
  border-color: var(--ring);
  box-shadow: 0 0 0 6px rgba(139,92,246,.10);
  background: rgba(255,255,255,.10);
}
.btn{
  margin-top: 10px;   
  align-self: center;
  cursor:pointer;
  border:none;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color:#0b0b12;
  padding: 14px 22px;
  font-weight: 800;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(139,92,246,.35);
  transition: transform .06s ease, filter .15s ease;
  margin-bottom: 20px;
}

.btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(166, 131, 247, 0.4), rgba(34,211,238,.4)); 
  color: var(--fg);
  backdrop-filter: blur(8px) saturate(140%);
  box-shadow: 0 0 20px rgba(182, 159, 236, 0.6), 0 0 30px rgba(34,211,238,.4); 
}
.btn:active{ transform: translateY(0); }

.answers-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 22px;
}

.answers{
  width: max-content;
  max-width: min(720px, 92vw);
  margin: 22px auto 0;

  background: rgba(255,255,255,.05);
  border: 5px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 32px 44px;
}

/* fallback for older browsers */
@supports not (width: max-content){
  .answers{ display: table; margin:22px auto 0; }
}

.answers h2{ margin: 0 0 8px 0; font-size: 18px; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Answer list WITHOUT numbers */
.answers-list {
  margin: 10px 0;
  padding: 0;           
  list-style: none;     
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 1.1rem;
}

.answers-list li {
  margin: 0;
}

/* Bubble holding text */
.answer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.05),
    rgba(34, 211, 238, 0.05)
  );
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 10px 14px;
}

/* Text area */
.answer-text {
  flex: 1 1 auto;
  min-width: 0;                  
  white-space: pre-wrap;         
}

.copy-btn {
  margin-left: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: #a9acb5;
  transition: color .15s ease;
  display: flex;
  align-items: center;
}
.copy-btn:hover { color: #d7d9e0; }
.copy-btn:active { color: #22d3ee; }

.retry{
  margin-top: 20px;
  margin-bottom: 100px;
  text-align: center;
}
.retry h3{ margin: 0 0 8px 0; font-size: 16px; color: var(--muted); margin-bottom: 15px;}
.chips{ display:flex; justify-content:center; gap:10px; flex-wrap:wrap; }
.chip{
  cursor:pointer;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:var(--fg);
  font-size: 1.05rem;
  padding:10px 12px;
  border-radius:999px;
  font-weight:700;
  display:flex; align-items:center; gap:10px;
  transition: transform .06s ease, background .15s ease, border .15s ease;
}
.chip:hover{ transform: translateY(-1px); background: rgba(255,255,255,.10); }
.chip.active {
  background: rgba(139,92,246,.25);
  border-color: var(--accent);
  font-weight: 800;
}

.icon{ font-size: 14px; line-height: 1; }

.hidden{ display:none; }

/* ====== Light theme palette (vibrant but soft) ====== */
html[data-theme="light"]{
  --bg:#f4f6fb;                 /* soft off-white with a blue tint */
  --fg:#0b0b12;
  --muted:#2c3245;
  --glass:rgba(0,0,0,.05);
  --ring:rgba(125, 54, 249, 0.35);  /* slightly purple ring */
  --accent:#823cf9;             /* keep brand purple */
}

html[data-theme="light"] body{
  color:var(--fg);
  background:
    radial-gradient(900px 520px at 110% 0%, rgba(34,211,238,.22), transparent 55%),
    radial-gradient(1200px 720px at 10% -10%, rgba(124,58,237,.20), transparent 62%),
    linear-gradient(180deg,#ffffff 0%, #eef2f8 55%);
}

html[data-theme="light"] textarea{
  background: rgba(0,0,0,.035);
  color: var(--fg);
  border-color: rgba(0,0,0,.12);
}
html[data-theme="light"] textarea:focus{
  border-color: var(--ring);
  box-shadow: 0 0 0 6px rgba(124,58,237,.10);
  background: rgba(0,0,0,.04);
}

html[data-theme="light"] .answers{
  background: rgba(255,255,255,.60);
  border-color: rgba(0,0,0,.08);
}

html[data-theme="light"] .answer-inner{
  background: linear-gradient(
    135deg,
    rgba(124,58,237,.10),
    rgba(34,211,238,.10)
  );
  border-color: rgba(0,0,0,.08);
}

html[data-theme="light"] .chip{
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.12);
  color: var(--fg);
}
html[data-theme="light"] .chip:hover{
  background: rgba(0,0,0,.08);
}

html[data-theme="light"] .btn{
  box-shadow: 0 10px 24px rgba(124,58,237,.20);
}
html[data-theme="light"] .btn:hover{
  background: linear-gradient(135deg, rgba(124,58,237,.45), rgba(34,211,238,.40));
  box-shadow: 0 0 18px rgba(124,58,237,.35), 0 0 28px rgba(34,211,238,.30);
}

html[data-theme="light"] .btn {
  background: linear-gradient(135deg, #8b5cf6, #22d3ee); /* purple → teal */
  color: #ffffff;                                        /* white text for contrast */
  box-shadow: 0 8px 20px rgba(124,58,237,.25), 0 0 20px rgba(34,211,238,.25);
}

html[data-theme="light"] .btn:hover {
  background: linear-gradient(135deg, #9f7aea, #38e0f0); /* slightly brighter on hover */
  box-shadow: 0 0 20px rgba(124,58,237,.35), 0 0 30px rgba(34,211,238,.35);
  color: #fff;
}

html[data-theme="light"] .chip {
  background: rgba(0,0,0,.06);
  border-color: rgba(0,0,0,.14);
  color: var(--fg);
  transition: box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

html[data-theme="light"] .chip:hover {
  background: rgba(0,0,0,.08);
  border-color: rgba(0,0,0,.20);
}

/* Active = subtle violet highlight + ring (matches dark accent feel) */
html[data-theme="light"] .chip.active {
  background: rgba(124,58,237,.12);             /* soft purple wash */
  border-color: rgba(124,58,237,.55);           /* clearer edge */
  box-shadow: 0 0 0 3px rgba(124,58,237,.18);   /* outer glow */
  color: var(--fg);
}

/* Optional: keyboard focus ring on light */
html[data-theme="light"] .chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124,58,237,.28);
}


/* ====== Toggle styling (sun ↔ moon, no libs) ====== */
.hero { position: relative; }  

.theme-toggle {
  position: absolute;
  top: 6px;          
  right: 0;        
  z-index: 50;
}

.theme-toggle input{ position:absolute; opacity:0; pointer-events:none; }

.theme-toggle .switch{
  --h: 28px; --w: 54px;
  display:inline-flex; align-items:center;
  width:var(--w); height:var(--h);
  border-radius:999px; position:relative; cursor:pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(6px) saturate(140%);
  transition: background .25s ease, box-shadow .25s ease;
}
.theme-toggle .track{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:space-between;
  padding:0 8px;
}
.theme-toggle .icon{ width:14px; height:14px; opacity:.65; transition: opacity .25s, transform .25s; }
/* sun svg */
.theme-toggle .icon.sun{
  background:no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'><path d='M6.76 4.84l-1.8-1.79L3.17 4.84l1.79 1.79 1.8-1.79zm10.48 0l1.79-1.79 1.79 1.79-1.79 1.79-1.79-1.79zM12 4V1h0v3zm0 19v-3h0v3zm7.16-7.16l1.79 1.79-1.79 1.79-1.79-1.79 1.79-1.79zM4.84 15.84l-1.79 1.79L1.26 15.84l1.79-1.79 1.79 1.79zM12 7a5 5 0 100 10A5 5 0 0012 7z'/></svg>");
}
/* moon svg */
.theme-toggle .icon.moon{
  background:no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'><path d='M21 12.79A9 9 0 1111.21 3a7 7 0 109.79 9.79z'/></svg>");
}
.theme-toggle .knob{
  position:absolute; top:2px; left:2px; width:24px; height:24px; border-radius:999px; background:#fff;
  box-shadow: 0 4px 18px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.2);
  transition: transform .25s ease;
}
/* checked = light */
.theme-toggle input:checked + .switch{
  background: rgba(0,0,0,.08);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.theme-toggle input:checked + .switch .knob{ transform: translateX(26px); }
.theme-toggle input:checked + .switch .icon.sun{ opacity:.9; transform:scale(1.05); }
.theme-toggle input:not(:checked) + .switch .icon.moon{ opacity:.9; transform:scale(1.05); }
