/* =========================================================
   BMCC-Inspired UI (cleaner + more modern + more “premium”)
   Drop-in replacement for your CSS.
   If you prefer keeping your giant @font-face block, remove
   the @import line below and paste your @font-face block back.
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Brand */
  --bmcc-blue: #003366;
  --bmcc-blue-2: #0b4b8a;
  --bmcc-orange: #ff6600;

  /* Neutrals */
  --text: #17212b;
  --text-muted: #53616f;
  --border: rgba(17, 24, 39, 0.12);

  /* Surfaces */
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f6f8fb;

  /* Effects */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 12px 30px rgba(0, 24, 48, 0.12);
  --shadow-focus: 0 0 0 4px rgba(255, 102, 0, 0.18);

  /* Layout */
  --container: 1100px;
  --gap: 28px;

  /* Typography */
  --font: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;

  min-height: 100vh;
  margin: 0;

  /* Soft background that feels “designed” */
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(0, 51, 102, 0.12), transparent 55%),
    radial-gradient(900px 500px at 95% 10%, rgba(255, 102, 0, 0.10), transparent 55%),
    linear-gradient(180deg, #f7f9fd, var(--bg));
}

/* Container becomes a “card” instead of a plain white slab */
.container {
  max-width: var(--container);
  margin: 26px auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden; /* so header corners look perfect */
}

/* =========================================================
   Header
========================================================= */
header {
  color: #fff;
  padding: 26px 34px;
  border-bottom: 3px solid var(--bmcc-orange);

  background:
    radial-gradient(900px 260px at 10% 10%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(135deg, var(--bmcc-blue), #00284f 55%, #001c37);
}

.header-description {
  font-size: 0.9rem;
  opacity: 0.92;
  font-weight: 400;
  letter-spacing: 0.2px;
  margin-bottom: 10px;
}

header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 2.2vw, 2.1rem);
  line-height: 1.15;
  font-weight: 800;
}

header p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.92;
  font-weight: 400;
}

/* =========================================================
   Main Layout (grid feels cleaner than flex here)
========================================================= */
main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gap);
  padding: 30px 34px 36px;
}

.main-content {
  min-width: 0;
}

/* Orange accent separator */
.content-separator {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bmcc-orange), rgba(255, 102, 0, 0));
  margin: 22px 0 26px;
}

/* =========================================================
   Form
========================================================= */
.form-group {
  margin-bottom: 22px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

textarea,
input[type="file"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  color: var(--text);
  font-family: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

textarea {
  padding: 14px 14px;
  font-size: 16px;
  line-height: 1.55;
  resize: vertical;
  min-height: 130px;
}

input[type="file"] {
  padding: 12px 12px;
  cursor: pointer;
  font-size: 0.95rem;
}

small {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

textarea:focus,
input[type="file"]:focus {
  outline: none;
  border-color: rgba(255, 102, 0, 0.75);
  box-shadow: var(--shadow-focus);
}

textarea:hover,
input[type="file"]:hover {
  border-color: rgba(0, 51, 102, 0.35);
}

/* =========================================================
   Buttons (more “CTA”, less flat)
========================================================= */
button {
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 999px;
  cursor: pointer;

  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.25px;

  color: #fff;
  background: linear-gradient(135deg, var(--bmcc-blue), var(--bmcc-blue-2));
  box-shadow: 0 10px 22px rgba(0, 51, 102, 0.20);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 51, 102, 0.24);
  filter: brightness(1.03);
}

button:active:not(:disabled) {
  transform: translateY(0px) scale(0.99);
  box-shadow: 0 10px 22px rgba(0, 51, 102, 0.18);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* =========================================================
   Results
========================================================= */
.result {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.result h2 {
  margin: 0 0 18px;
  color: var(--bmcc-blue);
  font-size: 1.55rem;
  font-weight: 900;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 102, 0, 0.9);
}

.result-content {
  line-height: 1.85;
  color: #c0c0c0;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.result-content strong {
  font-weight: 800;
  color: var(--bmcc-blue);
}

.result-content em {
  color: var(--text-muted);
}

.result-content hr {
  border: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.10);
  margin: 18px 0;
}

.result-content code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.92em;
  color: #0f172a;
}

.result-content pre {
  background: linear-gradient(180deg, #fbfcff, #f4f7fb);
  border: 1px solid var(--border);
  border-left: 5px solid var(--bmcc-blue);
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.65;
  overflow-x: auto;
  margin: 14px 0;
  box-shadow: var(--shadow-sm);
}

/* Folder structure block */
.result-content .folder-structure {
  background: linear-gradient(180deg, #f8fafc, #f2f6fb);
  border: 1px solid var(--border);
  border-left: 5px solid var(--bmcc-orange);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.8;
  margin: 14px 0;
  white-space: pre;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}

/* =========================================================
   Step Panels (more “designed” + less boxy)
========================================================= */
.step-panel {
  background:
    radial-gradient(900px 220px at 15% 0%, rgba(0, 51, 102, 0.07), transparent 55%),
    linear-gradient(180deg, #ffffff, #fbfcff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 22px 0;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease;
  position: relative;
}

.step-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--bmcc-blue), rgba(255, 102, 0, 0.75));
}

.step-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 51, 102, 0.14);
}

