* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #ffffff;
  --primary-dark: #e5e5e5;
  --secondary: #a1a1aa;
  --danger: #ef4444;
  --dark: #0a0a0a;
  --dark-card: #1a1a1a;
  --dark-elevated: #242424;
  --gray: #9ca3af;
  --light-gray: #2a2a2a;
  --white: #ffffff;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.7);
  --glow: 0 0 20px rgba(255, 255, 255, 0.3);
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: var(--dark);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
}

/* Main App */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app.hidden {
  display: none;
}

/* Header */
.app-header {
  background: var(--dark-card);
  backdrop-filter: blur(10px);
  padding: 15px 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--light-gray);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.header-left:hover {
  opacity: 0.8;
}

.top-nav {
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.get-started-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--white), var(--primary-dark));
  color: var(--dark);
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
  text-decoration: none;
  display: inline-block;
}

.get-started-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.logo-small {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-small svg {
  width: 24px;
  height: 24px;
  color: var(--dark);
}

.logo-small img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 40px;
  position: relative;
}

/* Particles */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

/* Home Screen */
.home-hero {
  text-align: center;
  padding: 30px 20px 20px;
  animation: fadeInUp 0.8s ease;
}

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

.hero-icon {
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero-icon svg {
  width: 45px;
  height: 45px;
  color: var(--dark);
}

.hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(
    90deg,
    #ffffff,
    #d4d4d8,
    #71717a,
    #d4d4d8,
    #ffffff
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
  animation: gradientShift 5s ease-in-out infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 30px;
}

/* Problems Section */
.problems-section {
  margin: 40px 0;
  animation: fadeInUp 1s ease 0.3s both;
}

.problems-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, #ffffff, #d4d4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 25px;
}

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

.problem-card {
  background: var(--dark-card);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  border: 1px solid var(--light-gray);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: slideInUp 0.6s ease both;
  position: relative;
  overflow: hidden;
}

.problem-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.problem-card:hover::before {
  left: 100%;
}

.problem-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--white);
  box-shadow: var(--glow);
}

.problem-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 50%;
  animation: bounce 2s ease infinite;
}

.problem-icon svg {
  width: 32px;
  height: 32px;
  color: var(--white);
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.problem-card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.problem-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Mission Cards */
.mission-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.mission-card {
  background: var(--dark-card);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid var(--light-gray);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: slideInUp 0.6s ease both;
  position: relative;
  overflow: hidden;
}

.mission-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  transition: left 0.6s ease;
}

.mission-card:hover::before {
  left: 100%;
}

.mission-card:hover {
  transform: translateY(-5px);
  border-color: var(--white);
  box-shadow: var(--glow);
}

.mission-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.mission-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.08)
  );
  border-radius: 12px;
  transition: all 0.3s ease;
}

.mission-card:hover .mission-icon {
  background: linear-gradient(135deg, var(--white), var(--primary-dark));
  transform: scale(1.1) rotate(5deg);
}

.mission-icon svg {
  width: 28px;
  height: 28px;
  color: var(--white);
  transition: color 0.3s ease;
}

.mission-card:hover .mission-icon svg {
  color: var(--dark);
}

.mission-header h4 {
  font-size: 1.3rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ffffff, #d4d4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.mission-content {
  padding-left: 65px;
}

.mission-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
  margin: 0;
}

.page-section {
  padding: 60px 0;
  scroll-margin-top: 80px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-top: 10px;
}

/* App Page */
.app-page-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--light-gray);
}

.back-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--dark-elevated);
  color: var(--text-primary);
  border: 1px solid var(--light-gray);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.back-button:hover {
  background: var(--light-gray);
  border-color: var(--white);
  transform: translateX(-3px);
}

.back-button svg {
  width: 20px;
  height: 20px;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff, #d4d4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 30px 20px;
  background: var(--dark-card);
  border-top: 1px solid var(--light-gray);
  margin-top: 60px;
}

