/* =============================================
   Scikit-Learn: Datasets & Train-Test Split
   Professional Educational Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&family=Poppins:wght@600;700;800&display=swap');

:root {
  --primary-blue:   rgb(30, 100, 200);
  --light-blue:     rgb(200, 225, 255);
  --green:          rgb(20, 150, 80);
  --light-green:    rgb(200, 245, 220);
  --red:            rgb(210, 40, 40);
  --light-red:      rgb(255, 210, 210);
  --saffron:        rgb(255, 150, 30);
  --light-saffron:  rgb(255, 235, 200);
  --violet:         rgb(110, 40, 180);
  --light-violet:   rgb(230, 210, 255);
  --teal:           rgb(0, 160, 160);
  --light-teal:     rgb(200, 245, 245);
  --bg-main:        rgb(235, 245, 255);
  --bg-card:        rgb(250, 253, 255);
  --border-col:     rgb(60, 130, 200);
  --text-dark:      rgb(20, 30, 60);
  --white:          #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  background: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.7;
}

/* ---- HEADER ---- */
header {
  background: linear-gradient(135deg, rgb(20,80,180) 0%, rgb(0,140,120) 50%, rgb(100,30,160) 100%);
  color: white;
  text-align: center;
  padding: 40px 20px 30px;
  border-bottom: 6px solid var(--saffron);
}
header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}
header p.subtitle {
  font-size: 1.1rem;
  margin-top: 8px;
  color: rgb(220,240,255);
  font-weight: 700;
}

/* ---- PRINT BUTTON ---- */
.print-bar {
  background: rgb(255,245,225);
  border-bottom: 3px solid var(--saffron);
  padding: 10px 30px;
  text-align: right;
}
.btn-print {
  background: linear-gradient(135deg, var(--saffron), rgb(210,100,0));
  color: white;
  border: none;
  padding: 10px 28px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(200,100,0,0.35);
  transition: transform .2s, box-shadow .2s;
}
.btn-print:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(200,100,0,0.45); }

/* ---- NAV QUICK LINKS ---- */
nav.quick-nav {
  background: linear-gradient(90deg, rgb(20,80,180), rgb(0,140,120));
  padding: 16px 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  border-bottom: 4px solid var(--violet);
}
nav.quick-nav a {
  background: rgba(255,255,255,0.18);
  color: white;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 30px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  border: 2px solid rgba(255,255,255,0.4);
  transition: background .2s, border-color .2s, transform .2s;
  white-space: nowrap;
}
nav.quick-nav a:hover {
  background: rgba(255,255,255,0.35);
  border-color: white;
  transform: translateY(-2px);
}

/* ---- MAIN LAYOUT ---- */
main { max-width: 1100px; margin: 30px auto; padding: 0 20px 60px; }

/* ---- SECTION CARDS ---- */
.section-card {
  background: var(--bg-card);
  border-radius: 14px;
  border-left: 7px solid var(--primary-blue);
  box-shadow: 0 4px 18px rgba(30,80,180,0.12);
  margin-bottom: 40px;
  overflow: hidden;
}
.section-card:nth-child(2)  { border-left-color: var(--green); }
.section-card:nth-child(3)  { border-left-color: var(--saffron); }
.section-card:nth-child(4)  { border-left-color: var(--red); }
.section-card:nth-child(5)  { border-left-color: var(--violet); }
.section-card:nth-child(6)  { border-left-color: var(--teal); }
.section-card:nth-child(7)  { border-left-color: var(--green); }
.section-card:nth-child(8)  { border-left-color: var(--primary-blue); }

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 26px;
  cursor: pointer;
  user-select: none;
}
.section-card:nth-child(1) .section-header { background: linear-gradient(90deg, rgb(200,225,255), rgb(240,248,255)); }
.section-card:nth-child(2) .section-header { background: linear-gradient(90deg, rgb(200,245,220), rgb(240,255,245)); }
.section-card:nth-child(3) .section-header { background: linear-gradient(90deg, rgb(255,235,200), rgb(255,248,235)); }
.section-card:nth-child(4) .section-header { background: linear-gradient(90deg, rgb(255,210,210), rgb(255,240,240)); }
.section-card:nth-child(5) .section-header { background: linear-gradient(90deg, rgb(230,210,255), rgb(248,240,255)); }
.section-card:nth-child(6) .section-header { background: linear-gradient(90deg, rgb(200,245,245), rgb(240,255,255)); }
.section-card:nth-child(7) .section-header { background: linear-gradient(90deg, rgb(200,245,220), rgb(240,255,245)); }
.section-card:nth-child(8) .section-header { background: linear-gradient(90deg, rgb(200,225,255), rgb(240,248,255)); }

