/* (c) Innings2, generated by Mathigon Studio */
x-buckets {
  display: block;
  margin: 1.5em 0;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  color: #333;
  width: 100%;
}
x-buckets .inputs, x-buckets .bucket {
  position: relative;
}
x-buckets .inputs > *, x-buckets .bucket > * {
  position: absolute;
}
x-buckets .inputs {
  z-index: 1;
  width: 100%;
  min-height: 50px;
}
x-buckets .buckets {
  display: flex;
  margin: 0 -8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
x-buckets .input {
  cursor: move;
  background: rgba(255, 255, 255, 0.6);
  box-sizing: border-box;
  padding: 5px 12px;
  margin: 6px 0;
  border-radius: 4px;
  width: 180px;
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
  transition: left 0.2s, top 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
x-buckets .input.touch-device {
  /* Increase tap target size on touch devices */
  padding: 8px 12px;
}
x-buckets .inputs .input {
  background: #c5c2cc;
}
x-buckets .input.error {
  background: #e9b0cb;
  color: #cd0e66;
}
x-buckets .input.correct {
  background: #b6dfb7;
  color: #22ab24;
}
x-buckets .input.active {
  z-index: 10; /* Ensure active items appear on top */
  background: white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.45);
  color: inherit;
}
x-buckets .bucket {
  width: 200px;
  border-radius: 8px;
  margin: 6px;
  position: relative;
  padding-bottom: 6px;
  background: #3a3645;
  transition: box-shadow 0.2s;
}
x-buckets .bucket .title {
  text-align: center;
  font-weight: 600;
  margin-top: 8px;
  color: white;
}
x-buckets .bucket.active {
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.4);
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  x-buckets .bucket {
    width: 180px; /* Slightly smaller buckets on tablets */
    margin: 4px;
  }
  x-buckets .input {
    width: 160px; /* Slightly smaller input items */
    font-size: 15px;
  }
}
@media (max-width: 480px) {
  x-buckets .buckets {
    margin: 0 -4px;
  }
  x-buckets .bucket {
    width: calc(50% - 8px); /* Half width minus margins on mobile */
    min-width: 140px; /* Ensure minimum readable width */
    margin: 4px;
  }
  x-buckets .bucket .title {
    font-size: 14px;
    margin-top: 6px;
  }
  x-buckets .input {
    width: 140px; /* Smaller input items on mobile */
    font-size: 14px;
    padding: 6px 8px;
    margin: 4px 0;
  }
  x-buckets .input.active {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45); /* Smaller shadow on mobile */
  }
}
/* Extra small devices */
@media (max-width: 360px) {
  x-buckets .bucket {
    width: 100%; /* Full width on very small devices */
    max-width: 260px;
    margin: 4px auto;
  }
  x-buckets .input {
    width: 130px;
    font-size: 13px;
  }
}
x-math-canvas {
  --canvas-bg: #ffffff;
  --canvas-fg: #181824;
  --toolbar-bg: #292735;
  --toolbar-header-bg: #1e1c28;
  --accent-color: #5c9eff;
  --primary-color: #007bff;
  position: relative;
  display: block;
  background-color: var(--canvas-bg);
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  max-width: 100%;
}
x-math-canvas .outer-div {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
x-math-canvas .canvas-container {
  flex: 1;
  position: relative;
  background: var(--canvas-bg);
  min-height: 400px;
}
x-math-canvas .canvas-container canvas {
  display: block;
}
x-math-canvas #drawtools {
  display: none;
  padding: 8px 12px;
  background: var(--toolbar-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
x-math-canvas #drawtools .toolbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
x-math-canvas #drawtools sl-button-group {
  --sl-spacing-x-small: 2px;
}
x-math-canvas #drawtools sl-button::part(base) {
  min-width: 36px;
  min-height: 36px;
}
x-math-canvas #drawtools sl-divider[vertical] {
  --color: rgba(255, 255, 255, 0.2);
  margin: 0 8px;
  height: 28px;
}
x-math-canvas .active-draw-tool::part(base) {
  background-color: var(--accent-color) !important;
  color: white !important;
}
x-math-canvas #toolbar {
  display: none;
  position: absolute;
  left: 8px;
  top: 56px;
  z-index: 100;
  width: 220px;
  max-height: calc(100% - 70px);
  overflow-y: auto;
  background: var(--toolbar-bg);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
