/* Reset dan Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

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

/* Header Styles */
header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Main Content Styles */
main {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.detection-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.webcam-container {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#webcam-wrapper {
  position: relative;
  width: 100%;
  height: 300px;
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #eee;
  display: flex;
  justify-content: center;
  align-items: center;
}

#webcam {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.webcam-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.result-container {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-card,
.details-card {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.result-card h2,
.details-card h2 {
  margin-bottom: 15px;
  color: #2575fc;
  font-size: 1.5rem;
}

.prediction-placeholder,
.details-placeholder {
  min-height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #666;
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 15px;
}

/* Info Section Styles */
.info-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.notes-container,
.recommendation-container {
  flex: 1;
  min-width: 300px;
}

.notes-container h3,
.recommendation-container h3 {
  margin-bottom: 15px;
  color: #2575fc;
  font-size: 1.3rem;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.note-card {
  background-color: white;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.note-card h4 {
  color: #6a11cb;
  margin-bottom: 10px;
}

.recommendation-card {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-height: 150px;
}

/* Button Styles */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: #2575fc;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  background-color: #1a5dc8;
  transform: translateY(-2px);
}

.btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Footer Styles */
footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: #666;
  font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .detection-section {
    flex-direction: column;
  }

  .webcam-container,
  .result-container {
    max-width: 100%;
  }
}

/* Animation for prediction result */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.prediction-result {
  animation: fadeIn 0.5s ease-out;
}
