    :root {
      --background-dark: #121820;
      --foreground-dark: #1A232C;
      --foreground-dark-hover: #2a3846;
      --button-dark: #4680FF;
      --border-rad: 0.25rem;
      --jsoc: #f1ae00;
      --border: 1px solid rgba(255,255,255,0.15);
      --text-muted: rgba(255,255,255,0.7);
    }
    * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Quantico', sans-serif; border-radius: var(--border-rad); }
    body {
  background: var(--background-dark);
  color: white;
  min-height: 100vh;
  margin: 0;
    }

    .main-page{
  display: flex;
  flex-direction: column;
  width: 100dvw;
  min-height: 100dvh;
  padding-top: 5rem; 
    }
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5rem;
  background-color: var(--foreground-dark);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  z-index: 1000; /* ensures it sits above main content */
}

    .page-header img{
      width: 3.75rem;
      height: 3.75rem;
      margin: 0 1rem 0 1rem;
    }

    .overlay {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.95);
      display: none; justify-content: center; align-items: center;
      z-index: 9999;
      text-align: center; padding: 1rem;
    }
    .overlay p {
       font-size: 1.1rem; margin-bottom: 1rem;
      }

    .overlay button {
      background: var(--button-dark);
      border: none;
      padding: 0.75rem 1.5rem;
      color: white;
      font-weight: bold;
      cursor: pointer;
    }
.container {
  background: var(--foreground-dark);
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  border: var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  margin: 2rem auto;   /* centers horizontally but allows vertical scroll */
}
    h2 {
      color: var(--jsoc);
      text-align: center;
    }
.choice-buttons{
  display: flex;
  justify-content: center;  
  align-items: center;       
  gap: 1rem;                 
  margin: 1rem 0;
}
.choice-buttons button{
  width: auto;
  flex: 0;
  min-width: 240px;
  padding: 0.75rem 1.5rem;
  background: var(--button-dark);
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

.choice-buttons button:disabled {
  background: #555;
  color: #aaa;
  cursor: no-drop;
  opacity: 0.6;
}


    .choice-buttons button:hover {
       background: #2a5cd6;
       }

    form {
      display: flex;
      flex-direction:column;
      gap: 1rem;
    }
    label {
      font-weight: bold;
    }
    input, textarea {
      width: 100%;
      padding: 0.75rem;
      background: var(--foreground-dark-hover);
      border: var(--border);
      color: white;
      font-size: 1rem;
    }

    textarea { resize: vertical;
      min-height: 120px;
    }

    .textarea-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  pointer-events: none;
}
    small {
      color: var(--text-muted);
      font-size: 0.85rem;
      display: block;
      margin-top: -0.5rem;
    }
    .back-btn, .preview {
      background: var(--button-dark);
      border: none; padding: 0.75rem;
      color: white; font-weight: bold; cursor: pointer;
    }

    button:hover, .back-btn:hover {
      background: #2a5cd6;
    }
    .back-btn { 
      background: #555;
     }
    .hidden {
       display: none;
       }
    .message {
       margin-top: 1rem; text-align: center; font-weight: bold;
       }
    @media (max-width: 600px) {
      .container { padding: 1rem; }
    }
    .container-header{
      display: flex;
      flex-direction: row;
      text-align: center;
      justify-content: space-between;
      margin: 0 0 2rem 0;
    }

    .preview-card {
  background: var(--foreground-dark);
  margin-top: 1rem;
  text-align: left;

}
.preview-item {
  margin: 0.75rem 0;
  padding: 0.5rem;
  background: var(--foreground-dark-hover);
  border-radius: var(--border-rad);
}
.preview-card h3 {
  text-align: center;
  color: var(--jsoc);
  margin-bottom: 1rem;
}
.preview-actions {
  display: flex;
  justify-content: center;   /* center horizontally */
  gap: 1rem;                 /* spacing between buttons */
  margin-top: 1rem;
}

.preview-actions button {
  flex: 0 0 150px;           /* same width */
  padding: 0.75rem;
  background: var(--button-dark);
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

.preview-actions button:hover {
  background: #2a5cd6;
}

.preview-actions .back-btn {
  background: #555;
}