:root {
    --bg: #0f172a;
    /* page background */
    --paper: #ffffff10;
    /* translucent card */
    --border: #ffffff1a;
    --ink: #e5e7eb;
    /* base text */
    --accent: #8b5cf6;
    /* purple accent */
    --muted: #94a3b8;
    /* footer text */
    --link: #ffd166;
    /* link color */
    --link-visited: #ffb703;
    --footer-link: #a3e635;
    --footer-visited: #84cc16;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

.skip {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip:focus {
    position: static;
    width: auto;
    height: auto;
    padding: .5rem;
    background: #111827;
    color: #fff;
}

header,
main,
footer {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

h1 {
    font-size: 1.6rem;
    margin: .5rem 0 0;
}

h2 {
    font-size: 1.3rem;
    margin: 1rem 0 .25rem;
    color: var(--accent);
}

/* Navigation links */
nav a {
    color: white;
    text-decoration: none;
    padding: .15rem .25rem;
}

nav a:hover {
    text-decoration: underline;
}

nav a:visited {
    color: var(--link-visited);
}

.sep {
    color: #64748b;
    padding: 0 .25rem;
}

/* Main content box */
main {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: .5rem;
}

/* Main section links — fix for purple visited links */
main a {
    color: white;
    text-decoration: none;
}

main a:hover {
    text-decoration: underline;
}

main a:visited {
    color: white;
    /* stays white even after visiting */
}

/* Footer */
footer {
    font-size: .95rem;
    color: var(--muted);
}

footer a {
    color: var(--footer-link);
}

footer a:visited {
    color: var(--footer-visited);
}

/* ===============================
   Table Styling
   =============================== */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #0b1225;
    border: 1px solid var(--border);
}

caption {
    display: table-caption;
    caption-side: top;
    padding: .5rem .75rem;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
}

thead th {
    text-align: left;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--border);
    background: #111827;
}

tbody th,
tbody td {
    padding: .5rem .75rem;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

td.steps,
th.steps {
    width: 6rem;
    white-space: nowrap;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

td ul {
    margin: .25rem 0 .5rem 1rem;
    padding: 0;
}

tbody tr:nth-child(even) {
    background: #0d162d;
}

/* Add vertical separator lines between columns */
th,
td {
    border-right: 1px solid var(--border);
}

th:last-child,
td:last-child {
    border-right: none;
    /* remove the line on the far right edge */
}

main {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Three-device responsiveness (adjust variables, not the headings) */
@media (max-width: 640px) {
    :root {
        --h1: 1.35rem;
        --h2: 1.1rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    :root {
        --h1: 1.75rem;
        --h2: 1.25rem;
    }
}

@media (min-width: 1025px) {
    :root {
        --h1: 2rem;
        --h2: 1.35rem;
    }
}

/* Scope all these styles only to #intro-page */
#intro-page main {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: auto;
}

#intro-page main p::before {
    content: "• ";
    font-weight: bold;
    color: greenyellow;
}

#intro-page main p.quote::before,
#intro-page ol::before {
    content: "";
}

#intro-page figure {
    text-align: center;
    margin: 20px auto;
}

#intro-page figure img {
    display: black;
    margin: 0 auto;
    border-radius: 10px;
}

#intro-page figure figcaption {
    font-style: italic;
    color: white;
    margin-top: 5px;
}

#intro-page .quote {
    text-align: center;
    font-style: italic;
    font-size: 1.1rem;
    margin: 30px 0;
}

#intro-page ol {
    margin-left: 25px;
}

/* ---------- FORM BUTTON STYLING ---------- */
/* Stack labels & inputs vertically for intro form */
#introForm label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    /* optional but looks cleaner */
}

/* Add spacing under inputs/textarea */
#introForm input[type="text"],
#introForm textarea {
    display: block;
    width: 100%;
    max-width: 450px;
    /* optional: keeps form from being huge */
    margin-top: 4px;
    margin-bottom: 12px;
}

button {
    background-color: #2e8b57;
    /* nice green - you can change to your brand color */
    color: white;
    border: none;
    padding: 10px 18px;
    margin: 6px 4px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.25s, transform 0.1s;
}

button:hover {
    background-color: #256b46;
    /* darker on hover */
    transform: translateY(-2px);
    /* subtle lift */
}

button:active {
    background-color: #1f553a;
    /* even darker when pressed */
    transform: translateY(0);
}

button[type="reset"] {
    background-color: #555;
    /* neutral gray for reset */
}

button[type="reset"]:hover {
    background-color: #333;
}

button[type="button"] {
    background-color: #8b0000;
    /* red tone for clear button */
}

button[type="button"]:hover {
    background-color: #a40000;
}

/* Make Add Course button same green */
#addCourse {
    background-color: #2e8b57;
    color: white;
}

#addCourse:hover {
    background-color: #256b46;
    /* slightly darker on hover */
}

#addCourse:active {
    background-color: #1f553a;
    /* darkest when pressed */
}

#generateJSON {
    background-color: #555;
    color: white;
}

#generateJSON:hover {
    background-color: #333;
}

#generateHTML {
    background-color: #555;
    color: white;
}

#generateHTML:hover {
    background-color: #333;
}

/* Left-align the preview image on the form page only */
#introForm figure {
    text-align: left;
    margin-left: 0;
}

figure {
    text-align: center;
}

figcaption {
    text-align: center;
    font-style: italic;
}




/* Keep tables inside the layout on all screens */
.table-container {
  width: 100%;
  overflow-x: auto;      /* allows horizontal scroll if needed */
  overflow-y: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

/* Makes sure the table fits its parent width */
.table-container table {
  width: 100%;
  border-collapse: collapse;
}

/* Optional: make table content shrink slightly */
.table-container th,
.table-container td {
  word-wrap: break-word;
  white-space: normal;
  padding: 0.5rem;
}

/* Add smooth scroll bar only when necessary */
.table-container::-webkit-scrollbar {
  height: 8px;
}

.table-container::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

/* Make all images responsive */
img {
  max-width: 100%;   /* keeps image inside the frame width */
  height: auto;      /* keeps proportions */
  display: block;    /* prevents weird spacing issues */
  margin: 0 auto;    /* centers image inside its container */
}
