/* Global Styles */
:root {
    --primary-color: #8a2be2;
    --secondary-color: #4b0082;
    --accent-color: #9370db;
    --dark-bg: #0a0a0a;
    --darker-bg: #000000;
    --card-bg: #1a1a1a;
    --text-light: #ffffff;
    --text-gray: #b0b0b0;
    --border-radius: 16px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(135deg, #6a11cb, #2575fc);
}

/* Futuristic Pre-Loader Screen */
#pre-loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#pre-loader-screen.fade-out-whoosh {
    opacity: 0;
}

#pre-loader-screen .loader-content {
    text-align: center;
    max-width: 80%;
}

.loader-text {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.console-scroll {
    margin-top: 30px;
    padding: 15px;
    background: rgba(30, 30, 30, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#console-message {
    color: var(--text-gray);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    margin: 0;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.whoosh-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    opacity: 0;
    z-index: 9998;
    pointer-events: none;
}

.whoosh-flash.animate {
    animation: whooshFlash 0.8s ease-out;
}

@keyframes whooshFlash {
    0% {
        opacity: 0;
        transform: scaleY(0);
    }
    50% {
        opacity: 0.8;
        transform: scaleY(1);
    }
    100% {
        opacity: 0;
        transform: scaleY(1);
    }
}

/* Layered fade-in for main content */
.main-content.fade-in-layered > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.main-content.fade-in-layered > *:nth-child(1) { transition-delay: 0.5s; }
.main-content.fade-in-layered > *:nth-child(2) { transition-delay: 0.7s; }
.main-content.fade-in-layered > *:nth-child(3) { transition-delay: 0.9s; }
.main-content.fade-in-layered > *:nth-child(4) { transition-delay: 1.1s; }
.main-content.fade-in-layered > *:nth-child(5) { transition-delay: 1.3s; }

.main-content.fade-in-layered.show > * {
    opacity: 1;
    transform: translateY(0);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    background-image: radial-gradient(circle at 10% 20%, rgba(138, 43, 226, 0.05) 0%, transparent 20%), radial-gradient(circle at 90% 80%, rgba(138, 43, 226, 0.05) 0%, transparent 20%);
}

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 clamp(15px, 2vw, 30px);
}

.container-fluid {
    width: 100%;
    margin: 0 auto;
}

.container-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 clamp(15px, 2vw, 30px);
}

/* Header / Navbar */
.navbar {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h2 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    /* Color handled by gradient above */
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border-radius: 30px;
}

.nav-menu a:hover {
    color: var(--primary-color);
    background: rgba(138, 43, 226, 0.1);
}

.btn-login {
    background: var(--gradient-primary);
    padding: 10px 25px;
    border-radius: 30px;
    transition: var(--transition);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(138, 43, 226, 0.5);
}

/* Main Content */
.main-content {
    padding: clamp(20px, 3vw, 30px) 0 clamp(40px, 5vw, 60px);
    animation: fadeInUp 0.8s ease-out;
}

.panels-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: clamp(20px, 3vw, 30px);
    margin-bottom: clamp(40px, 5vw, 80px);
    align-items: start;
}

