/* ================================
   PollyGlot — Figma-style UI
   Pairs with your current index.html
   ================================ */

:root{
  --bg: #0f1626;             /* dark header/navy */
  --page: #f3f6fb;           /* page background */
  --card: #ffffff;
  --card-bd: #2b68ff;        /* electric blue outline */
  --muted: #667085;
  --text: #0f172a;
  --heading: #0b1221;
  --primary: #2563ff;
  --primary-pressed:#1f4fe0;
  --input-bd:#d7deea;
  --input-bg:#f8fbff;
  --shadow: 0 16px 40px rgba(17, 24, 39, .16);
  --radius: 16px;
}

*{ box-sizing:border-box; }
html,body{
  height:100%;
  margin:0;
  color:var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
  background: linear-gradient(180deg, var(--bg) 0 160px, var(--page) 160px 100%);
}

/* ===== Header (dark band) ===== */
.header{
  height:160px;
  background: var(--bg);
  display:flex; align-items:center;
  padding-inline:24px;
}
.brand{
  display:flex; align-items:center; gap:12px;
  color:#fff; font-size:28px; font-weight:800;
}
.brand img{ width:34px; height:34px; object-fit:contain; }

/* ===== Centered card ===== */
.container{
  max-width:960px;
  margin:-72px auto 80px;           /* lift card over header band */
  padding:0 16px;
  display:flex; justify-content:center;
}
.panel{
  width: 680px;                     /* roomy single column */
  background:var(--card);
  border: 3px solid var(--card-bd);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

/* ===== Titles ===== */
.title{
  margin:0 0 16px;
  color:var(--heading);
  font-size:28px; line-height:1.2; font-weight:900;
}

/* ===== Fields ===== */
.field{ margin: 16px 0 18px; }
.block{ display:block; font-weight:700; margin-bottom:10px; color:#0f172a; }

textarea{
  width:100%;
  min-height:180px;
  padding:14px 16px;
  border:2px solid var(--card-bd);    /* strong blue focus look in Figma */
  border-radius:12px;
  background:var(--input-bg);
  font-size:16px; resize:vertical;
  outline:none;
  box-shadow: 0 0 0 4px rgba(43,104,255,.14);
}
textarea:focus{
  border-color: var(--card-bd);
  box-shadow: 0 0 0 6px rgba(43,104,255,.18);
}

/* ===== Radio (language chips) ===== */
.radio-row{ display:flex; gap:16px; flex-wrap:wrap; }
.radio{
  display:flex; align-items:center; gap:8px;
  padding:12px 14px;
  border:2px solid var(--input-bd);
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  font-weight:600;
  min-width: 180px; justify-content:center;
}
.radio input{ accent-color: var(--card-bd); }

/* wrapper label “Select language 👇” box */
#screen-input .field:nth-of-type(2) .block{
  background:#f1f5ff;
  border:1px solid #dbe5ff;
  color:#0b1221;
  border-radius:12px;
  padding:10px 14px;
}

/* ===== Buttons ===== */
.btn{
  width:100%;
  height:56px;
  border-radius:14px;
  border:none;
  font-size:18px;
  font-weight:900;
  cursor:pointer;
  transition: transform .06s ease, background .2s ease, box-shadow .2s ease;
}

.btn.btn-primary{
  background:var(--primary); color:#fff;
  box-shadow: 0 10px 22px rgba(37,99,255,.25);
}
.btn.btn-primary:hover{
  background:var(--primary-pressed);
  box-shadow: 0 14px 28px rgba(37,99,255,.28);
}
.btn.btn-primary:active{ transform: translateY(1px); }

.btn.btn-ghost{
  background:#fff; color:var(--text);
  border:2px solid var(--input-bd);
}

/* ===== Helper / error ===== */
.helper{ margin-top:10px; color:#d92d20; font-weight:700; }

/* ===== Screen switching ===== */
.screen{ display:none; }
.screen.active{ display:block; }

/* ===== Results layout (two stacked blocks) ===== */
.result-box{ display:grid; gap:18px; margin-top:4px; }
.block-card{
  border:1.5px solid var(--input-bd);
  border-radius:12px;
  background:var(--input-bg);
  padding:14px 16px;
}
.label{
  font-weight:800; margin-bottom:6px; color:#0b1221; display:flex; gap:8px; align-items:center;
}
pre{
  margin:0; white-space:pre-wrap; word-wrap:break-word;
  font-family: inherit; font-size:16px; color:var(--text);
}

/* Map your HTML “block” + <pre> structure used in results */
#screen-results .block{ border:1.5px solid var(--input-bd); border-radius:12px; background:var(--input-bg); padding:14px 16px; }
#screen-results .label{ font-weight:800; margin-bottom:6px; }

/* ===== Responsive ===== */
@media (max-width:720px){
  .panel{ width:100%; padding:20px; }
  .radio{ min-width: unset; flex:1 1 auto; }
  .title{ font-size:24px; }
}

/* =======================================================
   FINAL POLISH: make “Start Over” blue + soften result boxes
   ======================================================= */
#screen-results .btn-secondary{
  background: var(--primary);
  color:#fff;
  border:none;
  box-shadow: 0 8px 20px rgba(37,99,255,.25);
}
#screen-results .btn-secondary:hover{
  background: var(--primary-pressed);
  box-shadow: 0 10px 24px rgba(37,99,255,.30);
}
#screen-results .btn-secondary:active{ transform: translateY(1px); }

/* Softer, Figma-like panels for the two result blocks */
#screen-results .panel{
  background: var(--input-bg);
  border: 2px solid #dbe5ff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(37,99,255,.05);
  margin-bottom: 18px;
}
