/* Common styles for all pages */
/* Reset-ish */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-gradient-1: #0f2027;
  --bg-gradient-2: #203a43;
  --bg-gradient-3: #2c5364;
  --accent: #00ffff;
  --muted: #aaa;
  --card: rgba(255,255,255,0.06);
  --max-width: 1100px;
}

html, body {
  height: 100%;
}


/* Layout */
header {
  text-align: center;
  padding: 60px 20px;
}

header h1 {
  font-size: 2.6rem;
  margin-bottom: 10px;
}

header p {
  margin: 40px 0 0 0;
  color: #d7e7ea;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  background-color: var(--card);
  padding: 12px 10px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 4px;
}

nav a:hover {
  background: rgba(255,255,255,0.03);
}

section {
  padding: 40px 20px;
  max-width: var(--max-width);
  margin: 20px auto;
}

section h2 {
  font-size: 1.75rem;
  margin-bottom: 20px;
  border-bottom: 2px solid #ffffff22;
  display: inline-block;
  padding-bottom: 6px;
}

footer {
  text-align: center;
  padding: 20px;
  font-size: 0.95rem;
  color:#2a0404;
}

ul {
  list-style-type: disc;
  margin-left: 2em;
}

/* Utilities */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* Merge visualization specific */
canvas { border: 1px solid #00000033; display: block; margin-top: 10px; }

/* Merge canvas should use a white drawing background for clarity */
#mergeCanvas {
  background-color: #ffffff;
}
.input-section { margin-bottom: 10px; }

/* Button styles */
.btn {
  display: inline-block;
  background: linear-gradient(90deg, rgba(0,255,255,0.08), rgba(255,255,255,0.02));
  color: #e6ffff;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0,255,255,0.18);
  cursor: pointer;
  font-weight: 700;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

.btn:focus {
  outline: 3px solid rgba(0,255,255,0.12);
  outline-offset: 3px;
}

/* Primary and secondary variants */
.btn-primary {
  background: linear-gradient(90deg, var(--accent), #7fffd4);
  color: #052020;
  border: 1px solid rgba(0,255,255,0.9);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
}

/* Inputs inside the input section */
.input-section input[type="text"] {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  color: #fff;
  margin-right: 8px;
}

.input-section label { margin-right: 8px; }

/* Visualization container styling */
.visualization-section {
  max-width: 760px;
  margin: 24px auto; /* center horizontally */
  background: rgba(255,255,255,0.04); /* slightly lighter than page */
  border: 1px solid rgba(255,255,255,0.12); /* light border */
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.visualization-section #explanation {
  margin: 12px 0;
  color: #dfeff0;
  text-align: center;
}

/* Make canvas responsive within the visualization container */
.visualization-section canvas {
  max-width: 100%;
  height: auto;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  header h1 { font-size: 1.6rem; }
  nav { gap: 8px; padding: 10px; }
}

.official-link {
  display: block;
  text-align: right;
  margin: 40px 20px 0 0;
  text-decoration: none;
  font-weight: bold;
}

.analogy-title {
  color: #3b4a1c; 
  text-align: center;
  padding-top: 40px;
  padding-bottom: 60px;
}

.official-link {
  color:#1d094c ;
}

.canvas-area {
    background-color: white;
}
