/* ========== Base Reset ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== Body ========== */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f5f5f5;
  padding: 20px; /* use 20px globally; use .container--narrow for tighter layouts */
}

/* ========== Containers ========== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Optional narrow container variant (from the second snippet) */
.container--narrow {
  max-width: 800px;
  padding: 40px;
}

/* ========== Top Bar / User Info ========== */
.user-info {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 20px;
  padding: 10px;
  background: #f0f8f0;
  border-radius: 6px;
  color: #333;
}

.prompt-box {
    background: #fafafa;
    padding: 18px 24px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin: 24px auto;
    max-width: 900px;
    text-align: center;
    font-style: italic;
    font-size: 1.25rem;   /* slightly larger */
    line-height: 1.45;
    color: #444;
}

.user-info strong {
  color: #4CAF50;
}
.trial-info {
  display: none;
}
/* Tiny back button */
.back-btn {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  border-radius: 4px;
  cursor: pointer;
}
.back-btn:hover { background: #e6e6e6; }

/* ========== Headings ========== */
h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
}

/* ========== Models / Viewers ========== */
.models-container {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  justify-content: center;
}

.model-image {
  width: 100%;
  height: 400px;
  object-fit: contain;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}

.model-viewer { flex: 1; max-width: 600px; }
.model-viewer h2 {
  text-align: center;
  color: #666;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

/* Canvas frame */
canvas {
  width: 100% !important;
  height: 400px !important;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}

/* ========== Survey Sections ========== */
.survey-section {
  /* border-top: 2px solid #eee; */
  /* padding-top: 30px; */
}

.question {
  margin-bottom: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}
.question h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.choices {
  display: flex;
  flex-direction: row;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.choice {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  flex: 0 1 auto;
}
.choice:hover {
  border-color: #4CAF50;
  background: #f0f8f0;
}
.choice input[type="radio"] {
  margin-right: 10px;
  cursor: pointer;
}

/* Submit button */
.submit-btn {
  display: block;
  width: 200px;
  margin: 30px auto 0;
  padding: 15px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.submit-btn:hover { background: #45a049; }
.submit-btn:disabled { background: #ccc; cursor: not-allowed; }

/* Messages */
.message {
  text-align: center;
  padding: 15px;
  margin: 20px 0;
  border-radius: 6px;
  display: none;
}
.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}
.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* ========== “Studies list” page (from second snippet) ========== */
.studies-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.study-card {
  padding: 25px;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.study-card:hover {
  border-color: #4CAF50;
  background: #f0f8f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.study-card h2 {
  color: #333;
  margin-bottom: 10px;
}
.study-card p { color: #666; }

/* ========== Modal (username) ========== */
.modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  max-width: 500px;
  width: 90%;
  text-align: center;
}
.modal-content h2 { color: #333; margin-bottom: 20px; }
.modal-content p { color: #666; margin-bottom: 20px; }

#username-input {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
#username-input:focus {
  outline: none;
  border-color: #4CAF50;
}

.error-message {
  color: #d32f2f;
  font-size: 0.9rem;
  min-height: 20px;
  margin-bottom: 10px;
}

.modal-btn {
  width: 100%;
  padding: 12px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-btn:hover { background: #45a049; }
.modal-btn:disabled { background: #ccc; cursor: not-allowed; }
