/* ---- Global layout / background ---- */

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: #000;
  overflow-x: hidden;   /* no horizontal scroll */
  overflow-y: auto;     /* allow vertical scroll */
  font-family: "Arial", sans-serif;
  color: white;
  font-size: 16px;
}


/* Starry background container (we can add stars later) */
#stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Individual star style (if/when we add them) */
.star {
  position: absolute;
  background-color: #fff;
  border-radius: 50%;
  animation: twinkle 2s infinite ease-in-out;
  opacity: 1;
  box-shadow: 0 0 18px 4px rgba(255, 255, 255, 0.95);
}

/* Dark overlay to soften the stars / background */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #000);
  z-index: 1;
  pointer-events: none;
}

/* Main page container */
.questionnaire-container {
  position: relative;
  min-height: 100vh;
  background-color: transparent;
  padding: 20px;
  display: flex;
  flex-direction: column;
  z-index: 2; /* above overlay/stars */
}

/* Header / footer */

.bfm-header,
.bfm-footer {
  display: flex;
  align-items: center;
  padding: 10px 5px;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.bfm-header {
  justify-content: center;   /* center the logo block */
  margin-bottom: 10px;
}

.bfm-header-center {
  text-align: center;
}

.bfm-logo {
  font-size: 4.4rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  margin: 0;
}

.bfm-subtitle {
  display: block;
  margin-top: 0.35rem;
  opacity: 0.85;
  font-size: 0.95rem;
}


.bfm-footer {
  margin-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 0.8rem;
  opacity: 0.8;
}

.bfm-logo {
  font-size: 4.4rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
}

.bfm-subtitle {
  opacity: 0.8;
  font-size: 0.85rem;
}

/* Scrollable main area */

.questionnaire-scroll-wrapper {
  position: relative;
  flex: 1;
  height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 10px 0 20px;
}

/* Glassy content card */

.questionnaire-content {
  max-width: 800px;
  margin: 0 auto 40px;
  background: rgba(20, 20, 30, 0.8);
  border-radius: 15px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
  position: relative;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.5s ease-out;
}

/* Headings */

.questionnaire-content h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.questionnaire-content p {
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #c4e3ff;
  font-size: 0.95rem;
}

/* Form fields */

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #4df0ff;
  font-size: 0.95rem;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(30, 30, 45, 0.9);
  color: #fff;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: #4df0ff;
  box-shadow: 0 0 10px rgba(77, 240, 255, 0.5);
}

.input-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Submit button */

.bfm-form-actions {
  margin-top: 20px;
  text-align: center;
}

.bfm-btn-primary {
  padding: 14px 32px;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  background: linear-gradient(45deg, #ff00cc, #3333ff);
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
  min-height: 44px;
}

.bfm-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
}

.bfm-btn-back {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background 0.2s ease;
}

.bfm-btn-back:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Success box */

.bfm-alert {
  margin-bottom: 1.2rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
}

.bfm-alert-success {
  background: rgba(22, 163, 74, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.bfm-submitted-details {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #e5e7eb;
}

/* Animations */

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive tweaks */

@media (max-width: 768px) {
  .questionnaire-content {
    padding: 22px 18px;
    margin: 10px auto 30px;
  }

  .questionnaire-content h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .bfm-header,
  .bfm-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* Mobile-friendly tweaks for admin/weekly tables and actions */
@media (max-width: 768px) {
  .weekly-table {
    display: block;
    overflow-x: auto;
  }
  .actions,
  .bfm-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .bfm-btn-primary,
  .bfm-btn-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
/* Radio groups for yes/no questions */

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 4px;
}

.radio-group label {
  font-weight: normal;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.radio-group input[type="radio"] {
  margin-right: 6px;
}

/* Top navigation */
.bfm-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.bfm-nav-link-muted {
  opacity: 0.85;
}

.bfm-nav-link {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(30, 30, 45, 0.8);
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.bfm-nav-link:hover {
  background: rgba(77, 240, 255, 0.08);
  border-color: rgba(77, 240, 255, 0.4);
}

.bfm-btn-secondary {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 12px;
  background: #e8f0ff;
  color: #1f2937;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #cdd7f0;
  transition: all 0.2s ease;
  min-height: 44px;
}

.bfm-btn-secondary:hover {
  background: #dbe7ff;
}

.bfm-link-light {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

.bfm-link-light:hover {
  text-decoration: underline;
}

.bfm-register-hint {
  margin-top: 18px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
}

/* Card-style blocks */
.bfm-card {
  background: rgba(20, 20, 30, 0.8);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.bfm-card h3 {
  text-align: center;
}

.bfm-link-light {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

.bfm-text-small {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 10px;
}

/* Grid for meal weights */
.bfm-grid-weights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 20px;
}

/* Weekly plan table */
.weekly-grid {
  overflow-x: auto;
}

.weekly-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.9rem;
}

.weekly-table th,
.weekly-table td {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px;
  text-align: center;
}

.weekly-table th {
  background: rgba(40, 40, 60, 0.9);
  font-weight: 600;
}

.weekly-day {
  font-weight: 600;
  white-space: nowrap;
}

.weekly-table td.centered,
.weekly-table th.centered {
  text-align: center;
}