x-math-canvas .toolbar-header {
  padding: 12px 16px;
  background: var(--toolbar-header-bg);
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
x-math-canvas .toolbar-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
x-math-canvas .accordion-container {
  padding: 8px;
}
x-math-canvas .tool-group {
  background: transparent;
  border: none;
  margin-bottom: 4px;
  border-radius: 8px;
}
x-math-canvas .tool-group::part(base) {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 8px;
}
x-math-canvas .tool-group::part(header) {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}
x-math-canvas .tool-group::part(summary-icon) {
  color: rgba(255, 255, 255, 0.6);
}
x-math-canvas .tool-group::part(content) {
  padding: 8px;
  padding-top: 0;
}
x-math-canvas .tool-group[open]::part(base) {
  background: rgba(255, 255, 255, 0.08);
}
x-math-canvas .tool-group:hover::part(base) {
  background: rgba(255, 255, 255, 0.1);
}
x-math-canvas .tool-group sl-icon[slot=expand-icon] {
  font-size: 16px;
  color: var(--accent-color);
  margin-right: 8px;
}
x-math-canvas .tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
x-math-canvas .tool-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: grab;
  transition: all 0.15s ease;
}
x-math-canvas .tool-item:hover {
  background: var(--accent-color);
  transform: scale(1.05);
}
x-math-canvas .tool-item:active {
  cursor: grabbing;
  transform: scale(0.95);
}
x-math-canvas .tool-item svg {
  width: 28px;
  height: 28px;
  stroke: #fff;
  stroke-width: 0.5px;
  fill: none;
}
x-math-canvas .tool-item svg path,
x-math-canvas .tool-item svg rect,
x-math-canvas .tool-item svg circle,
x-math-canvas .tool-item svg polygon {
  stroke: #fff;
}
x-math-canvas .popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--toolbar-bg);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 320px;
  padding: 0;
  color: #fff;
  z-index: 1000;
  overflow: hidden;
}
x-math-canvas .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--toolbar-header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
x-math-canvas .popup-header span {
  font-weight: 600;
  font-size: 15px;
}
x-math-canvas .popup-header sl-icon-button::part(base) {
  color: rgba(255, 255, 255, 0.6);
}
x-math-canvas .popup-header sl-icon-button::part(base):hover {
  color: #fff;
}
x-math-canvas .popup-content {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
}
x-math-canvas .input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
}
x-math-canvas .input-container label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  min-width: 35px;
}
x-math-canvas .input-container input,
x-math-canvas .input-container select {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  transition: all 0.15s ease;
}
x-math-canvas .input-container input:focus,
x-math-canvas .input-container select:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.12);
}
x-math-canvas .input-container input::-moz-placeholder, x-math-canvas .input-container select::-moz-placeholder {
  color: rgba(255, 255, 255, 0.3);
}
x-math-canvas .input-container input::placeholder,
x-math-canvas .input-container select::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
x-math-canvas .popup sl-button {
  margin: 0 16px 16px 16px;
  width: calc(100% - 32px);
}
x-math-canvas .slider-container {
  display: none;
  position: absolute;
  top: 56px;
  right: 8px;
  background: var(--toolbar-bg);
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
x-math-canvas .slider-container label {
  font-size: 13px;
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.8);
}
x-math-canvas .slider-container input[type=range] {
  width: 120px;
  cursor: pointer;
  vertical-align: middle;
}
x-math-canvas .slider-container span {
  margin-left: 8px;
  min-width: 35px;
  display: inline-block;
  font-weight: 500;
  color: var(--accent-color);
}
@media (max-width: 767px) {
  x-math-canvas #toolbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: 50vh;
    border-radius: 16px 16px 0 0;
  }
  x-math-canvas #toolbar .tool-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  x-math-canvas #drawtools .toolbar-row {
    justify-content: center;
  }
}
@media (min-width: 768px) {
  x-math-canvas {
    max-width: 1000px;
    min-height: 600px;
  }
  x-math-canvas .canvas-container {
    min-height: 500px;
  }
}
x-math-canvas #toolbar::-webkit-scrollbar {
  width: 6px;
}
x-math-canvas #toolbar::-webkit-scrollbar-track {
  background: transparent;
}
x-math-canvas #toolbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}
x-math-canvas #toolbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.fractal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
x-step.focus .fractal-overlay {
  opacity: 0.85;
}

