body {
  font-family: "Segoe UI", Arial;
  margin: 0;
  background: #f4f6f9;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* HEADER */
.header {
  background: #ff9800;
  text-align: center;
  padding: 18px;
  border-bottom: 3px solid black;
}

.box-title{
    text-align: center;
    font-size: 25px;
    font-weight: bold;
}

/* CONTAINER */
.container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 14px;
}

/* CARD */
.card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  margin-bottom: 15px;
}

.inner {
  margin-top: 10px;
}
.inner .chk{
  text-align: center;
}



/* FORM BOX */
.form-container {
  max-width: 600px;
  margin: auto;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  border: 1px solid #ffe0b2;
}

/* HEADER */
.form-header {
  text-align: center;
  margin-bottom: 25px;
}

.form-header h2 {
  color: #ff9800;
}

.step {
  font-size: 13px;
  color: #888;
}

/* INPUT */
.input-group {
  margin-bottom: 15px;
  display: flex;
  justify-content: center; 
}

input {
  width: 90%;
  max-width: 650px;
  padding: 12px;
  border-radius: 10px;
  border: 1.5px solid #ddd;
  font-size: 14px;
  background: #fffdf8;
  transition: 0.25s;
}

input:focus {
  border-color: #ff9800;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,152,0,0.2);
}

/* QUESTIONS */
.question-card {
  padding: 18px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #fff3e0);
  border: 1px solid #ffe0b2;
  transition: 0.25s;
  position: relative;
}

.question-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* QUESTION NUMBER STYLE */
.question-card p b {
  color: #ff9800;
}

/* SCALE */
.scale {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  gap: 8px;
}

/* SCALE OPTIONS */
.scale-option {
  flex: 1;
  padding: 10px 6px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid #ddd;
  cursor: pointer;
  font-size: 12px;
  background: white;
  transition: 0.2s;
}

.scale-option:hover {
  background: #ffe0b2;
  transform: scale(1.05);
}

/* ACTIVE SCALE */
.scale-option.active {
  background: linear-gradient(135deg, #ff9800, #ffb74d);
  color: white;
  border-color: #ff9800;
  box-shadow: 0 5px 12px rgba(255,152,0,0.4);
}

/* TEXTAREA */
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1.5px solid #ddd;
  background: #fffdf8;
  transition: 0.2s;
}

textarea:focus {
  border-color: #ff9800;
  background: #fff;
}

/* BUTTON */
.btn-wrap {
  text-align: center;
  margin-top: 20px;
}

.btn {
  background: linear-gradient(135deg, #ff9800, #ffb74d);
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: white;
  transition: 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(255,152,0,0.4);
}

/* RESULT */
.result-card {
  background: white;
  padding: 25px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 15px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}
.result-card h2{
    font-size: 40px;
}
.result-card p{
    font-size: 16px;
}
.result-card.stats {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
}

/* STARS */
.stars span {
  font-size: 26px;
  margin: 0 3px;
}

.stars .empty {
  opacity: 0.3;
}

/* ERROR */
.error {
  color: red;
  text-align: center;
  margin-top: 10px;
}

/* UTIL */
.hidden {
  display: none;
}

.welcome-block {
  max-width: 760px;
  margin: 12px auto 0;
  line-height: 1.6;
}

.study-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-top: 10px;
}

.welcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.thanks-banner {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 1px solid #ffe0b2;
  text-align: center;
  font-weight: 600;
}

.welcome-block h2 {
  text-align: center;
  margin: 6px 0 14px;
}

.welcome-block h3 {
  margin: 14px 0 6px;
}

.instructions {
  margin: 8px 0 0;
  padding-left: 20px;
}

.instructions li {
  margin: 6px 0;
}

.visit-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.timer {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timer-label {
  font-size: 13px;
  color: #555;
}

.timer-value {
  font-size: 26px;
  font-weight: 700;
}

.visit-note {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fffdf8;
  color: #333;
  text-align: center;
}

.step-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 18px 0;
}

.visit-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: center;
  margin-top: 8px;
}

#showReviewsHome {
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.iframe-wrap {
  margin-top: 16px;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.iframe-wrap iframe {
  width: 100%;
  height: 520px;
  border: 0;
  display: block;
}

.iframe-fallback {
  padding: 14px;
  font-size: 14px;
}

.locked-notice {
  text-align: center;
  color: #444;
  margin: 6px 0 14px;
}

.form-container.is-locked {
  opacity: 0.55;
}

.reviews-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.summary-tile {
  background: linear-gradient(135deg, #ffffff, #fff3e0);
  border: 1px solid #ffe0b2;
  border-radius: 12px;
  padding: 12px;
}

.summary-tile .value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}

.reviews-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.filter-label {
  font-size: 14px;
  color: #333;
}

#starFilter {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #ddd;
  background: #fff;
}

.btn.btn-small {
  padding: 10px 18px;
}

.reviews-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.review-item {
  background: white;
  border-radius: 12px;
  border: 1px solid #eee;
  padding: 14px;
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
}

.review-name {
  font-weight: 700;
}

.review-meta {
  font-size: 12px;
  color: #666;
}

.review-stars {
  font-size: 18px;
  letter-spacing: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #ffe0b2;
  background: #fff7ed;
  font-weight: 700;
  margin-right: 8px;
}

.review-chips {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #eee;
  background: #fafafa;
  font-size: 12px;
  color: #333;
}

.comment-block {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fffdf8;
}

.review-body {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.review-body .label {
  font-size: 13px;
  color: #444;
  font-weight: 600;
}

.review-body .text {
  color: #222;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 720px) {
  .welcome-grid {
    grid-template-columns: 1fr;
  }

  .reviews-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .header {
    padding: 12px;
  }

  .header h1 {
    font-size: 20px;
    margin: 0;
  }

  .container {
    margin: 18px auto;
    padding: 0 10px;
  }

  .card {
    padding: 14px;
  }

  .box-title {
    font-size: 20px;
  }

  .form-container {
    padding: 18px;
  }

  .visit-controls {
    gap: 12px;
  }

  .timer-value {
    font-size: 22px;
  }

  .visit-buttons {
    flex-wrap: wrap;
    width: 100%;
  }

  .visit-buttons .btn {
    flex: 1 1 160px;
  }

  .reviews-controls {
    align-items: stretch;
  }

  #starFilter {
    width: 100%;
  }

  .btn.btn-small {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .scale {
    flex-wrap: wrap;
  }

  .scale-option {
    flex: 1 1 calc(33.333% - 8px);
  }

  .result-card h2 {
    font-size: 28px;
  }
}

@media (max-width: 340px) {
  .btn {
    padding: 11px 14px;
  }

  .scale-option {
    flex: 1 1 calc(50% - 8px);
    font-size: 11px;
    padding: 9px 6px;
  }

  .reviews-summary {
    grid-template-columns: 1fr;
  }
}
