* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background: linear-gradient(145deg, #f8f0e6 0%, #e6d5b8 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.card {
  background: rgba(255, 250, 240, 0.95);
  backdrop-filter: blur(6px);
  width: 100%;
  max-width: 680px;
  border-radius: 42px 42px 32px 32px;
  box-shadow:
    0 25px 45px -12px rgba(90, 60, 30, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #fff9ee;
  transition: all 0.25s ease;
}

.panel {
  padding: 28px 24px 32px;
}

h1,
h2,
h3 {
  font-weight: 550;
  letter-spacing: 0.02em;
  color: #3e2e1f;
}

h1 {
  font-size: 2.1rem;
  border-left: 7px solid #b38b5f;
  padding-left: 18px;
  margin-bottom: 16px;
  line-height: 1.2;
  text-shadow: 1px 1px 0 #ffe4bc;
}

.desc {
  font-size: 1.1rem;
  color: #4d3a26;
  background: #f5ede1;
  padding: 20px 18px;
  border-radius: 28px;
  margin: 20px 0 28px;
  box-shadow: inset 0 1px 4px #ddd0bc;
}

.btn {
  background: #c9ab84;
  border: none;
  color: #2e2218;
  font-weight: 600;
  font-size: 1.4rem;
  padding: 18px 0;
  width: 100%;
  border-radius: 60px;
  box-shadow:
    0 5px 0 #8f6e4c,
    0 8px 16px rgba(100, 60, 20, 0.25);
  transition: 0.07s linear;
  cursor: pointer;
  margin-top: 10px;
  letter-spacing: 2px;
}

.btn:active {
  transform: translateY(5px);
  box-shadow:
    0 2px 0 #8f6e4c,
    0 6px 14px rgba(100, 60, 20, 0.2);
}

.btn:disabled {
  opacity: 0.45;
  transform: translateY(0);
  box-shadow: 0 5px 0 #7e6a53;
  pointer-events: none;
  filter: grayscale(0.4);
}

.input-group {
  margin: 18px 0;
  text-align: left;
}

label {
  font-weight: 550;
  color: #4f3b27;
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
  padding-left: 12px;
}

input {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.05rem;
  border: 2px solid #dec6a8;
  border-radius: 48px;
  background: white;
  transition: 0.2s;
  outline: none;
  color: #1f160f;
}

input:focus {
  border-color: #a0754b;
  box-shadow: 0 0 0 4px #eddbbf;
}

.question-box {
  background: #fffcf4;
  border-radius: 40px;
  padding: 22px 20px;
  margin-bottom: 24px;
  border: 1px solid #ebd8be;
}

.q-title {
  font-size: 1.3rem;
  font-weight: 540;
  margin-bottom: 22px;
  color: #2b1f13;
}

.option {
  background: #f3e9db;
  border-radius: 100px;
  margin: 12px 0;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  border: 2px solid transparent;
  transition: 0.1s;
  cursor: pointer;
}

.option.selected {
  background: #d4c2a9;
  border-color: #916e44;
  box-shadow: 0 2px 6px #bc9f7c;
}

.option input[type="radio"] {
  width: 22px;
  height: 22px;
  margin-right: 18px;
  accent-color: #7d5d3a;
  transform: scale(1.1);
  cursor: pointer;
}

.option label {
  margin: 0;
  font-weight: 470;
  font-size: 1.08rem;
  color: #2b1f12;
  width: 100%;
  cursor: pointer;
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.counter {
  background: #b4916b;
  color: #281f14;
  padding: 12px 22px;
  border-radius: 60px;
  font-weight: 600;
}

.nav-btn {
  background: #e3cfb7;
  border: none;
  padding: 14px 28px;
  border-radius: 48px;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 4px 0 #a58664;
  cursor: pointer;
}

.nav-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #a58664;
}

.nav-btn:disabled {
  opacity: 0.4;
  transform: translateY(0);
  box-shadow: 0 2px 0 #a58664;
  cursor: not-allowed;
}

.result-panel {
  text-align: center;
}

.score-badge {
  background: #ad8b67;
  display: inline-block;
  padding: 16px 40px;
  border-radius: 90px;
  font-size: 2.4rem;
  font-weight: 700;
  margin: 25px 0;
  color: #261d12;
}

.cert-btn {
  background: #5f7b6e;
  color: white;
  font-size: 1.6rem;
  padding: 18px;
  border-radius: 50px;
  border: none;
  width: 100%;
  font-weight: 600;
  box-shadow: 0 6px 0 #2f4a3e;
  margin-top: 20px;
  cursor: pointer;
}

.cert-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #2f4a3e;
}

.cert-btn:disabled {
  opacity: 0.4;
  transform: translateY(0);
  box-shadow: 0 4px 0 #2f4a3e;
  cursor: not-allowed;
}

.small-note {
  color: #4f3e2b;
  margin: 14px;
}

.hidden {
  display: none;
}

.error-message {
  color: #b13e3e;
  font-weight: 500;
  margin-top: 8px;
}

.loading {
  pointer-events: none;
  opacity: 0.7;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  .btn {
    font-size: 1.2rem;
    padding: 15px 0;
  }

  .panel {
    padding: 20px 16px;
  }

  .option {
    padding: 10px 14px;
  }

  .nav-btn {
    padding: 10px 20px;
  }
}
