/* ========== v3.1 Styles (Final) ========== */
/* Clear comments included so you can change easily */

/* ---------- Base ---------- */
:root{
  --dark-bg: #1e1e1e;
  --dark-panel: #2a2a2a;
  --gold: #d4af37;
  --gold-soft: rgba(212,175,55,0.12);

  --blue-bg: #f0f8ff;
  --blue-panel: #ffffff;
  --blue-primary: #007acc;
  --blue-soft: rgba(0,122,204,0.08);

  --text-dark: #111;
  --text-light: #f4f4f4;

  --radius: 10px;
  --shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* Global */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  transition: background 0.4s ease, color 0.4s ease;
}

/* Header */
.site-header{
  position: relative;
  padding: 18px 28px;
  overflow: visible;
}

/* inner header layout */
.header-inner{
  display:flex;
  justify-content: space-between;
  align-items: center;
}

/* logo + title */
.logo-section { display:flex; align-items:center; gap:12px; }
.logo {
  height: 56px;
  width: auto;
  display:block;
  border-radius:8px;
  transition: transform 0.25s ease;
}
.site-title {
  margin:0;
  font-size:20px;
  font-weight:700;
  letter-spacing:0.2px;
}

/* header light effect container (subtle) */
.header-light{
  position:absolute;
  left:0; right:0; top:100%;
  height:60px;
  pointer-events:none;
  filter: blur(18px);
  opacity:0.6;
  transform: translateY(-20px);
  z-index: -1;
  transition: background 0.5s ease, opacity 0.4s ease;
  border-radius: 0 0 18px 18px;
  margin: 0 28px;
}

/* Controls (theme button) */
.controls { display:flex; align-items:center; gap:10px; }
.theme-btn{
  padding:8px 14px;
  border-radius:8px;
  border: none;
  cursor:pointer;
  font-weight:700;
  transition: transform 0.18s ease;
}
.theme-btn:active { transform: scale(0.98); }

/* ---------- Layout ---------- */
main{
  display:flex;
  gap:22px;
  padding: 22px;
  justify-content:center;
  align-items:flex-start;
  flex-wrap:wrap;
}

/* left form column */
.form-section {
  width: 380px;
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* right column */
.right-column { display:flex; flex-direction:column; gap:18px; width:420px; }

/* output/history panels */
.output-section, .history-section {
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* inputs */
label{ display:block; margin-top:12px; font-weight:600; }
input, select, textarea {
  margin-top:6px;
  padding:10px;
  border-radius:6px;
  border:1px solid rgba(0,0,0,0.12);
  font-size:14px;
  width:100%;
  background:transparent;
  color:inherit;
}
textarea { resize: vertical; min-height:60px; max-height:200px; }

/* ✅ Claim/CPT box responsive width */
.claim-cpt-box {
  min-width: 200px;
  max-width: 400px;
  width: 100%;
}

/* buttons */
.primary-btn {
  margin-top:14px;
  padding:12px;
  width:100%;
  border-radius:8px;
  border:none;
  cursor:pointer;
  font-weight:800;
}
.secondary-btn { padding:8px 12px; border-radius:8px; cursor:pointer; border:none; }

/* small button row */
.btn-row { display:flex; gap:10px; margin-top:10px; }

/* history list */
#historyList { list-style:none; padding:0; margin:0; max-height:260px; overflow:auto; }
#historyList li { padding:10px; margin-bottom:10px; border-left:4px solid currentColor; background:transparent; }

/* footer */
footer{ text-align:center; padding:12px 8px; font-size:13px; opacity:0.85; }

/* ========== Dark Mode Theme ========== */
body.dark-mode{
  background: var(--dark-bg);
  color: var(--text-light);
}

/* header */
body.dark-mode .site-header { background: linear-gradient(180deg,#2b2b2b 0%, #232323 100%); color:var(--text-light); }
body.dark-mode .logo { box-shadow: 0 4px 18px rgba(0,0,0,0.6); }

/* panels */
body.dark-mode .form-section, body.dark-mode .output-section, body.dark-mode .history-section {
  background: var(--dark-panel);
  border: 1px solid rgba(255,255,255,0.02);
}

/* text color hints */
body.dark-mode label { color: var(--gold); }
body.dark-mode .site-title { color: var(--gold); }

/* header light for dark theme */
body.dark-mode .header-light {
  background: radial-gradient(circle at 20% 20%, rgba(212,175,55,0.16), transparent 20%),
              radial-gradient(circle at 80% 50%, rgba(0,191,255,0.06), transparent 20%);
}

/* buttons in dark */
body.dark-mode .primary-btn { background: var(--gold); color: var(--dark-bg); }
body.dark-mode .secondary-btn { background: rgba(212,175,55,0.12); color: var(--gold); border: 1px solid rgba(212,175,55,0.08); }
body.dark-mode .theme-btn { background: rgba(255,255,255,0.06); color: var(--gold); border: 1px solid rgba(212,175,55,0.08); }

/* ✅ dropdown fix (dark mode) */
body.dark-mode select {
  background-color: #2c2c2c;
  color: #ffffff;
  border: 1px solid #d4af37;
}

/* history color accent */
body.dark-mode #historyList li { color: #f4f4f4; border-color: rgba(212,175,55,0.9); }

/* ========== Light (Blue) Mode Theme ========== */
body.light-mode{
  background: var(--blue-bg);
  color: var(--text-dark);
}

body.light-mode .site-header { background: linear-gradient(180deg,#007acc 0%, #005fa3 100%); color:#fff; }
body.light-mode .logo { box-shadow: 0 6px 18px rgba(0,122,204,0.14); }

/* panels in light */
body.light-mode .form-section, body.light-mode .output-section, body.light-mode .history-section {
  background: var(--blue-panel);
  border: 1px solid rgba(2,45,84,0.06);
}
body.light-mode label { color: #004080; }
body.light-mode .site-title { color: #fff; }

/* header light for blue theme */
body.light-mode .header-light {
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 20%),
              radial-gradient(circle at 80% 50%, rgba(0,122,204,0.12), transparent 20%);
}

/* buttons in light */
body.light-mode .primary-btn { background: var(--blue-primary); color: #fff; }
body.light-mode .secondary-btn { background: var(--blue-soft); color: var(--blue-primary); border: 1px solid rgba(0,122,204,0.08); }
body.light-mode .theme-btn { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.08); }

/* ✅ dropdown fix (light mode) */
body.light-mode select {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #00bfff;
}

/* history accent */
body.light-mode #historyList li { color: var(--text-dark); border-color: var(--blue-primary); }

@media (max-width: 900px){
  main { flex-direction: column; align-items: center; }
  .form-section, .right-column { width: 92%; }
  .logo { height:48px; }
}
