* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  max-width: 1560px;
  min-width: 1240px;
  margin: 20px auto;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 5px;
  color: #2c3e50;
}

.subtitle {
  font-size: 1.1rem;
  color: #7f8c8d;
  max-width: 95%;
  margin: 0 auto;
}

.main {
  display: flex;
  width: 100%;
  gap: 20px;
  margin-bottom: 20px;
}

.calculator {
  flex: 1;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.tabs {
  display: flex;
  background: #3498db;
}

.tab {
  flex: 1;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 600;
  color: white;
  transition: all 0.3s ease;
  border-bottom: 4px solid transparent;
}

.tab.active {
  background: #2980b9;
  border-bottom: 4px solid #e74c3c;
}

.tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
}

.tab-content {
  display: none;
  padding: 20px 40px;
}

.tab-content.active {
  display: block;
}

.formula {
  text-align: center;
  font-size: 3rem;
  margin: 50px 0;
  color: #2980b9;
  font-weight: bold;
}

.input-group {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.input-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

label {
  font-size: 1.3rem;
  margin-bottom: 12px;
  font-weight: 600;
  color: #34495e;
}

input {
  width: 95%;
  padding: 16px 20px;
  font-size: 1.3rem;
  border: 2px solid #ddd;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.3s;
  text-align: center;
}

input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

button {
  flex: 1;
  padding: 16px;
  font-size: 1.2rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.calculate-btn {
  background: #2ecc71;
  color: white;
}

.calculate-btn:hover {
  background: #27ae60;
  transform: translateY(-2px);
}

.copy-btn {
  background: #3498db;
  color: white;
}

.copy-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

.clear-btn {
  background: #e74c3c;
  color: white;
}

.clear-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

.calculator-result {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #eee;
}

.result-box {
  display: none;
}

.result-box.active {
  display: block;
}

.result-box .formula{
  font-size: 2.5rem;
  margin: 30px 0;
}

.result-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #2c3e50;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.result {
  font-size: 1.2rem;
  line-height: 1.8;
  min-height: 180px;
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
  color: #2c3e50;
  padding: 15px;
  background: white;
  border-radius: 8px;
  border: 1px solid #eee;
  margin-bottom: 20px;
}

.info-section {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 20px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #f1f2f3;
  padding-bottom: 15px;
}

.instructions,.about {
  margin-bottom: 20px;
}

ul {
  padding-left: 30px;
  margin-bottom: 20px;
}

li {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.note {
  background: #fff8e1;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #ffc107;
  font-size: 1.1rem;
}

footer {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
  font-size: 1.1rem;
}

.complex-note {
  color: #e74c3c;
  font-weight: 600;
  margin-top: 15px;
}