.panel {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: clamp(25px, 3vw, 35px);
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(138, 43, 226, 0.15);
    align-self: start;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.panel:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    border-color: rgba(138, 43, 226, 0.3);
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.panel:hover::before {
    transform: scaleX(1);
}

/* Left Panel */
.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.image-preview {
    width: 100%;
    height: clamp(200px, 30vh, 300px);
    border: 2px dashed rgba(138, 43, 226, 0.3);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    background: rgba(26, 26, 26, 0.7);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.image-preview:hover {
    border-color: var(--primary-color);
    background: rgba(138, 43, 226, 0.1);
    transform: scale(1.02);
}

.image-preview.drag-over {
    border-color: var(--primary-color);
    background: rgba(138, 43, 226, 0.2);
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.image-preview i {
    font-size: 4rem;
    color: var(--accent-color);
}

.image-preview p {
    font-size: 1.2rem;
    font-weight: 500;
}

.image-preview span {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.btn {
    padding: clamp(12px, 2vw, 15px) clamp(25px, 3vw, 35px);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    font-size: clamp(1rem, 2vw, 1.1rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    min-height: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(138, 43, 226, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.btn-secondary:hover {
    background: rgba(138, 43, 226, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(138, 43, 226, 0.3);
    filter: brightness(1.1);
}

.social-share {
    text-align: center;
    margin-top: 10px;
}

.social-share p {
    margin-bottom: 15px;
    color: var(--text-gray);
}

.share-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    transition: var(--transition);
}

.share-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Right Panel */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-header h2 {
    font-size: 1.8rem;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-copy:hover {
    background: var(--primary-color);
}

.result-content {
    background: rgba(26, 26, 26, 0.7);
    border-radius: var(--border-radius);
    padding: clamp(25px, 3vw, 35px);
    min-height: 300px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(138, 43, 226, 0.2);
    overflow-y: auto;
    max-height: 70vh;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.result-content h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.result-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.result-content h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.result-content ul, 
.result-content ol {
    padding-left: 1.5rem;
    margin: 0.8rem 0;
}

.result-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.result-content p {
    margin: 0.8rem 0;
    line-height: 1.6;
    color: #e0e0e0;
}

.result-content br {
    margin: 0.5rem 0;
}

.detected-dish {
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    margin: 15px 0;
    padding: 15px;
    background: rgba(138, 43, 226, 0.1);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.possible-dishes {
    border-left: 4px solid #4CAF50;
    padding-left: 15px;
    margin: 15px 0;
    padding: 15px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.nutritional-information {
    border-left: 4px solid #FF9800;
    padding-left: 15px;
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Scrollbar styling */
.result-content::-webkit-scrollbar {
    width: 8px;
}

.result-content::-webkit-scrollbar-track {
    background: rgba(30, 30, 30, 0.3);
    border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb:hover {
    background: #bb86fc;
}

/* Placeholder text */
.placeholder-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 300px;
    padding: 20px;
}

.placeholder-text p {
    margin: 10px 0;
}

/* Bouncing Balls Loader */
.bouncing-loader {
  width: 200px;
  height: 60px;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.bouncing-loader .circle {
  width: 20px;
  height: 20px;
  position: absolute;
  border-radius: 50%;
  background-color: #8a2be2;
  left: 15%;
  transform-origin: 50%;
  animation: circle7124 .5s alternate infinite ease;
}

@keyframes circle7124 {
  0% {
    top: 60px;
    height: 5px;
    border-radius: 50px 50px 25px 25px;
    transform: scaleX(1.7);
  }

  40% {
    height: 20px;
    border-radius: 50%;
    transform: scaleX(1);
  }

  100% {
    top: 0%;
  }
}

.bouncing-loader .circle:nth-child(2) {
  left: 45%;
  animation-delay: .2s;
}

.bouncing-loader .circle:nth-child(3) {
  left: auto;
  right: 15%;
  animation-delay: .3s;
}

.bouncing-loader .shadow {
  width: 20px;
  height: 4px;
  border-radius: 50%;
  background-color: rgba(0,0,0,0.5);
  position: absolute;
  top: 62px;
  transform-origin: 50%;
  z-index: -1;
  left: 15%;
  filter: blur(1px);
  animation: shadow046 .5s alternate infinite ease;
}

@keyframes shadow046 {
  0% {
    transform: scaleX(1.5);
  }

  40% {
    transform: scaleX(1);
    opacity: .7;
  }

  100% {
    transform: scaleX(.2);
    opacity: .4;
  }
}

.bouncing-loader .shadow:nth-child(4) {
  left: 45%;
  animation-delay: .2s;
}

.bouncing-loader .shadow:nth-child(5) {
  left: auto;
  right: 15%;
  animation-delay: .3s;
}

.loading-text {
  text-align: center;
  margin-top: 20px;
  color: var(--text-gray);
  font-size: 1rem;
}

/* Notification Styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    width: 320px;
}

.notification {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #4CAF50;
}

.notification.error {
    border-left-color: #f44336;
}

.notification.info {
    border-left-color: #2196F3;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.notification-title {
    font-weight: 600;
    color: white;
    font-size: 1.1rem;
}

.notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: white;
}

.notification-message {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .notification-container {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
    
    .result-content {
        max-height: 60vh;
    }
}

/* Sections */
.section {
    margin-bottom: clamp(40px, 5vw, 80px);
}

.section h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-align: center;
    margin-bottom: clamp(25px, 3vw, 45px);
    position: relative;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 20px auto;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(138, 43, 226, 0.5);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(20px, 3vw, 30px);
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: clamp(25px, 3vw, 35px);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(138, 43, 226, 0.15);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border-color: rgba(138, 43, 226, 0.4);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.card p {
    color: var(--text-gray);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 35px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(138, 43, 226, 0.15);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(138, 43, 226, 0.3);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(138, 43, 226, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-gray);
}

/* Steps Container */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    display: flex;
    gap: 20px;
}

.step-number {
    min-width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
    transition: all 0.3s ease;
}

.step-number:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(138, 43, 226, 0.6);
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.step-content p {
    color: var(--text-gray);
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.benefit-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 35px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(138, 43, 226, 0.15);
    position: relative;
    overflow: hidden;
}

.benefit-card:hover {
    transform: translateY(-8px);
    border-color: rgba(138, 43, 226, 0.3);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.benefit-card:hover::before {
    transform: scaleX(1);
}

.benefit-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.benefit-card p {
    color: var(--text-gray);
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(138, 43, 226, 0.15);
    transition: all 0.3s ease;
}

.faq-question {
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(26, 26, 26, 0.7);
}

.faq-question:hover {
    background: rgba(138, 43, 226, 0.2);
}

.faq-question h3 {
    font-size: 1.2rem;
    font-weight: 500;
}

.faq-question i {
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.faq-item.active .faq-answer {
    padding: 0 30px 30px;
    max-height: 1000px;
}

.faq-answer p {
    color: var(--text-gray);
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Tags Container */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.tag {
    background: rgba(138, 43, 226, 0.1);
    color: var(--text-light);
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(138, 43, 226, 0.3);
    font-size: 1rem;
    font-weight: 500;
}

.tag:hover {
    background: var(--gradient-primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
    border-color: var(--primary-color);
}

/* Explore Tools */
.explore-content {
    background: linear-gradient(135deg, var(--card-bg), var(--darker-bg));
    border-radius: var(--border-radius);
    padding: 60px;
    text-align: center;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(138, 43, 226, 0.2);
    position: relative;
    overflow: hidden;
}

.explore-content p {
    font-size: 1.3rem;
    margin-bottom: 35px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-gray);
}

.explore-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.explore-content:hover::before {
    transform: scaleX(1);
}

/* Footer */
.footer {
    background: var(--darker-bg);
    padding: clamp(50px, 5vw, 70px) 0 clamp(30px, 3vw, 40px);
    border-top: 1px solid rgba(138, 43, 226, 0.2);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(30px, 3vw, 50px);
    margin-bottom: clamp(30px, 3vw, 50px);
}

.footer-column h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
    color: var(--primary-color);
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column li {
    margin-bottom: 15px;
}

.footer-column a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-column a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-column a:hover::before {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(138, 43, 226, 0.2);
    color: var(--text-gray);
    font-size: 0.9rem;
    padding-bottom: 20px;
}

.footer-bottom i {
    color: #ff6b6b;
}

/* Fade-in Animation */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 0;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: modalopen 0.4s;
}

@keyframes modalopen {
    from {opacity: 0; transform: translate(-50%, -50%) scale(0.8);}
    to {opacity: 1; transform: translate(-50%, -50%) scale(1);}
}

/* QR Code Info Modal */
#qrInfoModal .modal-content {
    max-width: 600px;
}

.feature-info {
    padding: 30px;
}

.feature-item {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    border-radius: var(--border-radius);
    background: rgba(138, 43, 226, 0.05);
    border: 1px solid rgba(138, 43, 226, 0.1);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-item h3 {
    color: var(--text-light);
    margin-bottom: 10px;
}

.feature-item p {
    color: var(--text-gray);
    line-height: 1.6;
}

.note {
    text-align: center;
    padding: 15px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: var(--border-radius);
    margin-top: 20px;
}

.note i {
    color: #2ecc71;
    margin-right: 8px;
}

.close {
    color: var(--text-gray);
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1002;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.close:hover,
.close:focus {
    color: var(--primary-color);
    background: rgba(138, 43, 226, 0.2);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    background: rgba(138, 43, 226, 0.1);
}

.tab-btn:hover {
    background: rgba(138, 43, 226, 0.05);
}

.auth-forms {
    padding: 30px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-light);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: clamp(10px, 2vw, 12px) clamp(12px, 2vw, 15px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(30, 30, 30, 0.5);
    color: var(--text-light);
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: var(--transition);
    min-height: 44px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.2);
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.form-message.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    display: block;
}

.form-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    display: block;
}

/* User Dropdown Menu */
#userMenu {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 160px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    z-index: 1000;
    right: 0;
    top: 100%;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-10px);}
    to {opacity: 1; transform: translateY(0);}
}

.dropdown-content a {
    color: var(--text-light);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(138, 43, 226, 0.1);
}

#userMenu.active .dropdown-content {
    display: block;
}

/* Result Items */
.result-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.result-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.food-name {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.confidence {
    color: var(--text-gray);
    font-style: italic;
}

.ingredients-list {
    list-style-type: none;
    padding-left: 0;
}

.ingredients-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ingredients-list li:before {
    content: "•";
    color: var(--primary-color);
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.ingredients-list li:last-child {
    border-bottom: none;
}

.instructions-list {
    padding-left: 20px;
}

.instructions-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.instructions-list li:last-child {
    border-bottom: none;
}

.nutrition-list {
    list-style-type: none;
    padding-left: 0;
}

.nutrition-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nutrition-list li:last-child {
    border-bottom: none;
}

.nutrition-list li strong {
    color: var(--accent-color);
    display: inline-block;
    min-width: 150px;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.nutrition-item {
    background: rgba(138, 43, 226, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.nutrient-name {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.nutrient-value {
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 30px;
    color: #ff6b6b;
}

/* Custom Notifications */
#notificationContainer {
    width: 320px;
}

.notification {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(138, 43, 226, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left: 4px solid #4caf50;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.notification.error {
    border-left: 4px solid #f44336;
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.notification.info {
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.notification.show::before {
    transform: scaleX(1);
}

.notification-icon {
    font-size: 1.2rem;
}

.notification.success .notification-icon {
    color: #4caf50;
}

.notification.error .notification-icon {
    color: #f44336;
}

.notification.info .notification-icon {
    color: var(--primary-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--text-light);
}

.notification-message {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.notification-close:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 992px) {
    .panels-container {
        grid-template-columns: 1fr;
        gap: clamp(15px, 3vw, 25px);
    }
    
    .main-content {
        padding: clamp(15px, 3vw, 20px) 0 clamp(20px, 3vw, 40px);
    }
    
    .section {
        margin-bottom: clamp(30px, 5vw, 60px);
    }
}

@media (max-width: 768px) {
    .nav-menu ul {
        gap: 12px;
    }
    
    .section h2 {
        font-size: clamp(1.5rem, 4vw, 1.8rem);
    }
    
    .explore-content {
        padding: clamp(20px, 5vw, 30px) clamp(15px, 3vw, 20px);
    }
    
    .card-grid,
    .features-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-content {
        padding: clamp(10px, 3vw, 15px) 0 clamp(15px, 3vw, 30px);
    }
    
    .panel {
        padding: clamp(15px, 3vw, 20px);
    }
    
    .steps-container {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}