* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #2d3748;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

body {
  padding: 24px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 32px;
  color: white;
}

header h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
  font-size: 18px;
  opacity: 0.95;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-bottom: 24px;
}

.card h2 {
  font-size: 24px;
  margin-bottom: 16px;
  color: #667eea;
}

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

@media (max-width: 768px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

.diagram-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 2px solid #e8e4f0;
}

.phases {
  display: grid;
  gap: 16px;
}

.phase {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 8px;
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.phase:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.phase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.phase-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #667eea;
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 16px;
}

.phase h3 {
  font-size: 18px;
  color: #2d3748;
}

.phase p {
  color: #4a5568;
  font-size: 14px;
}

.calculator {
  background: #f7fafc;
  border-radius: 8px;
  padding: 20px;
}

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

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2d3748;
}

.input-group input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #e8e4f0;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.result {
  margin-top: 20px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result.empty {
  display: none;
}

.facts-section ul {
  list-style: none;
  padding: 0;
}

.facts-section li {
  padding: 12px 0;
  padding-left: 32px;
  position: relative;
  border-bottom: 1px solid #e8e4f0;
}

.facts-section li:last-child {
  border-bottom: none;
}

.facts-section li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 12px;
  width: 24px;
  height: 24px;
  background: #667eea;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

sub {
  font-size: 0.8em;
}