.app-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* Animated Ring */
.ring {
  margin: 30px auto;
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.ring1,
.ring2 {
  position: absolute;
  inset: 0;
  border-radius: 40%;
  animation-timing-function: ease-in-out;
}

.ring1 {
  border: 3px solid var(--white);
  border-radius: 41% 71% 57% 35% / 38% 51% 64% 49%;
  animation: animate 20s linear infinite;
}

.ring2 {
  border: 3px solid var(--text-secondary);
  animation: animate2 15s linear infinite;
}

@keyframes animate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes animate2 {
  0% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.ring p {
  font-size: 0.75em;
  line-height: 1.3;
  margin: 0;
  color: var(--text-secondary);
}

.ring a {
  position: relative;
  z-index: 10;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.ring a:hover {
  color: var(--primary-dark);
  transform: scale(1.05);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--dark-card);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
  border-top: 1px solid var(--light-gray);
  justify-content: center;
  gap: 40px;
  z-index: 1000;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 24px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--gray);
  transition: all 0.3s ease;
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobile-nav-item svg {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

.mobile-nav-item.active {
  color: var(--white);
}

.mobile-nav-item.active svg {
  transform: scale(1.1);
}

.mobile-nav-item:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.profile-icon-mobile {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.profile-icon-mobile svg {
  width: 16px;
  height: 16px;
  stroke: var(--white);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.feature-card {
  background: var(--dark-card);
  border-radius: 20px;
  padding: 25px;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-gray);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: slideInUp 0.6s ease both;
}

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

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--glow);
  border-color: var(--white);
}

.feature-icon {
  width: 55px;
  height: 55px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  background: linear-gradient(135deg, var(--white), var(--primary-dark));
  transform: rotate(5deg) scale(1.1);
}

.feature-icon svg {
  width: 30px;
  height: 30px;
  color: var(--white);
  transition: color 0.3s ease;
}

.feature-card:hover .feature-icon svg {
  color: var(--dark);
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ffffff, #d4d4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* CTA Button */
.cta-button {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 40px;
  background: linear-gradient(135deg, var(--white), var(--primary-dark));
  color: var(--dark);
  border: none;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: pulse 2s ease infinite;
}

.cta-button svg {
  width: 24px;
  height: 24px;
}

.cta-button:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 25px 70px rgba(255, 255, 255, 0.3);
}

.cta-button:active {
  transform: translateY(-2px) scale(0.98);
}

.scanner-container {
  animation: slideIn 0.6s ease;
}

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

.scanner-frame {
  position: relative;
  background: var(--dark-card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--light-gray);
  margin-bottom: 20px;
  aspect-ratio: 4/3;
}

#video {
  width: 100%;
  height: 100%;
  position: relative;
}

#video video,
#video canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.scanner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scan-area {
  position: relative;
  width: 80%;
  max-width: 300px;
  aspect-ratio: 1;
}

.corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 3px solid var(--white);
}

.corner-tl {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-radius: 8px 0 0 0;
}

.corner-tr {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
  border-radius: 0 8px 0 0;
}

.corner-bl {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 8px;
}

.corner-br {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-radius: 0 0 8px 0;
}

.status-message {
  text-align: center;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: 500;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-message.scanning {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 2px solid var(--white);
}

.status-message.success {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 2px solid var(--white);
  animation: successPulse 0.5s ease;
  box-shadow: var(--glow);
}

@keyframes successPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.status-message.error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 2px solid var(--danger);
}

/* Buttons */
.action-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Poppins", sans-serif;
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--white), var(--primary-dark));
  color: var(--dark);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--dark-elevated);
  color: var(--danger);
  border: 2px solid var(--danger);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--danger);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Results */
.result-container {
  background: var(--dark-card);
  border-radius: 20px;
  padding: 25px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--light-gray);
  margin-top: 20px;
  animation: slideUp 0.5s ease;
}

.result-container.hidden {
  display: none;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--light-gray);
}

