* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  -webkit-tap-highlight-color: transparent;
  transition: var(--theme-transition);
}

html {
  scroll-behavior: smooth;
  /* scroll-padding-top: 70px; */
}

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 1.2rem;
  color: var(--text-primary);
  opacity: 0.8;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.theme-toggle:hover {
  opacity: 1;
  transform: scale(1.1);
}

.theme-toggle i {
  transition: transform 0.5s ease;
}

/* Auth Nav Button */
.auth-nav-btn {
  background: var(--gradient-primary);
  color: var(--text-primary);
  border: none;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-primary);
}

.auth-mobile-btn{
  display: none;
}

/* Mobile theme toggle button */
.mobile-theme {
  opacity: 0;
  visibility: hidden;
  position: fixed;
  top: 15px;
  right: 80px;
  z-index: 1000;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Desktop theme toggle visibility */
@media (max-width: 768px) {
  .desktop-theme {
    opacity: 0;
    visibility: hidden;
  }
  
  .mobile-theme {
    opacity: 1;
    visibility: visible;
    margin-right: -30px;

  }
  .mobile-theme.hidden {
  opacity: 0;
  visibility: hidden;
}
}

body {
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
  background: var(--bg-dark);
  min-width: 340px;
}

.round-nav {
  position: fixed;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  height: 65px;
  width: 95%;
  max-width: 1400px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 30px var(--shadow-dark);
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  box-sizing: border-box;
  border-radius: 50px;
  margin: 0;
}

.nav {
  position: fixed;
  height: 70px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 30px var(--shadow-dark);
  z-index: 1000;
  transition: all 0.3s ease;
  margin: 0;
  box-sizing: border-box;
}

  #nav-logo-img{
    height: 70px;
  }

.nav h1 {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--text-primary);
  text-shadow: 0 2px 10px var(--shadow-darker);
}

.navlinks {
  text-align: center;
}

.navlinks ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.navlinks ul li {
  position: relative;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInUp 0.6s forwards;
}

.navlinks ul li:nth-child(1) {
  animation-delay: 0.1s;
}

.navlinks ul li:nth-child(2) {
  animation-delay: 0.2s;
}

.navlinks ul li:nth-child(3) {
  animation-delay: 0.3s;
}

.navlinks ul li:nth-child(4) {
  animation-delay: 0.4s;
}

.navlinks ul li a {
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

/* underline effect */
.navlinks ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.navlinks ul li a:hover {
  color: var(--primary-color);
}

.navlinks ul li a:hover::after {
  width: 100%;
}

.hero {
  background: var(--gradient-hero),
    url('../assets/pictures/hero-bg-pexels-creative-common.jpeg') center/cover no-repeat;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

#searchBtn {
  position: absolute;
  margin-top: 0px;
  margin-left: -70px;
  outline: none;
  background-color: var(--primary-color);
  border-radius: 25px;
  border: 1px solid var(--border-light);
  height: 45px;
  width: 70px;
  overflow: hidden;
}

#searchBtn img {
  padding-top: 2px;
  display: inline-block;
  height: 30px;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
}

#searchBtn.clicked img {
  animation: pulseSearchIcon 0.6s ease forwards;
}

#tagline {
  margin-top: -50px;
  color: var(--text-primary);
  text-align: center;
  display: flex;
  gap: 5px;
  flex-direction: column;
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(255, 255, 255, 0.2);
}

#tagline h3 {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}

#tagline p {
  margin-bottom: 0px;
}

.hero>div {
  margin-top: 15px;
}

#welcomeMessage {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  position: absolute;
  bottom: 80px;
  animation: fadeInMsg 1s ease forwards;
}

.welcome-animation {
  border: 2px solid var(--text-secondary);
  border-radius: 50px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  animation: bounceMsg 2s infinite ease-in-out;
}

.alertMsg{
  font-size: 16px;
  color: var(--text-primary);
  text-align: center; 
  margin-top: 30px; 
  border: 2px solid var(--primary-dark); 
  border-radius: 50px; 
  padding: 10px 15px;
}

#randomRecipes {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

#results {
  min-height: 100vh;
  position: relative;
  padding: 120px 100px;
  background: var(--gradient-results);
  background-size: 600% 600%;
  /* bigger to allow more movement */
  animation: gradientBG 20s ease-in-out infinite;
  overflow: hidden;
  /* display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center; */
}

#resultsContent {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

#resultsOutput{
  position: absolute;
  bottom: 80px;
}

#results::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 40%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 40%);
  pointer-events: none;
  mix-blend-mode: overlay;
  /* makes highlights glow */
}

#resultsMeta.hidden {
  display: none;
}

.glowing-heading {
  display: block;
  text-align: center;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
}

.glowing-word {
  color: var(--primary-color);
  font-weight: bold;
  text-shadow:
    0 0 3px var(--primary-color);
  animation: pulseAccent 4s infinite alternate;
}

