:root {
  --primary: #00c853;          /* Vivid Green */
  --primary-dark: #007e33;     /* Deep Green */
  --background: #121212;       /* Dark background */
  --surface: #1e1e1e;          /* Surface panels */
  --card: #212121;             /* Glossy card surface */
  --text-primary: #ffffff;     /* White text */
  --text-secondary: #bbbbbb;   /* Light grey text */
  --accent: #00e676;           /* Neon Green Accent */
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* 💫 RESET & BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
}

/* 🌐 NAVBAR */
.navbar {
  top: 0;
  position: fixed;
  width: 100%;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 1000;
}
.nav-container {
  max-width: 1200px;
  margin: auto;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--primary);
}

/* Nav Links - Desktop */
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links li a {
  align-items: center;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.nav-links li a:hover,
.nav-links li a:focus {
  background-color: var(--primary-dark);
  color: var(--text-primary);
}
.btn-outline {
  border: 2px solid var(--primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  color: var(--primary);
  transition: background 0.3s, color 0.3s;
}
.btn-outline:hover {
  background-color: var(--primary);
  color: var(--text-primary);
}

/* Hamburger */
.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Responsive Styles */

video {
  width: 25000px;
  height: 100%;
  position: absolute;
  /*object-fit: cover;
  */
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}
/* 📦 Form Section */
.form-container {
  max-width: 900px;
  margin: 120px auto 60px;
  background: var(--card);
  padding: 40px;
  box-shadow: var(--shadow);
  border-radius: 12px;
}
.form-container h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--accent);
  font-size: 2rem;
}
.options-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  justify-content: center;
}
.option-card {
  flex: 1;
  min-width: 260px;
  background: var(--surface);
  border: 2px solid var(--primary);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.option-card:hover {
  background: var(--primary-dark);
  transform: translateY(-5px);
}
.option-card.active {
  background: var(--primary-dark);
  box-shadow: 0 0 0 3px var(--primary) inset;
}
.form-section {
  display: none;
  margin-top: 30px;
}
.form-group {
  margin-bottom: 20px;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-primary);
}
input[type="text"],
input[type="date"],
input[type="file"],
input[type="number"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--surface);
  color: var(--text-primary);
}

input[type="text"]::placeholder,
input[type="date"]::placeholder,
input[type="file"]::placeholder,
input[type="number"]::placeholder {
  color: var(--text-secondary);
}

/* 🔍 Scanner */
#barcode-scanner {
  width: 100%;
  height: 400px;
  border: 2px dashed var(--primary);
  margin-bottom: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
  overflow: hidden;
  background-color: var(--surface);
}
#scanner-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f44336;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
}
.scanner-placeholder {
  text-align: center;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* 🔘 Buttons */
.btn-scan,
.btn {
  background-color: var(--primary);
  color: var(--text-primary);
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  font-weight: 600;
}
.btn-scan:hover,
.btn:hover {
  background-color: var(--primary-dark);
}

/* 👣 FOOTER */
footer {
  background-color: var(--surface);
  color: var(--text-secondary);
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  position: absolute;
  width: 100vw;
  /* bottom: 0; */
}
.success-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 9999;
  animation: popupFade 0.3s ease-out;
}
.success-popup .popup-content {
  width: 100%;
  text-align: center;
}
.success-popup h3 {
  margin-bottom: 10px;
  color: var(--accent);
}
.success-popup .btn {
  margin: 10px 5px;
  padding: 10px 20px;
  background: var(--primary);
  color: var(--text-primary);
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}
.success-popup .btn:hover {
  background: var(--primary-dark);
}
.success-popup .btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
@keyframes popupFade {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
/* Sorting UI */
.filter-container {
  max-width: 800px;
  margin: 100px auto 20px;
  text-align: center;
}
.filter-container select {
  padding: 10px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-top: 10px;
  background-color: var(--surface);
  color: var(--text-primary);
}

/* Table row animation */
.fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Status colors */
.ok {
  color: var(--primary);
}
.safe {
  color: var(--primary);
}
.warning {
  color: #ffa726;
}
.danger {
  color: #ef5350;
  font-weight: bold;
}
.expired-warning {
  color: #ff7043;
}
.expired-danger {
  color: #e53935;
}
.dead {
  color: var(--text-secondary);
  font-weight: bold;
}
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 📱 Responsive Design */
@media (max-width: 768px) {
  .navbar {
    top: 0;
  }
  .hamburger {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    display: none;
    padding: 20px;
    box-shadow: var(--shadow);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    margin: 10px 0;
  }

  #barcode-scanner {
    height: 300px;
  }

  .form-container {
    margin: 100px 20px;
    padding: 20px;
  }

  .btn,
  .btn-scan {
    width: 100%;
  }
}