/* Global Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f4f9;
  position: relative;
  margin: 0;
  padding: 0;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Background image with reduced opacity */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/static/images/mold-background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  opacity: 0.8;
  z-index: -1;
}

/* Navigation bar styles */
.nav-bar {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  z-index: 1010;
}

.logo-area {
  display: flex;
  align-items: center;
}

.logo-area img {
  height: 40px;
  margin-right: 10px;
}

.logo-area a {
  color: #e67e22;
  font-weight: bold;
  text-decoration: none;
  font-size: 1.2em;
}

.user-nav {
  display: flex;
  align-items: center;
}

.user-nav a {
  margin-left: 15px;
  color: #333;
  text-decoration: none;
  font-size: 0.9em;
}

.user-nav a:hover {
  color: #e67e22;
}

.user-nav .btn-small {
  padding: 6px 12px;
  font-size: 0.9em;
  background-color: #e67e22;
  color: #fff;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.user-nav .btn-small:hover {
  background-color: #d35400;
  color: #fff;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background-color: #e67e22;
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  margin-right: 10px;
  font-size: 0.9rem;
}

.user-info {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 5px;
  transition: background-color 0.2s;
}

.user-info:hover {
  background-color: rgba(230, 126, 34, 0.1);
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  z-index: 1010;
  border-radius: 5px;
  margin-top: 5px;
  transition: all 0.3s ease;
  padding: 5px 0;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Create a larger hover area to prevent dropdown from disappearing */
.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 20px; /* Gap between user info and dropdown */
  display: block;
}

/* Ensure dropdown stays visible when hovering between elements */
.dropdown-content::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  display: block;
}

.dropdown-content a {
  color: #333;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f9f9f9;
}

/* Button styles */
.btn-primary {
  background-color: #e67e22;
  border-color: #e67e22;
}

.btn-primary:hover {
  background-color: #d35400;
  border-color: #d35400;
}

/* Container styles */
.container-white {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* Upload form styling */
.upload-form {
  text-align: center;
  margin: 30px auto;
  max-width: 600px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.upload-form h1 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.upload-form p {
  color: #7f8c8d;
  margin-bottom: 30px;
}

.file-input-container {
  position: relative;
  margin-bottom: 20px;
}

.file-input-container input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-label {
  display: inline-block;
  padding: 15px 25px;
  background-color: #3498db;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.file-label:hover {
  background-color: #2980b9;
}

#file-name-display {
  margin: 10px 0;
  font-size: 14px;
  color: #555;
}

.submit-btn {
  padding: 15px 30px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submit-btn:hover {
  background-color: #45a049;
}

/* Image preview */
.image-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  margin: 15px auto;
  display: block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Result styles */
.result-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.result-image {
  max-width: 100%;
  border-radius: 4px;
  margin-bottom: 20px;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.danger-indicator {
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: bold;
  color: white;
}

.danger-high {
  background-color: #d9534f;
}

.danger-medium {
  background-color: #f0ad4e;
}

.danger-low {
  background-color: #5bc0de;
}

.danger-none {
  background-color: #5cb85c;
}

.recommendations {
  margin-top: 20px;
}

.recommendations ul {
  padding-left: 20px;
}

.login-prompt {
  margin-top: 30px;
  padding: 15px;
  background-color: #e8f4f8;
  border-radius: 4px;
  text-align: center;
}

.button-container {
  margin-top: 15px;
}

.button {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 10px;
  background-color: #4CAF50;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
}

.button:hover {
  background-color: #45a049;
}

/* Library link styling */
.mold-library-section {
  margin-top: 20px;
  border-top: 1px solid #ddd;
  padding-top: 20px;
  text-align: center;
}

.mold-library-image {
  max-width: 200px;
  margin: 10px auto;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s;
}

.mold-library-image:hover {
  transform: scale(1.05);
} 