.result-header h2 {
  background: linear-gradient(135deg, #ffffff, #d4d4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.5rem;
  font-weight: 600;
}

.btn-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--light-gray);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-close:hover {
  background: var(--danger);
  transform: rotate(90deg);
}

.btn-close:hover svg {
  color: var(--white);
}

.btn-close svg {
  width: 20px;
  height: 20px;
  color: var(--gray);
  transition: color 0.3s ease;
}

.product-info {
  line-height: 1.8;
}

.product-image {
  display: none;
}

.product-field {
  margin-bottom: 15px;
  padding: 15px;
  background: var(--dark-elevated);
  border-radius: 12px;
  border: 1px solid var(--light-gray);
  transition: all 0.3s ease;
}

.product-field:hover {
  background: var(--light-gray);
  transform: translateX(5px);
  border-color: var(--white);
}

.product-field strong {
  color: var(--white);
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.product-field div {
  color: var(--text-secondary);
}

/* Page Hero */
.page-hero {
  text-align: center;
  padding: 30px 20px 40px;
  animation: fadeInUp 0.8s ease;
}

.page-hero .hero-title {
  font-size: 2.2rem;
}

.page-hero .hero-subtitle {
  font-size: 1.15rem;
  margin-bottom: 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, #ffffff, #d4d4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
  .app-header {
    padding: 12px 15px;
  }

  .header-content {
    justify-content: center;
    padding: 0 15px;
  }

  .header-left {
    margin: 0 auto;
  }

  .top-nav {
    display: none;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .main-content {
    padding-bottom: 120px;
  }

  .app-footer {
    margin-bottom: 100px;
    padding-bottom: 20px;
  }

  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .app-page-header {
    padding-bottom: 15px;
    margin-bottom: 20px;
  }

  .back-button {
    display: none;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .ai-modal {
    max-width: 95%;
    max-height: 85vh;
    width: 100%;
  }

  .ai-modal-header h3 {
    font-size: 1.1rem;
  }

  .ai-modal-content {
    padding: 15px;
    max-height: calc(85vh - 70px);
  }

  .alternative-card,
  .mood-card {
    padding: 15px;
  }

  .alternative-header,
  .mood-card-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .ai-features-section {
    margin-top: 20px;
  }

  .ai-button {
    padding: 12px 16px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .eco-score-card {
    padding: 0;
  }

  .eco-overall-top {
    padding: 20px 15px;
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .score-circle-large {
    width: 80px;
    height: 80px;
  }

  .score-number {
    font-size: 1.8rem;
  }

  .score-text h4 {
    font-size: 1.1rem;
  }

  .score-text p {
    font-size: 0.85rem;
  }

  .eco-metrics {
    padding: 15px;
  }

  .eco-item {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .eco-info {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .eco-explanation,
  .eco-tips {
    margin: 15px;
    padding: 15px;
  }

  .app-title {
    font-size: 1.2rem;
  }

  .logo-small {
    width: 36px;
    height: 36px;
  }

  .logo-small svg {
    width: 20px;
    height: 20px;
  }

  .hero-icon {
    width: 80px;
    height: 80px;
  }

  .hero-icon svg {
    width: 40px;
    height: 40px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .home-hero {
    padding: 20px 15px 15px;
  }

  .mission-content {
    padding-left: 0;
  }

  .mission-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .mission-card {
    padding: 20px;
  }

  .mission-header h4 {
    font-size: 1.1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-card {
    padding: 20px;
  }

  .feature-card h3 {
    font-size: 1.1rem;
  }

  .feature-card p {
    font-size: 0.9rem;
  }

  .feature-icon {
    width: 50px;
    height: 50px;
  }

  .feature-icon svg {
    width: 26px;
    height: 26px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }

  .main-content {
    padding: 15px;
    padding-bottom: 85px;
  }

  .cta-button {
    font-size: 1rem;
    padding: 16px 30px;
  }

  .scanner-frame {
    aspect-ratio: 3/4;
  }

  .scan-area {
    width: 85%;
  }

  .corner {
    width: 25px;
    height: 25px;
    border-width: 2.5px;
  }

  .status-message {
    font-size: 14px;
    padding: 12px 15px;
    min-height: 45px;
  }

  .manual-input-section {
    padding: 20px;
  }

  .manual-title {
    font-size: 1rem;
  }

  .input-group {
    flex-direction: column;
  }

  .barcode-input {
    padding: 14px 18px;
    font-size: 15px;
  }

  .btn-search {
    width: 100%;
    padding: 14px 20px;
  }

  .divider {
    margin: 20px 0;
  }

  .result-container {
    padding: 20px;
  }

  .result-header h2 {
    font-size: 1.3rem;
  }

  .product-field {
    padding: 12px;
    font-size: 14px;
  }

  .product-field strong {
    font-size: 14px;
  }

  .bottom-nav {
    padding: 10px 15px 15px;
    gap: 30px;
  }

  .nav-item {
    padding: 6px 20px;
    font-size: 11px;
  }

  .nav-item svg {
    width: 22px;
    height: 22px;
  }

  .success-modal {
    min-width: 280px;
    max-width: 90%;
    width: auto;
    padding: 30px 25px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .success-icon {
    width: 70px;
    height: 70px;
  }

  .success-icon svg {
    width: 35px;
    height: 35px;
  }

  .modal-title {
    font-size: 1.3rem;
  }

  .modal-barcode {
    font-size: 1rem;
  }

  .modal-button {
    padding: 13px;
    font-size: 0.95rem;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 1.3rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .feature-card {
    padding: 18px;
  }

  .cta-button {
    font-size: 0.95rem;
    padding: 14px 25px;
  }

  .bottom-nav {
    gap: 20px;
  }

  .nav-item {
    padding: 6px 15px;
  }
}

/* Manual Input Section */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 30px 0;
  color: var(--text-secondary);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--light-gray);
}

.divider span {
  padding: 0 15px;
  font-weight: 500;
  font-size: 0.9rem;
}

.manual-input-section {
  background: var(--dark-card);
  border-radius: 20px;
  padding: 25px;
  border: 1px solid var(--light-gray);
  animation: slideIn 0.6s ease 0.2s both;
}

.manual-title {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center;
}

.input-group {
  display: flex;
  gap: 10px;
}

.barcode-input {
  flex: 1;
  padding: 16px 20px;
  background: var(--dark-elevated);
  border: 2px solid var(--light-gray);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
  outline: none;
}

.barcode-input::placeholder {
  color: var(--text-secondary);
}

.barcode-input:focus {
  border-color: var(--white);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.btn-search {
  padding: 16px 30px;
  background: var(--dark-elevated);
  color: var(--white);
  border: 2px solid var(--white);
  flex-shrink: 0;
}

.btn-search:hover:not(:disabled) {
  background: var(--white);
  color: var(--dark);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Success Modal */
.success-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--dark-card);
  border: 2px solid var(--white);
  border-radius: 20px;
  padding: 40px;
  z-index: 1000;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
  text-align: center;
  min-width: 300px;
  animation: modalPop 0.5s ease forwards;
}

@keyframes modalPop {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.success-modal.hide {
  animation: modalPopOut 0.3s ease forwards;
}

@keyframes modalPopOut {
  to {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.modal-overlay.hide {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--white), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: checkPop 0.6s ease 0.3s both;
}

@keyframes checkPop {
  0% {
    transform: scale(0) rotate(0deg);
  }
  50% {
    transform: scale(1.2) rotate(180deg);
  }
  100% {
    transform: scale(1) rotate(360deg);
  }
}

.success-icon svg {
  width: 40px;
  height: 40px;
  color: var(--dark);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.modal-barcode {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-family: "Courier New", monospace;
}

.modal-button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--white), var(--primary-dark));
  color: var(--dark);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
}

.modal-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

/* AI Features Section */
.ai-features-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid var(--light-gray);
}

.ai-section-title {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center;
}

.ai-button {
  width: 100%;
  padding: 14px 20px;
  margin-bottom: 10px;
  background: var(--dark-elevated);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
}

.ai-button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ai-button:hover {
  background: var(--light-gray);
  border-color: var(--white);
  transform: translateX(5px);
}

/* AI Modal */
.ai-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--dark-card);
  border: 2px solid var(--light-gray);
  border-radius: 20px;
  padding: 0;
  z-index: 1001;
  max-width: 90%;
  max-height: 80vh;
  width: 500px;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.ai-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--light-gray);
}

.ai-modal-header h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
}

.close-modal-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--light-gray);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-modal-btn:hover {
  background: var(--white);
  color: var(--dark);
  transform: rotate(90deg);
}

.ai-modal-content {
  padding: 20px;
  max-height: calc(80vh - 80px);
  overflow-y: auto;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ai-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
}

/* AI Loader */
.ai-loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--dark-card);
  border: 2px solid var(--white);
  border-radius: 20px;
  padding: 40px;
  z-index: 1002;
  text-align: center;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--light-gray);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ai-loader p {
  color: var(--text-primary);
  font-weight: 500;
}

/* Mood Selector */
.mood-selector h3,
.diet-selector h3,
.pantry-form h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  text-align: center;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mood-button {
  padding: 15px;
  background: var(--dark-elevated);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
}

.mood-button:hover {
  background: var(--white);
  color: var(--dark);
  transform: scale(1.05);
}

/* Diet Selector */
.diet-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.diet-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--dark-elevated);
  border: 1px solid var(--light-gray);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.diet-checkbox:hover {
  background: var(--light-gray);
}

