body {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9fafb;
  padding: 2rem;
}

.container {
  background-color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 64rem;
  margin: 1rem;
}

h1, h2 {
  color: #111827;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 0 1.5rem 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-container {
  max-width: 24rem;
  margin-bottom: 2rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.select-wrapper {
  position: relative;
}

select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: white;
  color: #111827;
  font-size: 0.875rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
}

select:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

.loading {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  border-top-color: #3b82f6;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
  position: absolute;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.calculation-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  display: none;
}

.calculation-table th,
.calculation-table td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
}

.calculation-table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #374151;
}

.calculation-table tr:nth-child(even) {
  background-color: #f9fafb;
}

.category-header {
  background-color: #f3f4f6 !important;
  font-weight: bold;
}

.subcategory {
  padding-left: 2rem;
}

.portrait-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.portrait-warning-content {
  background-color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  text-align: center;
  max-width: 90%;
}

.portrait-warning-content svg {
  color: #3b82f6;
  margin-bottom: 1rem;
}

.portrait-warning-content h2 {
  color: #111827;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.portrait-warning-content p {
  color: #6b7280;
  margin: 0;
}

@media screen and (max-width: 768px) and (orientation: portrait) {
  .portrait-warning {
    display: flex;
  }
  
  .container {
    display: none;
  }
}