:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --accent: #60a5fa;
  --text-light: #f8fafc;
  --text-dark: #1f2937;
  --bg-light: #f1f5f9;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --radius: 0.5rem;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  color: var(--text-dark);
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  min-height: 100vh;
}


.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f1efef;
  position: fixed; 
  top: 0; 
  left: 0;
  width: 100%;
  z-index: 1000; 
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 30px;
  width: auto;
  margin-right: 10px;
}

.brand {
  color: #ff5a00;
  font-size: 24px;
  font-weight: bold;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin-right: 470px;
}

.nav-links li a {
  text-decoration: none;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  padding: 5px 10px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links li a.active {
  background-color: #ff5a00;
  color: #fff;
  border-radius: 4px;
}

.nav-links li a:hover {
  background-color: #ff7a33;
  color: #fff;
  border-radius: 4px;
}



.scanner-container {
  max-width: 72rem;
  margin: 0 auto;
  margin-top: 50px;
  padding: 3rem 1rem;
}

.header-section {
  text-align: center;
  margin-bottom: 3rem;
}

.header-section h1 {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.header-section p {
  color: #64748b;
  max-width: 36rem;
  margin: 0 auto;
}

.scanner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.scanner-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-header i {
  color: var(--primary);
}

.card-header h2 {
  font-size: 1.25rem;
  color: var(--text-dark);
}

.upload-area {
  border: 2px dashed #e2e8f0;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.upload-area i {
  color: #94a3b8;
  margin-bottom: 1rem;
}

.browse-btn {
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text-dark);
}

.action-section {
  text-align: center;
  margin: 2rem 0;
}

#analyze-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

#analyze-btn:hover {
  background: var(--primary-dark);
}

.result-section {
  max-width: 48rem;
  margin: 3rem auto 0;
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.result-header i {
  font-size: 2rem;
}

.result-header.safe i {
  color: #22c55e;
}

.result-header.unsafe i {
  color: #ef4444;
}

.result-message {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.result-message.safe {
  color: #15803d;
}

.result-message.unsafe {
  color: #b91c1c;
}

.product-details {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 1rem;
}

.product-details h3 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.ingredients-list {
  list-style-position: inside;
  color: #64748b;
}

.hidden {
  display: none;
}