* {
  margin: 0;
  padding: 0;

}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 20px auto;
  color: #333;
}

.container * {
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 25px;
}

h1 {
  font-size: 32px;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 18px;
  font-weight: 300;
  max-width: 95%;
  margin: 0 auto;
  line-height: 1.6;
}

.content {
  display: flex;
  gap: 20px;
}

.control-panel {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.result-panel {
  flex: 1.5;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.panel-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.shape-selector {
  margin-bottom: 25px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #2c3e50;
}

select,
input {
  width: 100%;
  padding: 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 15px;
  transition: border-color 0.3s;
}

select:focus,
input:focus {
  border-color: #3498db;
  outline: none;
}

.parameters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.parameter-item {
  display: flex;
  flex-direction: column;
}

.parameter-item label {
  margin-bottom: 8px;
}

.buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.calculate-btn {
  background: linear-gradient(to right, #3498db, #2980b9);
  color: white;
}

.calculate-btn:hover {
  background: linear-gradient(to right, #2980b9, #2573a7);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.copy-btn {
  background: linear-gradient(to right, #2ecc71, #27ae60);
  color: white;
}

.copy-btn:hover {
  background: linear-gradient(to right, #27ae60, #219d54);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.clear-btn {
  background: linear-gradient(to right, #e74c3c, #c0392b);
  color: white;
}

.clear-btn:hover {
  background: linear-gradient(to right, #c0392b, #a23526);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.result-display {
  background: white;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin-top: 20px;
  border: 1px solid  #eee;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.result-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #e74c3c;
  margin: 20px 0;
  min-height: 60px;
}

.shape-display {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  background: white;
  border-radius: 10px;
  border: 1px solid  #eee;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.shape-svg {
  width: 180px;
  height: 180px;
}

.formula-display {
  background: white;
  border-radius: 8px;
  padding: 20px;
  min-height: 120px;
  margin-top: 20px;
  border: 1px solid  #eee;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

#formula {
  font-size: 1.2rem;
  text-align: center;
  padding: 15px;
}

.instructions {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-top: 25px;
}

.instructions h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.instructions-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.instructions-section {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #eee;
}

.instructions-section h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #3498db;
  display: flex;
  align-items: center;
  gap: 8px;
}

.instructions-section p {
  line-height: 1.7;
  margin-top: 10px;
}

.instructions-section ul {
  padding-left: 25px;
}

.instructions-section li {
  margin-top: 10px;
  line-height: 1.6;
}

footer {
  text-align: center;
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-top: 20px;
}

.error-message {
  color: #e74c3c;
  font-weight: bold;
  text-align: center;
  margin-top: 25px;
  min-height: 20px;
}