.step-panel .step-header {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--bmcc-blue);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 102, 0, 0.85);

  display: flex;
  align-items: center;
  gap: 14px;
}

.step-panel .step-number {
  background: linear-gradient(135deg, var(--bmcc-blue), #001f3d);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: 0 10px 18px rgba(0, 51, 102, 0.20);
  flex-shrink: 0;
}

.step-panel .step-content {
  line-height: 1.9;
  font-size: 1rem;
  color: #c0c0c0;
  padding-left: 0;
}

.step-panel .step-content > div {
  margin: 10px 0;
  padding: 6px 0;
}

.step-panel .step-content strong {
  color: var(--bmcc-blue);
  font-weight: 900;
}

/* =========================================================
   Section Headers
========================================================= */
.section-header {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--bmcc-blue);

  margin: 32px 0 20px;
  padding: 12px 14px;

  border-radius: var(--radius-md);
  border: 1px solid var(--border);

  background:
    linear-gradient(90deg, rgba(0, 51, 102, 0.10), rgba(255, 102, 0, 0.06), transparent 75%);
}

/* =========================================================
   Links
========================================================= */
a {
  color: var(--bmcc-blue-2);
  text-decoration: none;
  font-weight: 700;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   Loading / Error
========================================================= */
.loading {
  text-align: center;
  padding: 18px;
  color: var(--bmcc-blue);
  font-weight: 800;
  font-size: 1.05rem;
}

.error {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff5f5, #ffecec);
  border: 1px solid rgba(204, 0, 0, 0.25);
  border-left: 5px solid #cc0000;
  color: #b00020;
  white-space: pre-line;
  box-shadow: var(--shadow-sm);
}

/* =========================================================
   Sidebar (clean card + sticky on desktop)
========================================================= */
.sidebar {
  width: 320px;
}

.contact-box {
  background: linear-gradient(180deg, #f7f9fd, #eef3fa);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 20px;
}

.contact-box h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.contact-box p,
.contact-box div {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.65;
}

.hidden {
  display: none !important;
}

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 1024px) {
  .container {
    margin: 18px 14px;
    border-radius: 16px;
  }

  main {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 100%;
  }

  .contact-box {
    position: static;
  }
}

@media (max-width: 768px) {
  header {
    padding: 18px 18px;
  }

  main {
    padding: 18px 18px 22px;
  }

  textarea {
    font-size: 16px; /* iOS zoom prevention */
  }

  .result h2 {
    font-size: 1.35rem;
  }
}

@media (max-width: 520px) {
  .step-panel {
    padding: 18px 16px;
  }

  .step-panel .step-header {
    font-size: 1.12rem;
  }

  .result-content pre {
    font-size: 0.85rem;
    padding: 14px;
  }
}

/* =========================================================
   Reduced motion
========================================================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   Print
========================================================= */
@media print {
  body {
    background: #fff;
  }

  .container {
    box-shadow: none;
    margin: 0;
    border-radius: 0;
  }

  header {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  button {
    display: none !important;
  }
}

/* =========================================================
   Optional: Dark mode (keeps BMCC vibe)
========================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #0f1a2b;
    --surface-2: #0c1626;
    --text: #e6edf6;
    --text-muted: #a9b6c6;
    --border: rgba(255, 255, 255, 0.14);
  }

  body {
    background:
      radial-gradient(1200px 600px at 20% 0%, rgba(0, 102, 204, 0.18), transparent 55%),
      radial-gradient(900px 500px at 95% 10%, rgba(255, 102, 0, 0.12), transparent 55%),
      linear-gradient(180deg, #070c16, var(--bg));
  }

  .result-content pre,
  .result-content code {
    color: var(--text);
  }

  .contact-box {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  }
}

/* Toggle Switch Styling */
#viewToggle {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

#viewToggle + span {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  background-color: #ccc;
  border-radius: 24px;
  transition: background-color 0.3s;
  cursor: pointer;
}

#viewToggle + span::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#viewToggle:checked + span {
  background-color: var(--bmcc-blue);
}

#viewToggle:checked + span::before {
  transform: translateX(26px);
}

#viewToggle:focus + span {
  outline: 2px solid var(--bmcc-orange);
  outline-offset: 2px;
}
