html,
body {
  height: 100%;
  width: 100%;
  background-color: #ffffff;
}

body.theme-dark {
  background-color: #111;
}

/* Modern Restaurant Preloader */
.preloader {
  position: fixed;
  inline-size: 100%;
  block-size: 100%;
  background: linear-gradient(135deg, #ff5722 0%, #d84315 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow: hidden;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.theme-dark .preloader {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

@media (max-width: 1199px) {
  .header {
    display: none;
  }
}

.preloader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
  position: relative;
}

.preloader-logo-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: logoFloat 3s ease-in-out infinite;
}

.preloader-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  animation: logoGlow 3s ease-in-out infinite alternate;
}

.theme-dark .preloader-img {
  filter: brightness(0) invert(1);
}

.preloader-title {
  font-family: "Roboto", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 0;
  letter-spacing: -0.02em;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

.preloader-subtitle {
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  letter-spacing: 0.05em;
  animation: subtitleFade 3s ease-in-out infinite;
}

.restaurant-loader {
  position: relative;
  width: 200px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  overflow: hidden;
  margin-top: 1rem;
}

.restaurant-loader::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffffff, #f0f0f0, #ffffff);
  border-radius: 50px;
  animation: restaurantProgress 2.5s ease-in-out infinite;
}

.restaurant-dots {
  display: flex;
  gap: 8px;
  margin-top: 1.5rem;
}

.restaurant-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  animation: dotPulse 1.5s ease-in-out infinite;
}

.restaurant-dot:nth-child(1) {
  animation-delay: 0s;
}
.restaurant-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.restaurant-dot:nth-child(3) {
  animation-delay: 0.4s;
}
.restaurant-dot:nth-child(4) {
  animation-delay: 0.6s;
}

.preloader-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

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

.particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
}
.particle:nth-child(2) {
  left: 20%;
  animation-delay: 1s;
}
.particle:nth-child(3) {
  left: 30%;
  animation-delay: 2s;
}
.particle:nth-child(4) {
  left: 40%;
  animation-delay: 3s;
}
.particle:nth-child(5) {
  left: 50%;
  animation-delay: 4s;
}
.particle:nth-child(6) {
  left: 60%;
  animation-delay: 5s;
}
.particle:nth-child(7) {
  left: 70%;
  animation-delay: 6s;
}
.particle:nth-child(8) {
  left: 80%;
  animation-delay: 7s;
}
.particle:nth-child(9) {
  left: 90%;
  animation-delay: 8s;
}

/* Additional visual enhancements */
.preloader-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: backgroundPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes backgroundPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Loading text animation */
.preloader-subtitle::after {
  content: "";
  animation: loadingDots 2s infinite;
}

@keyframes loadingDots {
  0%,
  20% {
    content: "";
  }
  40% {
    content: ".";
  }
  60% {
    content: "..";
  }
  80%,
  100% {
    content: "...";
  }
}

.header {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  inline-size: 100%;
}
.header-container {
  max-inline-size: 1200px;
  margin-inline: auto;
  padding: 1.28rem 1.6rem;
  background-color: #fff;
  box-shadow: 0px 6px 12px -3px rgba(4, 97, 165, 0.1);
  border-radius: 0 0 0.625rem 0.625rem;
}

.theme-dark .header-container {
  background-color: #111;
}
.header .logo {
  max-height: 30px;
}
.placeholder {
  block-size: 0.825rem;
  inline-size: 3rem;
  background-color: #f5f5f5;
  border-radius: 0.3rem;
}

.theme-dark .placeholder {
  background-color: #111;
}

.placeholder-wide {
  inline-size: 12rem;
}

.d-flex {
  display: flex;
}
.align-items-center {
  align-items: center;
}
.justify-content-center {
  justify-content: center;
}
.justify-content-between {
  justify-content: space-between;
}
.flex-column {
  flex-direction: column;
}
.gap-3 {
  gap: 1rem;
}
.gap-4 {
  gap: 1.5rem;
}
.gap-5 {
  gap: 3rem;
}
/* Modern Quiz Preloader Animations */
@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0px) scale(1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  50% {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  }
}

@keyframes logoGlow {
  0% {
    filter: brightness(0) invert(1)
      drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
    transform: scale(1);
  }
  100% {
    filter: brightness(0) invert(1)
      drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
    transform: scale(1.05);
  }
}