.diet-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.diet-checkbox span {
  color: var(--text-primary);
  font-weight: 500;
}

/* AI Results */
.json-result {
  background: var(--dark-elevated);
  padding: 15px;
  border-radius: 10px;
  overflow-x: auto;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.6;
}

.ai-text-result {
  color: var(--text-secondary);
  line-height: 1.8;
}

.ai-text-result h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin: 20px 0 10px;
}

.ai-text-result p {
  margin-bottom: 15px;
}

.ai-text-result strong {
  color: var(--white);
}

.ai-text-result .list-item {
  margin-left: 20px;
  margin-bottom: 10px;
}

/* Alternatives List */
.alternatives-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.alternative-card {
  background: var(--dark-elevated);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.alternative-card:hover {
  border-color: var(--white);
  transform: translateX(5px);
}

.alternative-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.alternative-number {
  width: 32px;
  height: 32px;
  background: var(--white);
  color: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.alternative-header h4 {
  color: var(--text-primary);
  font-size: 1.05rem;
  margin: 0;
  flex: 1;
}

.alternative-reason {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.similarity-bar {
  margin: 12px 0;
}

.similarity-bar > span {
  color: var(--text-secondary);
  font-size: 13px;
  display: block;
  margin-bottom: 6px;
}

.bar-container {
  position: relative;
  width: 100%;
  height: 24px;
  background: var(--light-gray);
  border-radius: 12px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--white), var(--primary-dark));
  transition: width 0.5s ease;
}

.bar-label {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 12px;
}

.price-range {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 8px;
}

/* Eco Score Card */
.eco-score-card {
  background: var(--dark-elevated);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}

.eco-overall-top {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--light-gray);
}

