* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: #f8f9fa;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 5%;
  background: white;
  min-height: 100vh;
}

/* Header */
h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #ff5733, #ff4520);
  border-radius: 2px;
}

/* Upload Container - Card Style */
.upload-container {
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border: 2px dashed #e9ecef;
  margin: 3rem 0;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.upload-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: #ff5733;
}

.upload-container.active {
  border-color: #ff5733;
  background: rgba(255, 87, 51, 0.05);
}

.upload-container svg {
  margin-bottom: 1rem;
  color: #ff5733;
}

.upload-container p {
  color: #5a6c7d;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.upload-container small {
  color: #7f8c8d;
  font-size: 0.9rem;
}

/* File Input Hidden */
.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Selected Files */
.selected-files {
  margin-top: 2rem;
  text-align: left;
  display: none;
}

.file-item {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e9ecef;
}

.file-item span {
  color: #2c3e50;
  font-weight: 500;
}

.remove-file {
  background: #e74c3c;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.remove-file:hover {
  background: #c0392b;
  transform: scale(1.1);
}

/* Parameters Container - Section Style */
.parameters-container {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f1f3f4;
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Parameter Group */
.parameter-group {
  display: flex;
  flex-direction: column;
}

.parameter-group label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* Custom Select Styling */
.custom-select-wrapper {
  position: relative;
}

.custom-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: white;
  color: #2c3e50;
  font-size: 1rem;
  font-weight: 500;
  appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-select:focus {
  outline: none;
  border-color: #ff5733;
  box-shadow: 0 0 0 3px rgba(255, 87, 51, 0.1);
}

.custom-select-wrapper::after {
  content: '▼';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #7f8c8d;
  pointer-events: none;
  font-size: 0.8rem;
}

/* Number Input */
input[type="number"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: white;
  color: #2c3e50;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

input[type="number"]:focus {
  outline: none;
  border-color: #ff5733;
  box-shadow: 0 0 0 3px rgba(255, 87, 51, 0.1);
}

/* Range Input */
.range-input {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

input[type="range"] {
  flex: 1;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  outline: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: #ff5733;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 8px rgba(255, 87, 51, 0.1);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #ff5733;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.value-display {
  min-width: 50px;
  text-align: center;
  font-weight: 600;
  color: #ff5733;
  font-size: 1rem;
}

/* Calculate Button */
#calculateButton {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ff5733, #ff4520);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 2rem 0;
}

#calculateButton:hover:not(:disabled) {
  background: linear-gradient(135deg, #e74c3c, #d63031);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 87, 51, 0.3);
}

#calculateButton:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading */
.loading {
  display: none;
  text-align: center;
  padding: 3rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f1f3f4;
  margin: 2rem 0;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e9ecef;
  border-top: 4px solid #ff5733;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  color: #5a6c7d;
  font-size: 1.1rem;
}

/* Error Message */
.error-message {
  display: none;
  background: #ffebee;
  color: #c62828;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #ffcdd2;
  margin: 1rem 0;
  font-weight: 500;
}

/* Results Container */
.results-container {
  display: none;
  margin-top: 3rem;
}

.results-header {
  font-size: 2.2rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.results-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #ff5733, #ff4520);
  border-radius: 2px;
}

/* Parts Container */
.parts-container {
  margin-bottom: 2rem;
}

/* Part Card */
.part-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
  border: 1px solid #f1f3f4;
  transition: all 0.3s ease;
}

.part-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.part-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f3f4;
}

.part-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2c3e50;
  flex: 1;
}

.part-cost {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ff5733;
}

.part-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.part-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.detail-label {
  color: #7f8c8d;
  font-weight: 500;
  font-size: 0.9rem;
}

.detail-value {
  color: #2c3e50;
  font-weight: 600;
}

/* Price Summary */
.price-summary {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f1f3f4;
  margin-top: 2rem;
}

.subtotal-price,
.gst-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  color: #5a6c7d;
  font-size: 1.1rem;
  border-bottom: 1px solid #f1f3f4;
}

.total-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
}

.total-price span:last-child {
  color: #ff5733;
  font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 3rem 3%;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  .upload-container {
    padding: 2rem;
  }
  
  .parameters-container {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
  
  .part-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .part-details {
    grid-template-columns: 1fr;
  }
  
  .results-header {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 2rem 4%;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  .upload-container {
    padding: 1.5rem;
  }
  
  .part-card {
    padding: 1.5rem;
  }
  
  .price-summary {
    padding: 1.5rem;
  }
}