.card {
  border: 1px solid var(--border-light);
  border-radius: 15px;
  width: 300px;
  margin: 20px;
  text-align: center;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 20px;
  min-width: 200px;
  font-weight: bold;
  color: var(--text-dark);
  box-shadow: 0 8px 25px var(--shadow-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0px 8px 25px var(--shadow-primary);
  /* box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25); */
}


.card img {
  width: 100%;
  border-radius: 10px;
}

.card .recipe-options {
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}

.card .recipe-name {
  color: var(--text-primary);
  height: 60px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: hidden;
}

.recipe-name.overflow {
  align-items: start;
  justify-content: start;
  overflow-y: auto;
  scrollbar-width: none;
  /* for Firefox */
  -ms-overflow-style: none;
  /* for IE 10+ */
}

.recipe-name.overflow::-webkit-scrollbar {
  display: none;
  /* for Chrome, Safari, Edge */
}

/* Input box styling (glassy effect) */
input[type="search"] {
  width: 350px;
  height: 45px;
  padding: 12px 20px;
  padding-right: 75px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 30px;
  border: 1px solid var(--border-light);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
  outline: none;
  box-shadow: 0 4px 30px var(--shadow-darker);
  transition: all 0.3s ease;
}

/* Style the placeholder text */
input[type="search"]::placeholder {
  color: var(--text-primary);
  /* translucent white */
  font-style: italic;
  font-size: 16px;
  text-indent: 2px;
  /* optional: shift placeholder slightly */
}

/* On focus: smooth expand + brighter glass */
input[type="search"]:focus {
  width: 400px;
  background: var(--bg-glass-focus);
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
}

.show-recipe-btn {
  background: var(--gradient-primary);
  /* stylish gradient */
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 35px;
  border: none;
  border-radius: 50px;
  /* pill shape */
  cursor: pointer;
  box-shadow: 0 5px 15px var(--shadow-primary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.show-recipe-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -105%;
  width: 100%;
  height: 100%;
  background: var(--bg-glass);
  transform: skewX(-20deg);
  transition: all 0.5s ease;
}

.show-recipe-btn:hover::after {
  left: 200%;
}

.show-recipe-btn:hover {
  box-shadow: 0 8px 25px var(--shadow-primary-hover);
  transform: translateY(-2px);
}

footer {
  text-align: center;
  padding: 30px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

footer span {
  color: var(--primary-color);
}

/*
  © 2025 Virat Sharma
  Project: Dishcovery
  Internal ID: AS-WM-19X
*/


@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
    filter: brightness(0.9);
  }

  25% {
    background-position: 100% 50%;
    filter: brightness(1.1);
  }

  50% {
    background-position: 50% 100%;
    filter: brightness(1);
  }

  75% {
    background-position: 0% 100%;
    filter: brightness(1.2);
  }

  100% {
    background-position: 0% 50%;
    filter: brightness(0.95);
  }
}


@keyframes scroll-text {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

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

@keyframes pulseSearchIcon {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }

  30% {
    transform: scale(1.25);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
  }

  60% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
}

@keyframes pulseIcon {
  0% {
    transform: scale(1);
    box-shadow: none;
  }

  40% {
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  }

  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

@keyframes bounce {
  from {
    transform: translateY(0);
    opacity: 0.5;
  }

  to {
    transform: translateY(-8px);
    opacity: 1;
  }
}

@keyframes fadeInMsg {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceMsg {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseAccent {
  0% {
    text-shadow:
      0 0 2px #ff6600;
  }

  50% {
    text-shadow:
      0 0 4px #964b19;
  }

  100% {
    text-shadow:
      0 0 2px #ff6600;
  }
}

/* Hide navlinks on mobile.*/
@media (max-width: 768px) {
  #nav-logo-img{
    height: 60px;
    position: relative;
    margin-left: -10px;
    margin-right: -30px;
  }

  .hero {
    background: var(--gradient-hero),
    url('../assets/pictures/hero-bg-pexels-creative-common.jpeg') 0% 100%/cover no-repeat;
  }

  #tagline{
    margin-top: -150px;
  }

  #results {
    min-height: 100vh;
    padding: 120px 20px;
  }

  #welcomeMessage {
    font-size: 14px;
  }

  .alertMsg{
    font-size: 14px;
  }

  .auth-nav-btn{
    display: none;
  }
  
  .auth-mobile-btn{
    display: block;
    height: 35px;
    line-height: 0px;
  }

  .nav{
    padding: 0 20px;
  }

  .nav h1{
    z-index: 50;
  }

  .navlinks {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background: var(--bg-nav-overlay);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right 0.4s ease-in-out;
    z-index: 1100;
  }

  .navlinks ul {
    flex-direction: column;
    gap: 25px;
  }

  .navlinks ul li a {
    font-size: 20px;
    color: var(--text-primary);
    transition: color 0.3s ease, transform 0.3s ease;
  }

  .navlinks ul li a:hover {
    color: #ff6600;
    transform: translateX(5px);
  }

  .navlinks.active {
    right: 0;
  }

  .menu-icon {
    width: 24px;
    height: 19px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1200;
    margin-left:-20px;
  }

  .menu-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.4s;
  }

  .menu-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .menu-icon.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: var(--bg-glass); */
    opacity: 0;
    backdrop-filter: blur(15px) saturate(150%);
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 900;
  }

  .overlay.active {
    opacity: 1;
    visibility: visible;
  }

}

/*Show navlinks normally on desktop*/
@media (min-width: 769px) {

  .menu-icon,
  .overlay {
    display: none;

  }
}

@media (max-width: 480px) {
  .nav h1 {
    font-size: 1.4rem;
  }

  #tagline h3 {
    margin-top: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
  }

  input[type="search"]::placeholder {
    font-size: 13px;
  }

  input[type="search"] {
    width: 270px;
    font-size: 13px;
  }

  input[type="search"]:focus {
    width: 310px;
  }
}