.score-circle-large {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.score-circle-large.good {
  background: linear-gradient(135deg, #10b981, #059669);
}

.score-circle-large.medium {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.score-circle-large.poor {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.score-number {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.score-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.score-text {
  flex: 1;
}

.score-text h4 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.score-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.eco-metrics {
  padding: 20px;
}

.eco-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--dark-card);
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--light-gray);
  transition: all 0.3s ease;
}

.eco-item:hover {
  border-color: var(--white);
  transform: translateX(5px);
}

.eco-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.eco-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.eco-label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.eco-value {
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.eco-value.low {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid #10b981;
}

.eco-value.medium {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid #fbbf24;
}

.eco-value.high {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.mini-bar-container {
  position: relative;
  width: 100px;
  height: 20px;
  background: var(--light-gray);
  border-radius: 10px;
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.5s ease;
}

.mini-bar-label {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 11px;
}

.eco-explanation {
  margin: 20px;
  padding: 18px;
  background: var(--dark-card);
  border-radius: 10px;
  border-left: 4px solid var(--white);
}

.eco-explanation h5 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.eco-explanation p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.eco-tips {
  margin: 20px;
  padding: 18px;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.1),
    rgba(16, 185, 129, 0.05)
  );
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.eco-tips h5 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.eco-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.eco-tips li {
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
}

.eco-tips li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 700;
}

/* Diet Results */
.diet-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diet-summary {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--light-gray);
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.stat-item.compatible {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-item.maybe {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.stat-item.not-compatible {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.stat-item.compatible .stat-icon {
  background: #10b981;
  color: white;
}

.stat-item.maybe .stat-icon {
  background: #fbbf24;
  color: var(--dark);
}

.stat-item.not-compatible .stat-icon {
  background: #ef4444;
  color: white;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.diet-cards-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.diet-result-card {
  background: var(--dark-elevated);
  border: 2px solid var(--light-gray);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.diet-result-card:hover {
  transform: translateX(5px);
}

.diet-result-card.compatible {
  border-color: #10b981;
}

.diet-result-card.not-compatible {
  border-color: #ef4444;
}

.diet-result-card.maybe {
  border-color: #fbbf24;
}

.diet-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--light-gray);
  flex-wrap: wrap;
  gap: 15px;
}

.diet-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.diet-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.diet-result-card.compatible .diet-icon {
  background: #10b981;
  color: white;
}

.diet-result-card.not-compatible .diet-icon {
  background: #ef4444;
  color: white;
}

.diet-result-card.maybe .diet-icon {
  background: #fbbf24;
  color: var(--dark);
}

.diet-result-header h4 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin: 0;
}

.diet-header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.compatibility-badge {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.diet-result-card.compatible .compatibility-badge {
  background: #10b981;
  color: white;
}

.diet-result-card.not-compatible .compatibility-badge {
  background: #ef4444;
  color: white;
}

.diet-result-card.maybe .compatibility-badge {
  background: #fbbf24;
  color: var(--dark);
}

.confidence-indicator {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 100px;
}

.confidence-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.confidence-bar {
  height: 6px;
  background: var(--light-gray);
  border-radius: 3px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--white), var(--primary-dark));
  transition: width 0.5s ease;
}

.confidence-value {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
}

.diet-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.diet-section {
  display: flex;
  gap: 12px;
  padding: 15px;
  background: var(--dark-card);
  border-radius: 10px;
  border: 1px solid var(--light-gray);
}

.diet-section.concerns {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.3);
}

.diet-section.alternatives {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.3);
}

.section-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.section-content {
  flex: 1;
}

.section-content h5 {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.section-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .summary-stats {
    grid-template-columns: 1fr;
  }

  .diet-result-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .diet-header-right {
    width: 100%;
    justify-content: space-between;
  }

  .confidence-indicator {
    min-width: 80px;
  }
}

.error-message {
  color: var(--danger);
  text-align: center;
  font-weight: 500;
}

/* Success Toast */
.success-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--white);
  color: var(--dark);
  padding: 15px 30px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
}

