/* Reset and Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  width: 100%;
  font-family: "Caveat", cursive;
  background-color: black;
  color: rgb(0, 0, 0);
  /* overflow: hidden; */ /* <-- Remove or comment this */
}


/* === GRID LAYOUT: 34 rows × 21 columns === */

.grid-container {
  display: grid;
  grid-template-columns: repeat(34, 1fr);
  grid-template-rows: repeat(21, 1fr);
  height: 100vh;
  width: 100vw;
  /* overflow: hidden; */ /* <-- Remove or comment this */
  position: relative;
}

 

/* SIDEBAR: columns 1–8 */

.sidebar {
  grid-column: 1 / 9;
  grid-row: 1 / 22;
  background: linear-gradient(180deg, #1c1c1c, #0f0f0f);
  padding: 20px;
  border-right: 2px solid #00ffff55;
  overflow-y: auto;
  height: 100%;
  position: relative;
  z-index: 2;
  box-shadow: 6px 0 12px rgba(0, 255, 255, 0.1);
  font-family: 'Caveat', cursive;
  overflow: visible; /* Allow dropdowns to escape */
}




.sidebar h2 {
  font-family: 'Caveat', cursive;
  border-bottom: 2px solid #00ffff66;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
  grid-row: 8 / auto; /* Start at row 8 */
  margin-top: calc((5 - 1) * (100vh / 34)); /* Align with 8th row */
  font-size: 2.5em;
  color: #00ffff;
  text-align: center;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #00ffff33;
  padding-bottom: 0.5rem;
}


.sidebar-links {
  list-style: none;
  padding: 0;
}

.sidebar-links li {
  margin: 8px 0;
  transition: all 0.3s ease;
}

.sidebar-links a {
  color: #cccccc;
  font-weight: bold;
  font-size: 1.4em;
  text-decoration: none;
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}


.sidebar-links a:hover {
  background-color: #00ffff22;
  padding-left: 18px;
  transform: scale(1.02);
  color: #ffffff;
  text-decoration: underline;
}


/* CONTENT: columns 9–21 */
.content {
  grid-column: 9 / 35;
  grid-row: 1 / 22;
  display: grid;
  grid-template-columns: repeat(26, 1fr);  /* Internal grid in content */
  background-image: url('background new.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  height: 100%;
  overflow-y: auto;
  padding: 0;
  position: relative;
  z-index: 1;
}


/* TEXT STARTS AT GRID COLUMN 14 (5-grid offset inside content) */
.content-inner {
  grid-column: 6 / 24; /* From 6th to last column */
  padding-top: 2%;
  padding-right: 5%;
  max-width: 100%;
}

.content-inner p {
  text-align: justify;
  font-size: 1.618em;
  margin-bottom: 16.18px;
  color: #212121; /* dark brownish-black for ink-on-paper feel */
}

/* Headings */
.content h1 {
  font-family: 'Indie Flower', cursive;
  text-align: center;
  margin-bottom: 16.18px;
  color: #1a1a1a;
  font-size: 2.618em;
  text-decoration: underline;
}


.content h2 {
  color: #1a1a1a;
  font-family: "Permanent Marker", cursive;
  text-align: center;
  font-size: 2.618em;
  border-bottom: 1.618px solid #141414;
  margin-top: calc((8 - 1.6) * (100vh / 34)); /* ≈ row 6.4 */
}

.content h3 {
  font-family: 'Indie Flower', cursive;
  color: #1a1a1a;
  font-size: 1.618em;
  text-decoration: underline;
}

/* Links */
.content a {
  color: #0055cc;
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
  color: #0e0e0e;
}

.sub-dropdown > a {
  font-size: 1.3em;
  color: #66ccff;
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  background-color: #121212;
  margin-top: 8px;
  transition: background 0.3s ease;
}

.sub-dropdown > a:hover {
  background-color: #00ffff22;
  color: #ffffff;
}

.sub-dropdown-content {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background-color: #2c2c2c;
  min-width: 180px;
  z-index: 1000; /* <-- Add this */
}


.sub-dropdown-content a {
  font-size: 1.1em;
  padding: 8px 12px;
  color: #99e6ff;
  display: block;
  transition: background 0.2s ease;
}

.sub-dropdown-content a:hover {
  background-color: #00ffff22;
  color: #ffffff;
}

/* Sections */
.content section {
  padding: 26.18px 0;
}

.sidebar .dropdown {
  margin-top: calc((8 - 1) * (100vh / 34));
  margin-bottom: 20px;
}

.sidebar .dropdown {
  margin-top: 0; /* Reset any outer margin */
}

.sidebar .dropbtn {
  grid-row: 9; /* Same alignment as introduction line */
}

.show {display:block;}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {background-color: #ddd;}



.dropbtn {
  background-color: #3498DB;
  color: white;
  padding: 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.dropbtn:hover, .dropbtn:focus {
  background-color: #2980B9;
}



.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 160px;
  overflow: auto;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown a:hover {background-color: #ddd;}

.show {display: block;}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

/* Dropdown button on hover & focus */
.dropbtn:hover, .dropbtn:focus {
  background-color: #2980B9;
}

.dropbtn {
  background-color: #3498DB;
  color: white;
  padding: 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.sidebar .dropbtn {
  width: 100%;
  background-color: #111;
  color: #00ffff;
  font-family: 'Caveat', cursive;
  font-size: 1.2em;
  padding: 10px 14px;
  border: 1px solid #00ffff44;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.sidebar .dropbtn:hover {
  background-color: #00ffff11;
}

.sidebar .dropdown-content {
  background-color: #1e1e1e;
  margin-top: 6px;
  padding: 6px 0;
  border-radius: 6px;
  border: 1px solid #00ffff33;
}

.sidebar .dropdown-content a {
  color: #66ccff;
  padding: 10px 18px;
  display: block;
  font-family: 'Caveat', cursive;
  font-size: 1.1em;
  text-decoration: none;
  transition: background 0.2s ease;
}

.sidebar .dropdown-content a:hover {
  background-color: #00ffff22;
  color: #ffffff;
}

/* Select Menu */
.sidebar select {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 6px;
  border: 1px solid #00ffff33;
  background-color: #1e1e1e;
  color: #00ffff;
  font-family: 'Caveat', cursive;
  font-size: 1.2em;
}

.sidebar label {
  margin-top: 15px;
  font-family: 'Caveat', cursive;
  color: #00ffff;
  font-size: 1.2em;
  display: block;
}

/* Sub-dropdowns */
.sub-dropdown {
  position: relative;
}


.sub-dropdown:hover .sub-dropdown-content {
  display: block;
}

.sub-dropdown a {
  white-space: nowrap;
}

  .tcolorbox {
    background: rgba(255, 248, 220, 0.6); /* antique paper color */
    border: 2px solid #8b5e3c;
    border-radius: 12px;
    margin: 2rem 0;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.25);
    font-family: 'Georgia', serif;
  }

  .tcolorbox-title {
    background-color: #d2b48c;
    color: #3b2f2f;
    font-weight: bold;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #8b5e3c;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-align: center;
    font-family: 'Caveat', cursive;
  }

  .tcolorbox-body {
    color: #2c1b0f;
    font-size: 0.618em;
    line-height: 1.65;
  }

  .tcolorbox-body::first-letter {
    font-size: 160%;
    font-weight: bold;
    color: #8b4513;
    margin-right: 6px;
    float: left;
    line-height: 1;
  }





.math-inline {
  font-family: "Roboto", sans-serif;
  color: #070707;
  font-size: 16.18px;
}

.flower-task {
  background: linear-gradient(to right, #fff8e1, #fff3b0);
  border-left: 6px solid #fbc02d;
  padding: 20px 28px;
  margin: 2em 0;
  font-family: 'Caveat', cursive;
  color: #4e342e;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  font-size: 1.18rem;
  position: relative;
}

.flower-task::before {
  content: "✿";
  position: absolute;
  left: 12px;
  top: -18px;
  font-size: 1.618rem;
  color: #fbc02d;
  transform: rotate(-15deg);
}

.flower-task-title {
  color: #d84315;
  font-size: 1.618em;
  margin-bottom: 0.5em;
  font-weight: bold;
  text-shadow: 1px 1px 0 #fff4;
}




.pascal-container {
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  line-height: 1.8;
  text-align: center;
  margin: 3rem auto;
  padding: 2rem;
  background: none; /* keep the background parchment visible */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  width: max-content;
}

.pascal-container span {
  display: inline-block;
  min-width: 2.2em;
  padding: 0.4em 0.6em;
  margin: 0.2em;
  background-color: #fff8e1;
  color: #333;
  font-weight: bold;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee0b6;
  font-family: 'Georgia', serif;
}


.pascal-container span {
  animation: fadeIn 0.6s ease-in;
}

.pascal-container span:hover {
  background-color: #fff3c4;
  transform: scale(1.05);
  transition: 0.2s ease;
}


@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}



    

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.table-pair {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

table {
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

caption {
  font-weight: bold;
  padding: 0.5rem;
  background: #f0f0f0;
  font-size: 1.1rem;
}

td {
  border: 1px solid #ccc;
  width: 40px;
  height: 40px;
  text-align: center;
  vertical-align: middle;
  transition: 0.3s ease;
}

.highlight {
  background-color: #fdd835 !important;
}

.visited {
  background-color: #d7ccc8;
}

.final-highlight {
  background-color: #1565c0;
  color: white;
}

.controls {
  margin-top: 1.5rem;
}

input[type="number"] {
  width: 60px;
  padding: 5px;
  font-size: 1rem;
}

input[type="range"] {
  width: 150px;
  vertical-align: middle;
}

button {
  padding: 0.6rem 1.2rem;
  margin: 0 0.5rem;
  font-size: 1rem;
  background-color: #263238;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #37474f;
}

h2 {
  font-family: 'Caveat', cursive;
  text-align: center;
  font-size: 3em;
  margin-top: 3rem;
  margin-bottom: 2rem;
  color: #3b2f2f;
  text-decoration: underline;
}

/* Styles for Graph Section */
.graphs-container {
  background: rgba(255, 248, 220, 0.6); /* Match antique paper color */
  border: 2px solid #8b5e3c;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  padding: 2rem;
  margin-top: 2rem;
}

/* This class is used in the HTML to theme the graph cards.
  It overrides some Tailwind defaults to match the page's aesthetic.
*/
.graph-box-theme {
  background: #fffdf5 !important;
  border-radius: 16px !important;
  border: 2px solid #b87d4b !important;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.6s ease-in;
}

.graph-box-theme:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3) !important;
}

.graph-box-theme h3 {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    color: #4e342e;
}

/* Ensure canvas is responsive and fits its container */
canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 12px;
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

