:root {
  --navy: #1c4182;
  --gray-100: #f5f7fb;
  --gray-200: #e6ebf3;
  --gray-600: #626c7a;
  --gray-700: #4a5565;
  --shadow: 0 0 15px #00000026;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: #1a1c21;
  background: url("images/survey-bg-default.jpg") center/cover no-repeat fixed;
  padding: 32px;
}

.glass {
  width: 100%;
  background: #fafafab3;
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: none;
  animation: rise 260ms ease-out;
  padding: 7px;
  max-width: 430px;
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

@keyframes rise {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.header {
  background: var(--navy);
  color: #fff;
  padding: 11px 20px;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.01em;
  border: 0;
  border-top-left-radius: 13px;
  border-top-right-radius: 13px;
}

.body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: white;
  border-radius: 0.3em;
  position: relative;
  padding: 0;
  flex: 1;
  overflow: hidden;
}

.logo-container {
  text-align: center;
  margin-bottom: 20px;
}

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

.question {
  font-weight: 600;
  font-size: 16px;
  margin: 0;
  color: var(--gray-700);
  margin-bottom: 15px;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: #eaeaea;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    color 140ms ease;
  cursor: pointer;
}

.option input {
  width: 18px;
  height: 18px;
  accent-color: #19af54;
  cursor: pointer;
  appearance: none;
  border: 2px solid #ccc;
  border-radius: 50%;
  background: white;
  position: relative;
  flex-shrink: 0;
}

.option input:checked {
  border-color: #19af54;
  background: white;
}

.option input:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #19af54;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.option:hover {
  background: #19af54;
  border-color: #19af54;
  color: white;
  box-shadow: 0 6px 16px rgba(31, 74, 138, 0.08);
}

.option:has(input:checked) {
  background: #19af54;
  border-color: #19af54;
  color: white;
}

.meta {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  display: grid;
  gap: 6px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.4;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meta-row span:last-child {
  font-weight: 400;
  color: #838889;
}

.btn {
  height: 48px;
  border: none;
  border-radius: 10px;
  background: #19af54;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background 140ms ease,
    transform 120ms ease;
  width: 100%;
  margin-top: 8px;
  text-transform: uppercase;
}

.btn:disabled {
  background: #c0c6d1;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  background: #148f44;
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.status {
  font-size: 14px;
  color: var(--gray-700);
  min-height: 18px;
}

.error {
  color: #b42318;
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--gray-700);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #cfd5e2;
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fade 200ms ease-in;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 440px;
  padding: 23px 30px;
}

.fade-in.timeout-screen {
  justify-content: start;
}

.fade-in.cemDetails {
  min-height: auto;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.muted {
  color: var(--gray-600);
  font-size: 14px;
}

.timeout-screen {
  padding: 40px 20px;
}

.timeout-screen .status {
  margin-bottom: 8px;
}

.cem-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-700);
  margin: 0 0 16px 0;
}

.cem-message {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-y: auto;
  flex: 1;
  padding-right: 8px;
}

.cemDetails {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