.success-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mood Recommendations */
.mood-recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mood-card {
  background: var(--dark-elevated);
  border: 1px solid var(--light-gray);
  border-radius: 14px;
  padding: 20px;
  transition: all 0.3s ease;
}

.mood-card:hover {
  border-color: var(--white);
  transform: translateX(5px);
}

.mood-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.mood-number {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--white), var(--primary-dark));
  color: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.mood-card-header h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin: 0;
  flex: 1;
  min-width: 120px;
}

.energy-badge {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.energy-badge.boost {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid #fbbf24;
}

.energy-badge.calm {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border: 1px solid #a78bfa;
}

.energy-badge.sustain {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid #10b981;
}

.mood-reason {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.nutrients-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nutrient-label {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nutrient-tag {
  padding: 6px 12px;
  background: var(--dark-card);
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nutrient-tag:hover {
  border-color: var(--white);
  transform: translateY(-2px);
}

/* Upload Area */
.upload-area {
  background: var(--dark-card);
  border: 3px dashed var(--light-gray);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--white);
  background: var(--dark-elevated);
  transform: scale(1.02);
}

.upload-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.upload-area:hover .upload-icon,
.upload-area.drag-over .upload-icon {
  background: linear-gradient(135deg, var(--white), var(--primary-dark));
  transform: scale(1.1);
}

.upload-icon svg {
  width: 40px;
  height: 40px;
  color: var(--white);
  transition: color 0.3s ease;
}

.upload-area:hover .upload-icon svg,
.upload-area.drag-over .upload-icon svg {
  color: var(--dark);
}

.upload-title {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.upload-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.photo-requirements {
  background: var(--dark-elevated);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  text-align: left;
}

.photo-requirements h4 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.photo-requirements ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.photo-requirements li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  padding-left: 25px;
  position: relative;
}

.photo-requirements li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--white);
  font-weight: 700;
}

.upload-area .btn-primary {
  margin: 0 auto;
  max-width: 250px;
}

/* Image Preview */
.image-preview {
  position: relative;
  background: var(--dark-card);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 2px solid var(--white);
  animation: slideIn 0.4s ease;
  box-shadow: var(--shadow);
}

.image-preview img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: contain;
  background: var(--dark-elevated);
}