@keyframes titleGlow {
  0% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transform: scale(1);
  }
  100% {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8),
      0 0 40px rgba(119, 51, 254, 0.5);
    transform: scale(1.02);
  }
}

@keyframes subtitleFade {
  0%,
  100% {
    opacity: 0.8;
    transform: translateY(0px);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes restaurantProgress {
  0% {
    width: 0%;
    opacity: 1;
  }
  50% {
    width: 70%;
    opacity: 0.8;
  }
  100% {
    width: 100%;
    opacity: 0.6;
  }
}

@keyframes dotPulse {
  0%,
  100% {
    transform: scale(1);
    background: rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: scale(1.3);
    background: rgba(255, 255, 255, 0.8);
  }
}

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

/* Premium Food Icons Animation */
.food-icons-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.food-icon {
  position: absolute;
  font-size: 2rem;
  opacity: 0.7;
  animation: foodFloat 6s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Individual food icon positions and animations */
.food-icon-1 {
  left: 10%;
  top: 15%;
  animation-delay: 0s;
  animation-duration: 5s;
}
.food-icon-2 {
  left: 85%;
  top: 20%;
  animation-delay: 0.5s;
  animation-duration: 6s;
}
.food-icon-3 {
  left: 15%;
  top: 70%;
  animation-delay: 1s;
  animation-duration: 5.5s;
}
.food-icon-4 {
  left: 80%;
  top: 75%;
  animation-delay: 1.5s;
  animation-duration: 6.5s;
}
.food-icon-5 {
  left: 5%;
  top: 45%;
  animation-delay: 2s;
  animation-duration: 5.8s;
}
.food-icon-6 {
  left: 90%;
  top: 50%;
  animation-delay: 2.5s;
  animation-duration: 6.2s;
}
.food-icon-7 {
  left: 25%;
  top: 25%;
  animation-delay: 3s;
  animation-duration: 5.3s;
}
.food-icon-8 {
  left: 70%;
  top: 30%;
  animation-delay: 3.5s;
  animation-duration: 6.8s;
}
.food-icon-9 {
  left: 30%;
  top: 80%;
  animation-delay: 4s;
  animation-duration: 5.7s;
}
.food-icon-10 {
  left: 65%;
  top: 85%;
  animation-delay: 4.5s;
  animation-duration: 6.3s;
}
.food-icon-11 {
  left: 8%;
  top: 60%;
  animation-delay: 5s;
  animation-duration: 5.9s;
}
.food-icon-12 {
  left: 88%;
  top: 65%;
  animation-delay: 5.5s;
  animation-duration: 6.1s;
}
.food-icon-13 {
  left: 40%;
  top: 10%;
  animation-delay: 6s;
  animation-duration: 5.4s;
}
.food-icon-14 {
  left: 55%;
  top: 15%;
  animation-delay: 0.8s;
  animation-duration: 6.7s;
}
.food-icon-15 {
  left: 45%;
  top: 90%;
  animation-delay: 1.3s;
  animation-duration: 5.6s;
}
.food-icon-16 {
  left: 20%;
  top: 50%;
  animation-delay: 1.8s;
  animation-duration: 6.4s;
}
.food-icon-17 {
  left: 75%;
  top: 55%;
  animation-delay: 2.3s;
  animation-duration: 5.2s;
}
.food-icon-18 {
  left: 35%;
  top: 35%;
  animation-delay: 2.8s;
  animation-duration: 6.6s;
}
.food-icon-19 {
  left: 60%;
  top: 40%;
  animation-delay: 3.3s;
  animation-duration: 5.1s;
}
.food-icon-20 {
  left: 12%;
  top: 85%;
  animation-delay: 3.8s;
  animation-duration: 6.9s;
}

@keyframes foodFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-15px) rotate(5deg) scale(1.1);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-25px) rotate(-3deg) scale(1.05);
    opacity: 1;
  }
  75% {
    transform: translateY(-10px) rotate(8deg) scale(1.15);
    opacity: 0.9;
  }
}

/* Enhanced particle effects */
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: particleFloat 12s linear infinite;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .preloader-title {
    font-size: 2rem;
  }

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

  .preloader-logo-container {
    width: 100px;
    height: 100px;
  }

  .preloader-img {
    width: 60px;
    height: 60px;
  }

  .restaurant-loader {
    width: 160px;
  }

  .food-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
  }
}