.section-icon { font-size: 2rem; }
.section-header h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  flex: 1;
}
.section-card:nth-child(1) .section-header h2 { color: var(--primary-blue); }
.section-card:nth-child(2) .section-header h2 { color: var(--green); }
.section-card:nth-child(3) .section-header h2 { color: rgb(180,80,0); }
.section-card:nth-child(4) .section-header h2 { color: var(--red); }
.section-card:nth-child(5) .section-header h2 { color: var(--violet); }
.section-card:nth-child(6) .section-header h2 { color: var(--teal); }
.section-card:nth-child(7) .section-header h2 { color: var(--green); }
.section-card:nth-child(8) .section-header h2 { color: var(--primary-blue); }

.toggle-icon { font-size: 1.4rem; color: var(--text-dark); transition: transform .3s; }
.section-card.collapsed .toggle-icon { transform: rotate(-90deg); }

.section-body { padding: 24px 28px; display: block; }
.section-card.collapsed .section-body { display: none; }

/* ---- CONTENT STYLES ---- */
h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 22px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--saffron);
  color: rgb(20,60,140);
}

p { margin-bottom: 12px; font-size: 0.98rem; font-weight: 700; }

ul.styled-list { list-style: none; padding: 0; margin: 10px 0 18px 0; }
ul.styled-list li {
  padding: 8px 12px 8px 36px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: var(--light-blue);
  position: relative;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}
ul.styled-list li::before {
  content: "▶";
  position: absolute;
  left: 12px;
  color: var(--primary-blue);
  font-size: 0.8rem;
  top: 10px;
}
ul.styled-list.green  li { background: var(--light-green); }
ul.styled-list.green  li::before { color: var(--green); }
ul.styled-list.saffron li { background: var(--light-saffron); }
ul.styled-list.saffron li::before { color: var(--saffron); }
ul.styled-list.red    li { background: var(--light-red); }
ul.styled-list.red    li::before { color: var(--red); }
ul.styled-list.violet li { background: var(--light-violet); }
ul.styled-list.violet li::before { color: var(--violet); }
ul.styled-list.teal   li { background: var(--light-teal); }
ul.styled-list.teal   li::before { color: var(--teal); }

/* ---- HIGHLIGHT BOX ---- */
.highlight-box {
  border-radius: 10px;
  padding: 14px 18px;
  margin: 14px 0;
  font-size: 0.95rem;
  font-weight: 700;
  border-left: 5px solid;
}
.highlight-box.blue   { background: var(--light-blue);    border-color: var(--primary-blue); color: rgb(10,50,120); }
.highlight-box.green  { background: var(--light-green);   border-color: var(--green);        color: rgb(5,90,40); }
.highlight-box.saffron{ background: var(--light-saffron); border-color: var(--saffron);      color: rgb(140,60,0); }
.highlight-box.red    { background: var(--light-red);     border-color: var(--red);          color: rgb(140,10,10); }
.highlight-box.violet { background: var(--light-violet);  border-color: var(--violet);       color: rgb(70,10,140); }
.highlight-box.teal   { background: var(--light-teal);    border-color: var(--teal);         color: rgb(0,100,100); }

/* ---- TABLES ---- */
.table-wrap { overflow-x: auto; margin: 16px 0; border-radius: 10px; box-shadow: 0 2px 8px rgba(30,80,180,0.1); }
table { border-collapse: collapse; width: 100%; min-width: 500px; }
thead tr { background: linear-gradient(90deg, var(--primary-blue), var(--teal)); color: white; }
thead th {
  padding: 12px 16px;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}
tbody tr:nth-child(even) { background: rgb(235,245,255); }
tbody tr:nth-child(odd)  { background: white; }
tbody td {
  padding: 10px 16px;
  font-size: 0.91rem;
  font-weight: 700;
  border-bottom: 1px solid rgb(210,225,245);
}
tbody tr:hover { background: rgb(220,240,255); }

/* ---- CODE BLOCK ---- */
pre.code-block {
  background: rgb(22, 30, 55);
  color: rgb(180, 230, 150);
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
  font-size: 0.88rem;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  line-height: 1.6;
  margin: 14px 0;
  border-left: 5px solid var(--saffron);
}

