:root {
  --fb-blue: #3B5898;
  --panel-bg: rgba(255,255,255,0.05);
  --panel-border: rgba(20,30,60,0.5);
  --panel-blur: 12px;
  --text: #ffffff;
  --muted: rgba(255,255,255,0.85);
  --shadow: rgba(0,0,0,0.35);
  --accent: #5972a7;
}

/* Base */
html, body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--fb-blue);
  color: var(--text);
  font-family: "Inter", Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Topbar */
.topbar {
  position: relative;
  /* top: 0; removed to allow bar to scroll */
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(to bottom, #637aad 5%, #5972a7 100%);
  border-bottom: 1px solid #314179;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 6px 18px var(--shadow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.35));
}
.brand-name {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.nav {
  display: flex;
  gap: 18px;
}
.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  opacity: 0.9;
}
.nav-link:hover { opacity: 1; }

/* Layout */
.container {
  max-width: 980px;
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  gap: 22px;
}
.panel {
  background: var(--panel-bg);
  backdrop-filter: blur(var(--panel-blur));
  border: 1px solid var(--panel-border);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 18px 28px var(--shadow);
  border-radius: 10px;
  padding: 18px;
}
.panel-title {
  margin: 0 0 8px 0;
  font-size: 22px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.5);
}
.panel-text {
  margin: 6px 0 16px 0;
  color: var(--muted);
}

/* Controls */
.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.control label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.select {
  appearance: none;
  background: linear-gradient(to bottom, #5e76b3 0%, #47629e 100%);
  color: #fff;
  border: 1px solid #2a3e6b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
  padding: 10px 12px;
  border-radius: 6px;
  width: 100%;
}

/* Slider styled like FB blue */
.range {
  width: 100%;
  -webkit-appearance: none;
  height: 8px;
  border-radius: 6px;
  background: linear-gradient(to bottom, #637aad 0%, #5972a7 100%);
  border: 1px solid #314179;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #314179;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.4);
}
.range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #314179;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* Provided Button */
.myButton {
	box-shadow:inset 0px 1px 0px 0px #7a8eb9;
	background:linear-gradient(to bottom, #637aad 5%, #5972a7 100%);
	background-color:#637aad;
	border:1px solid #314179;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:20px;
	font-weight:bold;
	padding:6px 12px;
	text-decoration:none;
	text-shadow:0px -1px 0px #000000;
  border-radius: 6px;
}
.myButton:hover {
	background:linear-gradient(to bottom, #5972a7 5%, #637aad 100%);
	background-color:#5972a7;
}
.myButton:active {
	position:relative;
	top:1px;
}

/* Checkbox (provided) */
.css-checkbox { position: absolute; overflow: hidden; clip: rect(0 0 0 0); height: 1px; width: 1px; margin: -1px; padding: 0; border: 0; }
#inputPreview { display: flex; gap: 20px; justify-content: center; }
.css-checkbox + label { position: relative; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; height: 18px; color: rgb(255, 255, 255); }
.css-checkbox + label::before { content: " "; display: inline-block; vertical-align: middle; margin-right: 3px; width: 16px; height: 16px; background-color: rgb(59, 88, 152); border-width: 1px; border-style: solid; border-color: rgb(42, 62, 107); border-radius: 0px; box-shadow: rgba(0, 0, 0, 0) 1px 0px 0px 0px; }
.css-checkbox:checked + label::after { content: " "; background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48cGF0aCBmaWxsPSIjZmZmZmYxIiBkPSJNMCA5NkMwIDYwLjY1IDI4LjY1IDMyIDY0IDMySDM4NEM0MTkuMyAzMiA0NDggNjAuNjUgNDQ4IDk2VjQxNkM0NDggNDUxLjMgNDE5LjMgNDgwIDM4NCA0ODBINjRDMjguNjUgNDgwIDAgNDUxLjMgMCA0MTZWOTZ6Ii8+PC9zdmc+"); background-repeat: no-repeat; background-size: 10px 10px; background-position: center center; position: absolute; display: flex; justify-content: center; align-items: center; margin-left: 0px; left: 0px; top: 0px; text-align: center; background-color: transparent; font-size: 10px; height: 18px; width: 18px; }

/* Radios styled like FB blue */
.css-radio { position: absolute; opacity: 0; pointer-events: none; }
.css-radio + label {
  position: relative; font-size: 14px; cursor: pointer; display: inline-flex;
  align-items: center; height: 18px; color: #fff; margin-right: 12px;
}
.css-radio + label::before {
  content:""; width:16px; height:16px; margin-right:6px; border-radius:50%;
  background: linear-gradient(to bottom,#5e76b3,#47629e);
  border:1px solid #2a3e6b; box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.css-radio:checked + label::after {
  content:""; position:absolute; left:5px; top:5px; width:8px; height:8px; border-radius:50%; background:#fff;
}

/* Versions grid */
.versions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.version-card {
  background: linear-gradient(to bottom, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 14px 22px var(--shadow);
  padding: 14px;
  backdrop-filter: blur(10px);
}
.version-title {
  margin: 0 0 6px;
  font-weight: 700;
}
.version-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.version-desc {
  font-size: 14px;
  color: #f5f7ff;
  margin-bottom: 12px;
}

/* Footer */
.footer {
  margin-top: 16px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(30,50,100,0.28);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(0,0,0,0.2);
}

/* Modal */
.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: grid; place-items: center; z-index: 20; }
.modal-card {
  width: min(520px, 92%); background: rgba(255,255,255,0.06);
  border: 1px solid var(--panel-border); backdrop-filter: blur(10px);
  border-radius: 10px; padding: 16px; box-shadow: 0 18px 28px var(--shadow), inset 0 1px 0 rgba(255,255,255,0.12);
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.survey-options { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }

/* Feature list */
.feature-list, .feature-grid { padding-left: 18px; margin: 10px 0; color: var(--muted); }

.hidden { display: none !important; }

.tabs { display:flex; gap:10px; margin:10px 0 6px; }
.tab {
  background: linear-gradient(to bottom, #5e76b3 0%, #47629e 100%);
  color:#fff; border:1px solid #2a3e6b; box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
  padding:8px 12px; border-radius:6px; cursor:pointer; font-weight:600;
}
.tab.active { background: linear-gradient(to bottom, #637aad 5%, #5972a7 100%); }

.tab-content { margin-top:8px; }

.text-input {
  width:100%; padding:10px 12px; border-radius:6px; border:1px solid #2a3e6b;
  background: linear-gradient(to bottom, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  color:#fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.info-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.info-card {
  background: linear-gradient(to bottom, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  border:1px solid var(--panel-border); border-radius:10px; padding:12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 12px 20px var(--shadow);
}

.corner-icon {
  position: fixed;
  top: 72px;
  left: 12px;
  width: 128px;
  height: 128px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.35));
  z-index: 9;
}
.corner-icon.at-top { top: 8px; }

@keyframes flashBG { from { background: rgba(255,255,255,0.22); } to { background: var(--panel-bg); } }
.panel.flash { animation: flashBG 1s ease-out; }