* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #e0e5ec 0%, #d5dae3 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.header {
  background: #e0e5ec;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left,
.header-right {
  flex: 1;
}
.header-left {
  display: flex;
  justify-content: flex-start;
}
.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}
.header-right {
  display: flex;
  justify-content: flex-end;
}

.back-btn {
  background: #e0e5ec;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 6px 6px 12px #bec3c9, -6px -6px 12px #ffffff;
  transition: all 0.1s ease;
}

.back-btn:active {
  box-shadow: inset 6px 6px 12px #bec3c9, inset -6px -6px 12px #ffffff;
}
.back-btn svg {
  width: 24px;
  height: 24px;
  fill: #4a5568;
}

.header-logo {
  width: 45px;
  height: 45px;
  background: #e0e5ec;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 6px 6px 12px #bec3c9, -6px -6px 12px #ffffff;
  font-size: 24px;
}

.header-title {
  font-size: 20px;
  font-weight: bold;
  color: #4a5568;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.header-title span {
  display: block;
}

.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 420px;
}

.calculator-wrap {
  background: #e0e5ec;
  border-radius: 40px;
  padding: 30px;
  box-shadow: 20px 20px 60px #bec3c9, -20px -20px 60px #ffffff;
}

.input-section {
  background: #ffffff;
  border-radius: 25px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: inset 8px 8px 16px #d1d9e6, inset -8px -8px 16px #ffffff;
}

.section-label {
  font-size: 14px;
  font-weight: 600;
  color: #718096;
  margin-bottom: 12px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.input-field {
  background: #e0e5ec;
  border: none;
  border-radius: 15px;
  padding: 15px;
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  text-align: center;
  box-shadow: inset 4px 4px 8px #d1d9e6, inset -4px -4px 8px #ffffff;
  outline: none;
  width: 100%;
}

.unit-label {
  background: #e0e5ec;
  border: none;
  border-radius: 15px;
  padding: 15px;
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  box-shadow: inset 4px 4px 8px #d1d9e6, inset -4px -4px 8px #ffffff;
  outline: none;
  text-align: center;
  min-width: 60px;
}

.result-section {
  background: #ffffff;
  border-radius: 25px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: inset 8px 8px 16px #d1d9e6, inset -8px -8px 16px #ffffff;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

.result-row:last-child {
  border-bottom: none;
}

.result-label {
  font-size: 16px;
  font-weight: 600;
  color: #718096;
}

.result-value {
  font-size: 18px;
  font-weight: bold;
  color: #2d3748;
}

.buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.btn {
  background: #e0e5ec;
  border: none;
  border-radius: 18px;
  padding: 18px;
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  cursor: pointer;
  transition: all 0.1s ease;
  box-shadow: 8px 8px 16px #bec3c9, -8px -8px 16px #ffffff;
}

.btn:active {
  box-shadow: inset 8px 8px 16px #bec3c9, inset -8px -8px 16px #ffffff;
}

.btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  grid-column: span 2;
}

.btn.primary:active {
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
  .calculator-wrap {
    padding: 20px;
  }
}