svg.var .red {
  fill: red;
}
svg.var .blue {
  fill: blue;
}
svg.var .white {
  fill: white;
}
svg.var .overlay {
  fill: white;
  opacity: 0;
  transition: opacity 0.2s;
}
svg.var .overlay.focus {
  opacity: 0.9;
}

.sierpinski {
  overflow: visible;
}
.sierpinski g {
  transition: transform 0.3s, fill 0.3s;
}
.focus .sierpinski .t1 {
  transform: translate(10px, 5px);
  fill: #0f82f2;
}
.focus .sierpinski .t2 {
  transform: translate(-10px, 5px);
  fill: #22ab24;
}
.focus .sierpinski .t3 {
  transform: translate(0, -10px);
  fill: #fd8c00;
}

x-menger-sponge {
  display: block;
}

x-menger-sponge canvas {
  width: 100%;
  height: auto;
}

.coastline path {
  fill: #656073;
}
.coastline line {
  stroke: #fd8c00;
  stroke-width: 6px;
  stroke-linecap: square;
}
.coastline line.border {
  stroke: #933f36;
  stroke-width: 10px;
}

#coastline-grid .grid, #coastline-grid .cells {
  transition: opacity 0.8s;
}
#coastline-grid .coast {
  vector-effect: non-scaling-stroke;
}