/* ---- FLOWCHART ---- */
.flowchart-container {
  background: white;
  border-radius: 14px;
  padding: 30px 20px;
  border: 3px solid var(--border-col);
  overflow-x: auto;
}
.flow-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 340px;
}
.flow-box {
  padding: 14px 28px;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
  color: white;
  min-width: 280px;
  max-width: 360px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.flow-box.blue    { background: linear-gradient(135deg, rgb(30,100,200), rgb(0,150,200)); }
.flow-box.green   { background: linear-gradient(135deg, rgb(20,150,80), rgb(0,180,100)); }
.flow-box.saffron { background: linear-gradient(135deg, rgb(200,100,0), rgb(255,150,30)); }
.flow-box.red     { background: linear-gradient(135deg, rgb(180,30,30), rgb(220,70,70)); }
.flow-box.violet  { background: linear-gradient(135deg, rgb(90,20,160), rgb(140,60,210)); }
.flow-box.teal    { background: linear-gradient(135deg, rgb(0,130,130), rgb(0,180,180)); }
.flow-box.dark    { background: linear-gradient(135deg, rgb(20,40,80), rgb(40,80,140)); }

.flow-arrow {
  font-size: 1.8rem;
  color: var(--saffron);
  line-height: 1;
  margin: 0;
}

.flow-branch {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 6px 0;
}
.flow-branch-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ---- MIND MAP ---- */
.mindmap-container {
  background: white;
  border-radius: 14px;
  padding: 20px;
  border: 3px solid var(--border-col);
  overflow-x: auto;
}
.mindmap-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  min-width: 700px;
}
.mm-center {
  background: linear-gradient(135deg, var(--primary-blue), var(--violet));
  color: white;
  border-radius: 14px;
  padding: 18px 22px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(30,80,180,0.25);
}
.mm-branches { display: flex; flex-direction: column; gap: 14px; }
.mm-branch {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mm-branch-label {
  padding: 10px 18px;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: white;
  min-width: 180px;
  text-align: center;
  white-space: nowrap;
}
.mm-connector { font-size: 1.3rem; color: var(--primary-blue); font-weight: 900; flex-shrink: 0; }
.mm-leaves { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-leaf {
  background: var(--light-blue);
  border: 2px solid var(--primary-blue);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgb(10,50,130);
  white-space: nowrap;
}
.mm-leaf.green  { background: var(--light-green);   border-color: var(--green);   color: rgb(5,90,40); }
.mm-leaf.saffron{ background: var(--light-saffron); border-color: var(--saffron); color: rgb(130,60,0); }
.mm-leaf.red    { background: var(--light-red);     border-color: var(--red);     color: rgb(140,10,10); }
.mm-leaf.violet { background: var(--light-violet);  border-color: var(--violet);  color: rgb(70,10,130); }
.mm-leaf.teal   { background: var(--light-teal);    border-color: var(--teal);    color: rgb(0,100,100); }

/* ---- ROADMAP ---- */
.roadmap-container {
  background: white;
  border-radius: 14px;
  padding: 24px;
  border: 3px solid var(--border-col);
  overflow-x: auto;
}
.roadmap-track {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 900px;
  position: relative;
}
.roadmap-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.roadmap-node {
  padding: 14px 10px;
  border-radius: 12px;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 0.83rem;
  font-weight: 800;
  text-align: center;
  width: 100%;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  line-height: 1.4;
}
.roadmap-node .step-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 4px;
}
.roadmap-arrow-h {
  font-size: 2rem;
  color: var(--saffron);
  line-height: 1;
  align-self: center;
  flex-shrink: 0;
  margin: 0 -4px;
  position: relative;
  z-index: 2;
}
.roadmap-sub {
  margin-top: 10px;
  width: 100%;
  padding: 0 4px;
}
.roadmap-sub ul {
  list-style: none;
  padding: 0;
}
.roadmap-sub ul li {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 8px;
  margin: 3px 0;
  border-radius: 6px;
  background: var(--light-blue);
  color: rgb(10,50,130);
  text-align: center;
}

/* ---- DISCLAIMER ---- */
.disclaimer {
  background: linear-gradient(90deg, rgb(255,245,200), rgb(255,235,180));
  border: 3px solid var(--saffron);
  border-radius: 12px;
  padding: 18px 24px;
  margin: 30px 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgb(100,50,0);
  text-align: center;
}
.disclaimer strong { font-size: 1rem; font-weight: 900; color: rgb(180,60,0); }

/* ---- FOOTER ---- */
footer {
  background: linear-gradient(135deg, rgb(20,40,80), rgb(40,80,140));
  color: rgb(200,220,255);
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  font-weight: 700;
}

/* ---- PRINT ---- */
@media print {
  .print-bar, nav.quick-nav { display: none; }
  .section-card { box-shadow: none; border: 2px solid #aaa; page-break-inside: avoid; }
  .section-card.collapsed .section-body { display: block !important; }
  body { background: white; }
  header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- RESPONSIVE ---- */
@media(max-width: 700px) {
  header h1 { font-size: 1.5rem; }
  .section-header h2 { font-size: 1rem; }
  .roadmap-track { flex-direction: column; min-width: 0; }
  .roadmap-arrow-h { transform: rotate(90deg); }
  .mm-center { writing-mode: horizontal-tb; transform: none; min-height: auto; }
}