* {
  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.2rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

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

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

.input-section {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.info-section {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

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

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

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

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

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

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

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

.btn-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.btn-secondary {
  background: #2ecc71;
  color: white;
}

.btn-warning {
  background: #f39c12;
  color: white;
}

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

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: translateY(0);
}

.result-section {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-content {
  min-height: 200px;
  border: 2px dashed #e2e8f0;
  border-radius: 10px;
  padding: 25px;
  background: #f9fafb;
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calculation-result {
  text-align: center;
  font-size: 1.3rem;
  margin-top: 15px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.prime-formula {
  font-size: 1.4rem;
  color: #e74c3c;
  font-weight: 600;
  margin: 20px 0;
  text-align: center;
}

.composite-formula {
  font-size: 1.4rem;
  color: #27ae60;
  font-weight: 600;
  margin: 20px 0;
  text-align: center;
}

.status-badge {
  display: inline-block;
  padding: 6px 15px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: 15px;
}

.prime-badge {
  background: rgba(231, 76, 60, 0.15);
  color: #c0392b;
}

.composite-badge {
  background: rgba(46, 204, 113, 0.15);
  color: #27ae60;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(52, 152, 219, 0.2);
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.note {
  background: #fff8e6;
  border-left: 4px solid #f39c12;
  padding: 10px;
  border-radius: 0 8px 8px 0;
  margin: 30px 0;
}

.definition {
  background: #e8f4fd;
  border-left: 4px solid #3498db;
  padding: 10px;
  border-radius: 0 8px 8px 0;
  margin: 10px 0;
}

.definition h4 {
  margin-bottom: 4px;
  color: #2c3e50;
}

.example {
  background: #f0f7f0;
  border-left: 4px solid #2ecc71;
  padding: 10px;
  border-radius: 0 8px 8px 0;
  margin: 10px 0;
}

.example h4 {
  margin-bottom: 4px;
  color: #2c3e50;
}

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

.highlight {
  background: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
}