.preview-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 10px;
}

.btn-remove {
  width: 44px;
  height: 44px;
  background: var(--danger);
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.btn-remove:hover {
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
}

.btn-remove:active {
  transform: scale(1.05) rotate(90deg);
}

.btn-remove svg {
  width: 22px;
  height: 22px;
  color: var(--white);
}

/* Utility */
.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .upload-area {
    padding: 40px 30px;
  }

  .upload-icon {
    width: 70px;
    height: 70px;
  }

  .upload-icon svg {
    width: 35px;
    height: 35px;
  }

  .upload-title {
    font-size: 1.1rem;
  }

  .upload-subtitle {
    font-size: 0.9rem;
  }

  .image-preview img {
    max-height: 300px;
  }
}

@media (max-width: 400px) {
  .upload-area {
    padding: 30px 20px;
  }

  .upload-icon {
    width: 60px;
    height: 60px;
  }

  .upload-icon svg {
    width: 30px;
    height: 30px;
  }

  .upload-title {
    font-size: 1rem;
  }
}

/* Authentication Styles */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal.hidden {
  display: none;
}

.auth-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
}

.auth-modal-content {
  position: relative;
  background: var(--dark-card);
  border: 2px solid var(--light-gray);
  border-radius: 20px;
  padding: 40px;
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

.auth-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--light-gray);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.auth-close-btn:hover {
  background: var(--white);
  transform: rotate(90deg);
}

.auth-close-btn svg {
  width: 18px;
  height: 18px;
  color: var(--text-primary);
}

.auth-form h2,
.auth-modal-content h2 {
  color: var(--white);
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.auth-subtitle {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--dark-elevated);
  border: 2px solid var(--light-gray);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--white);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-group small {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 5px;
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: #ef4444;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.auth-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid #10b981;
  color: #10b981;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.auth-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--white), var(--primary-dark));
  color: var(--dark);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.oauth-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 2px solid var(--light-gray);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--white);
  margin-bottom: 16px;
}

.oauth-btn:hover {
  transform: translateY(-2px);
  border-color: var(--white);
}

.discord-btn {
  background: #5865F2;
  border-color: #5865F2;
}

.discord-btn:hover {
  background: #4752C4;
  border-color: #4752C4;
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.discord-btn svg {
  width: 24px;
  height: 24px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--text-secondary);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--light-gray);
}

