 *{
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  position: relative;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 25px;
  width: 100%;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

header p{
  opacity: 0.9;
  font-size: 1rem;
}

.tool-container {
  display: grid;
  grid-template-columns: 1fr 800px;
  gap: 20px;
  margin-bottom: 35px;
}

.curve-section,.control-section{
  flex: 1;
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #444;

}

.curve-container {
  position: relative;
  width: 100%;
  height: 400px;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.coordinate-system {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.grid-line {
  position: absolute;
  background: #e0e0e0;
}

.curve-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.control-points {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.control-point {
  position: absolute;
  width: 26px;
  height: 26px;
  background: #ff6b6b;
  border: 2px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: move;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.control-point.p1 {
  background: #4ecdc4;
}

.control-point.p2 {
  background: #ff6b6b;
}

.animation-preview {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.animated-element {
  margin-top: 20px;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 6px;
  position: relative;
}

.playground {
  height: 120px;
  width: 100%;
  background: #e9ecef;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.playground::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(90deg,#e9ecef,#e9ecef 10px,#dee2e6 10px,#dee2e6 20px);
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label {
  font-weight: 500;
  color: #555;
}

input[type="number"] {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

input[type="range"] {
  width: 100%;
}

.presets {
  margin-bottom: 20px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.preset-item {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.preset-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.preset-name {
  font-weight: 500;
  margin-bottom: 8px;
}

.preset-values {
  font-family: monospace;
  font-size: 0.8rem;
  color: #666;
}

.code-output {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
}

.code-title {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-content {
  line-height: 1.5;
}

.function-name {
  color: #f92672;
}

.params {
  color: #a6e22e;
}

.value {
  color: #ae81ff;
}

footer {
  background: #2c3e50;
  color: white;
  padding: 40px 20px;
}

.footer-content {
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.footer-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-section p {
  line-height: 1.6;
  color: #ecf0f1;
  margin-top: 15px;
}

.feature-list {
  list-style: none;
}

.feature-list li {
  padding: 8px 0;
  border-bottom: 1px solid #34495e;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-list li:last-child {
  border-bottom: none;
}

.info-icon {
  font-size: 1.2rem;
}

@keyframes slideAnimation {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(300px);
  }
}


.duration-control {
  margin-bottom: 20px;
}

.duration-control label{
  margin-bottom: 15px;
}

.buttons{
  display: flex;
  justify-content: center;
  gap: 20px;
}

.play-btn, .copy-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 16px 58px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s;
}

.play-btn:hover {
  background: #5a6fd8;
}

.copy-btn {
  background: #4ecdc4;
}

.copy-btn:hover {
  background: #45b7aa;
}


@keyframes slideAnimation {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(680px);
  }
}
