:root {
    --primary: #2563eb;
    --secondary: #1e40af;
    --light: #f8fafc;
    --dark: #0f172a;
    --gray: #64748b;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f1f5f9;
    color: var(--dark);
    line-height: 1.6;
}

nav {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: white;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    transition: all 0.3s ease;
    border-radius: 5px;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ff4d4d;
    cursor: pointer;
}

.logo-box {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    animation: swing 2.5s infinite ease-in-out;
    transition: all 0.3s ease;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: auto;
}

.brand-logo {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
}

.brand-subtext {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 2px;
    line-height: 1;
}

.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/static/assets/background.jpg') no-repeat center center;
    background-size: cover;
    position: relative;
    color: white;
    text-align: center;
    padding: 0 1rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.hero-content p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.cta-buttons {
    margin-top: 1cm;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons button {
    background-color: var(--primary);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    margin: 0.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
    transform: scale(1);
}

.cta-buttons button:hover {
    transform: translateY(-3px);
    background-color: var(--secondary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

section {
    padding: 5rem 10%;
    min-height: 100vh;
}

.hidden {
    display: none;
}

#upload, #insights, #contact {
    width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    position: relative;
}

#upload {
    background-image: url('/static/assets/Background1.jpg');
}

#insights {
    background-image: url('/static/assets/background2.jpg');
}

#contact {
    background-image: url('/static/assets/background3.jpg');
}

#upload::before, #insights::before, #contact::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

#upload > *, #insights > *, #contact > * {
    position: relative;
    z-index: 1;
}

.upload-container {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.upload-card {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    flex: 1;
    text-align: center;
    transition: transform 0.2s ease;
}

.upload-card:hover {
    transform: scale(1.02);
}

.upload-warning {
    background-color: #d32f2f;
    color: white;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 6px;
    animation: shake-horizontal 1.5s ease-in-out infinite;
    text-align: center;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

#processBtn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

#processBtn:hover {
    background-color: var(--secondary);
}

.wide-card {
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background-color: #f8fafc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.insights-summary {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

#recommendations {
    background: #f9fafb;
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    font-size: 15px;
    color: #1e293b;
    margin-top: 1rem;
    line-height: 1.5;
}

.chart-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 3rem 0;
}

.chart-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.chart-summary {
    margin-top: 1rem;
    font-size: 14px;
    color: #334155;
}

#contactForm {
    max-width: 600px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

#contactForm input,
#contactForm textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#contactForm textarea {
    height: 150px;
    resize: vertical;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--dark);
    color: white;
}

.sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(26, 26, 26, 0.9);
  color: #ffffff;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-family: 'Roboto', sans-serif;
  z-index: 9999;
  backdrop-filter: blur(8px);
  transition: opacity 0.4s ease-in-out;
  opacity: 1;
}

.sticky-footer.hidden {
  opacity: 0;
  pointer-events: none;
}


.info-footer {
    display: flex;
    justify-content: center;
    gap: 3rem;
    background: #3D3D3D;
    color: #ff4c4c;
    padding: 1.5rem 0 3rem 0;
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.info-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    font-size: 1rem;
    color: white;
}

.label {
    font-weight: bold;
    color: #ff4d4d;
    margin-right: 0.4rem;
}

#chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    font-family: 'Roboto', sans-serif;
}

#openChatBtn {
    background-color: #1d4ed8;
    color: white;
    padding: 10px 14px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#chatContainer {
    width: 300px;
    height: 400px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 10px;
    margin-top: 10px;
}

#chatMessages {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    font-size: 14px;
}

#chatInput {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 5px;
    width: calc(100% - 10px);
}

#sendChatBtn {
    background-color: #2563eb;
    color: white;
    padding: 6px 10px;
    margin-top: 6px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

@keyframes shake-horizontal {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

@keyframes swing {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(1.5deg); }
    100% { transform: rotate(0deg); }
}

@media (max-width: 768px) {
    .upload-container {
        flex-direction: column;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    section {
        padding: 3rem 5%;
    }
}

.instructions-box {
    background: rgba(15, 15, 15, 0.5);
    color: #ffffff;
    padding: 1.2rem 1.8rem;
    margin-top: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
    animation: pulseBox 2.5s ease-in-out infinite;
}

/* 🫧 Pulse animation */
@keyframes pulseBox {
    0% { transform: scale(1); }
    50% { transform: scale(1.015); }
    100% { transform: scale(1); }
}

/* 📱 Responsive tweak */
@media (max-width: 768px) {
  .instructions-box {
    padding: 1rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 10px;
    margin-top: 1.5rem;
  }

  .instructions-box h2 {
    font-size: 1rem;
    text-align: center;
  }
}


.instructions-box h2 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: #f8fafc;
}

@media (max-width: 768px) {
  .instructions-box {
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    text-align: left;
  }

  .instructions-box h2 {
    font-size: 1.1rem;
    text-align: center;
  }
}

.admin-access-button-box {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.admin-portal-btn {
  padding: 1rem 2rem;
  border-radius: 30px;
  background: rgba(255, 0, 0, 0.2); /* Red glass effect */
  color: white;
  font-weight: bold;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.3s ease;
  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
  border: 1px solid rgba(255, 0, 0, 0.4);
}

.admin-portal-btn:hover {
  transform: scale(1.05);
  background: rgba(255, 0, 0, 0.3);
}

@media (max-width: 768px) {
  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
  }

  .logo-box {
    flex: 1 1 auto;
    margin: 0;
    align-items: flex-start;
  }

  nav ul {
    flex: 1 1 100%;
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
    padding: 0.5rem 0;
    margin: 0;
    gap: 0.5rem;
  }

  nav ul::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }

  nav ul li {
    flex: 0 0 auto;
    margin: 0 0.5rem;
  }

  .brand-logo {
    font-size: 1rem;
  }

  .brand-subtext {
    font-size: 0.7rem;
  }

  .hero-content h1 {
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  }

  .hero-content p {
    color: #ffffff;
    text-shadow: 1.5px 1.5px 6px rgba(0, 0, 0, 0.7);
  }

  /* ✅ Fix: Prevent content overlap with fixed nav & footer */
  body {
    padding-top: 80px;     /* Space for fixed navbar */
    padding-bottom: 60px;  /* Space for sticky footer */
    background-color: transparent; /* Keep translucent effect */
  }

  main,
  section.hero,
  section#upload,
  section#insights,
  section#contact {
    margin-top: 0;
  }

  .hero {
    padding-top: 40px; /* Extra spacing inside hero */
  }
}

/* Sticky footer improvements */
.sticky-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: rgba(0,0,0,0.7);
  color: white;
  text-align: center;
  padding: 8px 0;
  z-index: 999;
  font-size: 0.85rem;
}