.auth-divider span {
  padding: 0 12px;
  font-size: 0.9rem;
}

.auth-switch {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 20px;
}

.auth-switch a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--dark-elevated);
  border: 2px solid var(--light-gray);
  border-radius: 50px;
  color: var(--text-primary);
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-menu-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.profile-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.profile-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--white);
}

.dropdown-arrow {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  transition: transform 0.3s ease;
}

.user-menu-btn:hover .dropdown-arrow {
  transform: translateY(2px);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--dark-card);
  border: 1px solid var(--light-gray);
  border-radius: 16px;
  min-width: 260px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  z-index: 1000;
  animation: dropdownSlide 0.3s ease;
}

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

.user-dropdown-header {
  padding: 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-icon-large {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.profile-icon-large svg {
  width: 32px;
  height: 32px;
  stroke: var(--white);
}

.user-email-display {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  word-break: break-all;
}

.dropdown-divider {
  height: 1px;
  background: var(--light-gray);
  margin: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.dropdown-item:hover {
  background: rgba(139, 92, 246, 0.1);
  padding-left: 24px;
}

.dropdown-item.logout {
  color: #ef4444;
}

.dropdown-item.logout:hover {
  background: rgba(239, 68, 68, 0.1);
}

.dropdown-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Mobile user menu positioning */
@media (max-width: 768px) {
  .user-dropdown {
    position: fixed !important;
    bottom: 80px !important;
    right: 20px !important;
    left: 20px !important;
    top: auto !important;
    max-width: calc(100% - 40px) !important;
  }
  
  .user-dropdown-header {
    padding: 16px;
  }
  
  .profile-icon-large {
    width: 50px;
    height: 50px;
  }
}

/* Sign-in Prompt Popup */
.signin-prompt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.signin-prompt-overlay.show {
  opacity: 1;
}

.signin-prompt {
  position: relative;
  background: var(--dark-card);
  border: 2px solid var(--light-gray);
  border-radius: 24px;
  padding: 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  animation: popupSlide 0.4s ease;
}

@keyframes popupSlide {
  from {
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.signin-prompt-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--light-gray);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.signin-prompt-close:hover {
  background: var(--white);
  transform: rotate(90deg);
}

.signin-prompt-close svg {
  width: 18px;
  height: 18px;
  color: var(--text-primary);
}

.signin-prompt-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.signin-prompt-icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--white);
}

.signin-prompt h3 {
  color: var(--white);
  font-size: 1.8rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.signin-prompt p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.signin-prompt-benefits {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  text-align: left;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 12px;
}

.benefit-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  flex-shrink: 0;
}

.benefit-item span {
  color: var(--white);
  font-size: 0.95rem;
}

.signin-prompt-btn {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 12px;
  color: var(--white);
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

.signin-prompt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.signin-prompt-later {
  width: 100%;
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.signin-prompt-later:hover {
  color: var(--white);
}

/* History Modal */
.history-modal {
  max-width: 600px;
}

.history-content {
  margin-top: 20px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: var(--dark-elevated);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.history-item:hover {
  border-color: var(--white);
}

.history-info h4 {
  color: var(--white);
  margin-bottom: 5px;
  font-weight: 600;
}

.history-info p {
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 3px;
  opacity: 0.9;
}

.history-info small {
  color: var(--white);
  font-size: 0.8rem;
  opacity: 0.7;
}

.delete-btn {
  padding: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.delete-btn:hover {
  background: #ef4444;
}

.delete-btn svg {
  width: 18px;
  height: 18px;
  color: #ef4444;
}

.delete-btn:hover svg {
  color: white;
}

.no-history {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 20px;
}

.loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 20px;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--white);
  color: var(--dark);
  padding: 15px 30px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Auth Button in Nav */
.auth-nav-btn {
  padding: 10px 24px;
  background: var(--dark-elevated);
  color: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.auth-nav-btn:hover {
  border-color: var(--white);
  background: var(--light-gray);
}
