/* Main styling */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f7f9f7;
  color: #333;
  line-height: 1.6;
}

h1 {
  color: #2c5e1a;
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px solid #2c5e1a;
  padding-bottom: 10px;
}

/* File input styling */
#image-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

#image-input {
  margin-bottom: 15px;
}

#input-image-container {
  margin: 20px 0;
  text-align: center;
}

#input-image {
  max-width: 100%;
  max-height: 400px;
  border: 2px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Button styling */
#predict-button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 12px 24px;
  text-align: center;
  text-decoration: none;
  display: block;
  font-size: 16px;
  margin: 20px auto;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#predict-button:hover {
  background-color: #45a049;
}

#predict-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* Results styling */
#result {
  margin-top: 30px;
  padding: 15px;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.prediction-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.prediction-item:last-child {
  border-bottom: none;
}

.equipment-name {
  font-weight: bold;
}

.probability-bar {
  height: 20px;
  background-color: #e9f5e9;
  margin-top: 5px;
  border-radius: 10px;
  overflow: hidden;
}

.probability-fill {
  height: 100%;
  background-color: #4CAF50;
  border-radius: 10px;
}

/* Loading indicator */
.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #4CAF50;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
  margin: 20px auto;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }
  
  #predict-button {
    width: 100%;
  }
}