* {
  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 {
  margin-bottom: 20px;
  text-align: center;
}

h1 {
  font-size: 2.1rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.tagline {
  font-size: 1rem;
  opacity: 0.9;
}

.content {
  display: flex;
  padding: 20px;
  gap: 20px;
}

.info-section {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.calculator-section {
  flex: 2;
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  gap: 20px;
}

h2 {
  font-size: 1.6rem;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #eaeaea;
}

h3 {
  font-size: 1.2rem;
  color: #3498db;
  margin: 0 0 12px;
}

p {
  line-height: 1.7;
  margin-bottom: 15px;
  color: #555;
}

ul {
  padding-left: 25px;
  margin-bottom: 20px;
}

li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.input-group {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
  align-items: center;
}

label {
  font-size: 1.1rem;
  font-weight: 500;
  min-width: 120px;
}

input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 1.2rem;
  transition: all 0.3s;
}

input:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.button-group {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  flex-wrap: wrap;
}

button {
  padding: 14px 25px;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.calculate-btn {
  background: linear-gradient(to right, #3498db, #2c3e50);
  color: white;
  flex: 2;
}

.secondary-btn {
  background: #f0f0f0;
  color: #333;
  flex: 1;
}

.secondary-btn:hover {
  background: #e0e0e0;
}

.calculate-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.result-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 25px;
  display: none;
}

.result-section.visible {
  display: block;
}

.formula {
  font-size: 1.4rem;
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 10px;
  border-left: 4px solid #3498db;
  line-height: 1.8;
}

.result {
  background: white;
  border-radius: 10px;
  padding: 20px;
  max-height: 300px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 1.1rem;
  line-height: 1.6;
  border: 1px solid #eee;
  white-space: pre-wrap;
  word-break: break-all;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.action-btn {
  padding: 12px 20px;
  background: #f0f0f0;
}

.action-btn:hover {
  background: #e0e0e0;
}

.loading {
  display: none;
  text-align: center;
  padding: 20px;
  font-size: 1.2rem;
}

.loading.visible {
  display: block;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.error {
  color: #e74c3c;
  background: #fdecea;
  padding: 12px 15px;
  border-radius: 8px;
  margin-top: 15px;
  display: none;
}

.error.visible {
  display: block;
}

.definition {
  background: #e3f2fd;
  padding: 15px;
  border-radius: 10px;
  margin: 15px 0;
  border-left: 4px solid #2196f3;
}

footer {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
  font-size: 0.9rem;
  border-top: 1px solid #eee;
}