.pascal-grid {
  position: relative;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.pascal-grid .r {
  display: flex;
  justify-content: center;
}
.pascal-grid .c {
  cursor: pointer;
  width: 36px;
  font-size: 13px;
  background: #ddd;
  margin: 1px;
  text-align: center;
  position: relative;
  line-height: 20px;
  border-radius: 3px;
  transition: color 0.4s, background 0.4s;
  box-shadow: inset 0 -1px rgba(0, 0, 0, 0.3);
  padding-bottom: 1px;
}
.pascal-grid.done .c {
  cursor: default;
}

.pascal-canvas {
  position: relative;
  float: left;
  shape-outside: polygon(0 0, 240px 0, 480px 420px, 0 420px);
  shape-margin: 32px;
  margin: 0 32px 1.5em 0;
}
.pascal-canvas canvas {
  width: 480px;
  max-width: 100%;
  height: auto;
}
.pascal-canvas .label {
  position: absolute;
  top: 32px;
  left: 24px;
  font-weight: 600;
  color: #333;
}
.pascal-canvas .circled {
  width: 32px;
  height: 32px;
  line-height: 32px;
}
@media screen and (max-width: 1007px) and (min-width: 841px) {
  .pascal-canvas {
    float: none;
    max-width: 480px;
    margin: 0 auto 1.5em;
    shape-outside: none;
  }
}
@media screen and (max-width: 727px) {
  .pascal-canvas {
    float: none;
    max-width: 480px;
    margin: 0 auto 1.5em;
    shape-outside: none;
  }
}
@media screen and (max-width: 460px) {
  .pascal-canvas .label {
    top: 12px;
    left: 0;
  }
}

x-geopad .points circle.chaos-point {
  stroke: none;
  fill: currentColor;
}

.geo-legend {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 14px;
}
.geo-legend .formula, .geo-legend .sequence {
  width: -moz-fit-content;
  width: fit-content;
  background: #e2e1e6;
  border: 2px solid white;
  padding: 2px 4px;
  border-radius: 8px;
}
.geo-legend .formula {
  margin-top: -2px;
  border-bottom-left-radius: 0;
}
.geo-legend .sequence {
  margin-top: -2px;
  border-top-left-radius: 0;
}
.geo-legend .pill {
  padding: 0 8px;
  min-width: 0;
}
.geo-legend .vdots {
  transform: rotate(90deg);
  display: inline-block;
  margin-left: 13px;
  margin-right: 24px;
}
@media screen and (max-width: 940px) and (min-width: 841px), screen and (max-width: 660px) {
  .geo-legend {
    font-size: 12px;
  }
  .geo-legend .pill {
    padding: 0 7px;
  }
  .geo-legend .formula, .geo-legend .sequence {
    padding: 2px 3px;
  }
}
@media screen and (max-width: 560px) {
  .geo-legend {
    font-size: 10px;
  }
  .geo-legend .pill {
    padding: 0 6px;
  }
  .geo-legend .formula, .geo-legend .sequence {
    padding: 1px 2px;
  }
}
@media screen and (max-width: 400px) {
  .geo-legend {
    display: none;
  }
}

.mandel-frame {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  padding-bottom: 65.79%;
}
.mandel-frame img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.mandel-frame .scale {
  position: absolute;
  left: 50%;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid white;
  border-radius: 20px;
  line-height: 24px;
  font-size: 16px;
  padding: 0 14px;
  transform: translateX(-50%);
}

x-geopad img {
  transition: opacity 0.2s;
}

.focus x-geopad img {
  opacity: 0.2;
}

.squares rect {
  transform-origin: center;
  transform-box: fill-box;
}

.sequence-game .game-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  max-width: 900px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.sequence-game h1 {
  text-align: center;
  color: #764ba2;
  margin-bottom: 30px;
  font-size: 2.5em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
.sequence-game .mode-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.sequence-game .display-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
  align-items: center;
  background: #e9ecef;
  padding: 10px;
  border-radius: 10px;
}
.sequence-game .toggle-btn {
  padding: 8px 16px;
  border: 2px solid #667eea;
  border-radius: 8px;
  background: white;
  color: #495057;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: bold;
}
.sequence-game .toggle-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #764ba2;
}
.sequence-game .mode-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: bold;
}
.sequence-game .mode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.sequence-game .mode-btn.active {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}
.sequence-game .sequence-display {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}
.sequence-game .number-box {
  background: white;
  border: 3px solid #667eea;
  border-radius: 10px;
  padding: 15px 20px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  animation: popIn 0.5s ease-out;
  position: relative;
  transition: all 0.3s;
}
.sequence-game .picture-box {
  background: white;
  border: 3px solid #667eea;
  border-radius: 10px;
  padding: 15px;
  animation: popIn 0.5s ease-out;
  position: relative;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  min-height: 80px;
}
.sequence-game .picture-box svg {
  max-width: 100%;
  max-height: 100%;
}
@keyframes popIn {
  0% {
    transform: scale(0) rotate(180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(90deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}
.sequence-game .number-box.highlight, .sequence-game .picture-box.highlight {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}
.sequence-game .info-panel {
  background: #e9ecef;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
}
.sequence-game .info-panel h3 {
  color: #495057;
  margin-bottom: 10px;
}
.sequence-game .info-panel p {
  color: #6c757d;
  line-height: 1.6;
}
.sequence-game .controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.sequence-game .control-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: bold;
}
.sequence-game .play-btn {
  background: #28a745;
  color: white;
}
.sequence-game .play-btn:hover {
  background: #218838;
  transform: translateY(-2px);
}
.sequence-game .quiz-section {
  display: none;
  text-align: center;
}
.sequence-game .quiz-question {
  font-size: 20px;
  margin-bottom: 20px;
  color: #495057;
}
.sequence-game .quiz-input {
  padding: 10px;
  font-size: 18px;
  border: 2px solid #667eea;
  border-radius: 8px;
  width: 100px;
  text-align: center;
  margin: 0 10px;
}
.sequence-game .submit-btn {
  background: #667eea;
  color: white;
  padding: 10px 30px;
  margin-left: 10px;
}
.sequence-game .submit-btn:hover {
  background: #764ba2;
}
.sequence-game .score {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: bold;
}
.sequence-game .feedback {
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: bold;
  animation: slideIn 0.5s ease-out;
}
@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.sequence-game .feedback.correct {
  background: #d4edda;
  color: #155724;
  border: 2px solid #28a745;
}
.sequence-game .feedback.incorrect {
  background: #f8d7da;
  color: #721c24;
  border: 2px solid #dc3545;
}
.sequence-game .sequence-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.sequence-game .sequence-type-btn {
  padding: 10px;
  border: 2px solid #667eea;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: bold;
  color: #495057;
}
.sequence-game .sequence-type-btn:hover {
  background: #667eea;
  color: white;
}
.sequence-game .sequence-type-btn.selected {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #764ba2;
}
.sequence-game .visual-explanation {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  color: #856404;
}
@media (max-width: 600px) {
  .sequence-game h1 {
    font-size: 1.8em;
  }
  .sequence-game .number-box, .sequence-game .picture-box {
    padding: 10px 15px;
    font-size: 18px;
  }
}

.draw-shapes * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.draw-shapes body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.draw-shapes .header {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.draw-shapes .header h1 {
  color: #2d3748;
  margin-bottom: 12px;
  font-size: 32px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
.draw-shapes .instructions {
  color: #4a5568;
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: 500;
}
.draw-shapes .hint {
  color: #718096;
  font-size: 16px;
  font-style: italic;
  margin-bottom: 15px;
}
.draw-shapes .status {
  margin-top: 10px;
  padding: 12px 30px;
  border-radius: 30px;
  display: inline-block;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.draw-shapes .status.working {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  box-shadow: 0 4px 15px rgba(252, 211, 77, 0.3);
}
.draw-shapes .status.error {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  box-shadow: 0 4px 15px rgba(248, 113, 113, 0.3);
  animation: shake 0.5s;
}
.draw-shapes .status.success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3);
  animation: pulse 0.6s;
  transform: scale(1.05);
}
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
.draw-shapes #canvas-container {
  flex: 1;
  position: relative;
  margin: 25px;
  background: white;
  border-radius: 20px;
  min-height: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
.draw-shapes #canvas {
  border: none;
  display: block;
}
.draw-shapes .controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 100;
}
.draw-shapes .btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.draw-shapes .check-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}
.draw-shapes .check-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}
.draw-shapes .shuffle-btn {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}
.draw-shapes .shuffle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}
.draw-shapes .success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.draw-shapes .success-overlay.show {
  display: flex;
  animation: fadeIn 0.3s;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.draw-shapes .success-modal {
  background: white;
  padding: 50px;
  border-radius: 30px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: slideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: 500px;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.draw-shapes .success-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: bounce 1s infinite;
}
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}
.draw-shapes .success-title {
  font-size: 36px;
  color: #10b981;
  margin-bottom: 15px;
  font-weight: 700;
}
.draw-shapes .success-message {
  font-size: 18px;
  color: #4a5568;
  margin-bottom: 30px;
  line-height: 1.6;
}
.draw-shapes .reset-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.draw-shapes .reset-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}
.draw-shapes .point-number {
  position: absolute;
  color: white;
  font-weight: bold;
  font-size: 18px;
  pointer-events: none;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.up-down .container {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
}
.up-down h1 {
  text-align: center;
  color: #333;
  margin-bottom: 10px;
}
.up-down .subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 14px;
}
.up-down .canvas-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  position: relative;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 20px;
}
.up-down canvas {
  border-radius: 10px;
}
.up-down .controls {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.up-down button {
  padding: 12px 24px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-weight: 600;
}
.up-down button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.up-down button:active {
  transform: translateY(0);
}
.up-down button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.up-down .info-panel {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
}
.up-down .info-row {
  display: flex;
  justify-content: space-around;
  text-align: center;
  flex-wrap: wrap;
  gap: 20px;
}
.up-down .info-item {
  flex: 1;
  min-width: 150px;
}
.up-down .info-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.up-down .info-value {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}
.up-down .pattern-display {
  font-family: "Courier New", monospace;
  color: #764ba2;
}
.up-down .speed-control {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}
.up-down input[type=range] {
  width: 200px;
}
.up-down .speed-label {
  font-size: 14px;
  color: #666;
}