* {
  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;
  line-height: 1.6;
}

.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;
}

.subtitle {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 95%;
  margin: 0 auto;
}

.content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.control-panel {
  background: #f9fafb;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

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

.input-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #34495e;
}

input[type="number"] {
  width: 100%;
  padding: 14px;
  border: 2px solid #e0e6ed;
  border-radius: 8px;
  font-size: 1.1rem;
  transition: border-color 0.3s;
}

input[type="number"]:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radio-option input {
  width: 18px;
  height: 18px;
}

.radio-option label{
  margin-bottom: 0;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}

button {
  flex: 1;
  min-width: 120px;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.calculate-btn:hover {
  background: linear-gradient(to right, #2980b9, #2573b5);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.copy-btn {
  background: #27ae60;
  color: white;
}

.copy-btn:hover {
  background: #219653;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.clear-btn {
  background: #e74c3c;
  color: white;
}

.clear-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.download-btn {
  background: #9b59b6;
  color: white;
}

.download-btn:hover {
  background: #8e44ad;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
}

.result-panel {
  background: #f9fafb;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  overflow: auto;
}

.result-content {
  background: white;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e0e6ed;
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
  margin-top: 15px;
  font-family: 'Courier New', monospace;
  line-height: 1.8;
  white-space: pre-wrap;
}

.info-section {
  background: #e8f4fd;
  border-left: 4px solid #3498db;
  padding: 20px;
  border-radius: 0 8px 8px 0;
  margin-top: 30px;
}

.info-section h3 {
  margin-bottom: 15px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-section ul{
  margin-top: 10px;
  color: #666;
}

.warning {
  background: #fef9e7;
  border: 1px solid #f1c40f;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  margin-bottom: 0;
  color: #7d6608;
}

.definition {
  background: #e8f6f3;
  border: 1px solid #1abc9c;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
}

.definition h4 {
  margin-bottom: 10px;
  color: #16a085;
}

footer {
  text-align: center;
  padding: 25px;
  color: #7f8c8d;
  font-size: 0.9rem;
  border-top: 1px solid #eee;
}

.loading {
  display: none;
  text-align: center;
  padding: 20px;
  color: #3498db;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid #3498db;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error {
  color: #e74c3c;
  background: #fdeded;
  padding: 10px;
  border-radius: 5px;
  margin-top: 10px;
  display: none;
}
