/*
 * Site theme for the neural network demo when it is embedded on
 * /neuralNetwork (loaded after styles.css). Makes the fixed 1400px legacy
 * layout responsive and matches the site palette: #101010/#151515 surfaces,
 * #c7c7c7 text, #2bb3cd accent.
 */

html,
body {
  height: auto;
  min-height: 0;
  background: transparent;
  overflow: hidden;
}

body {
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  color: #c7c7c7;
}

li,
a,
p,
button,
select,
input,
td,
th {
  font-family: inherit;
}

.pages,
.page {
  margin: 0;
  height: auto;
}

/* ---------------------------------------------------------------- layout */
#container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
  margin: 0;
}

#canvasNetwork {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0;
  flex: none;
  border: 1px solid #262626;
  border-radius: 16px;
  background: #151515;
}

#sideMenu,
.weightsContainer {
  border: 1px solid #262626;
  border-radius: 16px;
  background: #151515;
}

#sideMenu {
  width: auto;
  height: auto;
  margin: 0;
  padding: 6px 0 18px;
  overflow: hidden;
}

/* ---------------------------------------------------------------- accordion */
.sideLinks {
  margin: 0;
}

.sideLinks li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #222;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  user-select: none;
}

.sideLinks li::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  color: #2bb3cd;
}

.sideLinks li:hover {
  color: #2bb3cd;
  background: #1a1a1a;
}

.section1,
.section2,
.section3,
.section4,
.section5,
.section6 {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #222;
  background: #111;
}

.section5 p,
.section6 p,
.section4 p {
  margin: 12px 0 8px;
  font-size: 14px;
  color: #c7c7c7;
}

/* Activation function slides */
.section1 {
  position: relative;
}

.slide1A,
.slide1B,
.slide1C,
.slide1D,
.slide1E {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 5;
  border-radius: 10px;
  background-size: cover;
}

.btnLeft,
.btnRight {
  position: absolute;
  top: 50%;
  margin: 0;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transform: translateY(-50%);
}

.btnLeft {
  left: 26px;
}

.btnRight {
  right: 26px;
}

.btnLeft:hover,
.btnRight:hover {
  background: #2bb3cd;
  color: #031419;
}

/* Inputs */
.slide2,
.slide3,
.slide4 {
  width: auto;
  height: auto;
  background: none;
}

.slide2 input,
.slide3 input,
.slide4 input,
select,
#trainingTask {
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #333;
  border-radius: 10px;
  background: #0b0b0b;
  box-shadow: none;
  color: #fff;
  font-size: 15px;
  text-align: left;
}

.slide2 input:focus,
.slide3 input:focus,
.slide4 input:focus,
select:focus {
  border-color: #2bb3cd;
  outline: none;
}

select option {
  background: #0b0b0b;
}

.slide5.xor,
.slide5.separation,
.slide5.sphere,
.slide5.quadrant {
  width: 180px;
  height: 180px;
  margin: 12px auto 0;
  border-radius: 10px;
}

/* Test case table and eye buttons */
.output {
  align-items: flex-start;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table,
td,
th {
  border: 1px solid #262626;
  background: #0b0b0b;
  color: #d4d4d4;
  font-size: 13px;
}

th {
  height: 35px;
  background: #1b1b1b;
  color: #fff;
  font-weight: 600;
}

td {
  width: auto;
  height: 35px;
}

#buttonContainer {
  margin: 36px 0 0 6px;
}

.viewButton {
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  border-radius: 8px;
  cursor: pointer;
}

/* Eye animation switch */
.switch {
  width: 46px;
  height: 26px;
  margin-left: 8px;
  vertical-align: middle;
}

.slider {
  background: #3a3a3a;
}

.slider:before {
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
}

input:checked + .slider {
  background: #2bb3cd;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Train button and errors */
.trainButton {
  display: block;
  width: calc(100% - 36px);
  margin: 18px 18px 0;
  padding: 12px;
  border-radius: 10px;
  background: #2bb3cd;
  color: #031419;
  font-size: 15px;
  font-weight: 600;
}

.trainButton:hover {
  background: #4cc6dc;
}

#errorLog {
  margin: 12px 18px 0;
  color: #ff8a8a;
  font-size: 14px;
}

/* ---------------------------------------------------------------- weights */
.weightsContainer {
  width: auto;
  height: auto;
  margin: 16px 0 0;
  padding: 16px;
  overflow-x: auto;
}

#weightSelection {
  position: static;
  width: auto;
  min-width: 120px;
  margin: 0 0 12px;
}

#tableContainer {
  position: static;
  width: auto;
  margin: 0;
}

#tableContainer td {
  min-width: 64px;
  padding: 0 8px;
}

@media (max-width: 760px) {
  #container {
    grid-template-columns: 1fr;
  }
}
