/* --- Research Paper Aesthetic --- */
@import url("https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,400&family=Lato:wght@300;400&display=swap");

:root {
  --bg-paper: #ffffff;
  --text-main: #111111;
  --border-color: #333333;
  --sidebar-width: 300px;

  --cell-alive: #ffffff;
  --cell-dead: #000000;
}

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background-color: var(--bg-paper);
  color: var(--text-main);
  font-family: "Crimson Pro", "Times New Roman", serif;
  overflow: hidden; /* Prevent body scroll */
}

/* Layout Container */
.container {
  display: flex;
  height: 100vh;
}

/* --- Left Sidebar: Settings --- */
.sidebar {
  width: var(--sidebar-width);
  background-color: #f9f9f9;
  border-right: 1px solid var(--border-color);
  padding: 2rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  font-size: 0.95rem;
}

.sidebar h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid black;
  padding-bottom: 0.5rem;
}

.abstract {
  font-style: italic;
  color: #444;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* LaTeX style inputs */
button {
  background: white;
  border: 1px solid black;
  padding: 8px 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

button:hover {
  background: #eee;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(1px);
  box-shadow: none;
}

input[type="range"] {
  width: 100%;
  accent-color: black;
}

input[type="text"] {
  border: 1px solid black;
  padding: 6px;
  font-family: monospace;
  font-size: 0.8rem;
  background: white;
  outline: none;
}

input[type="text"]:focus {
  background: #fff;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.1);
}

input[type="color"] {
  border: 1px solid black;
  width: 100%;
  height: 30px;
  padding: 2px;
  background: white;
  cursor: pointer;
}

.button-row {
  display: flex;
  gap: 10px;
}

/* --- Right Side: Visualization --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: var(--bg-paper);
  position: relative;
}

.figure-wrapper {
  border: 1px solid black;
  padding: 10px;
  background: white;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

canvas {
  image-rendering: pixelated; /* Keeps the sharp pixel look */
  background-color: #eee;
  display: block;
  cursor: crosshair;
}

.caption {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  max-width: 600px;
}

.caption strong {
  font-weight: 600;
}

.equation {
  font-family: "Times New Roman", serif;
  font-style: italic;
  margin-top: 0.5rem;
  color: #555;
}
