xhtml,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

body {
  background-color: #FCEE3B;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

.layer1 {
  width: 100vw;
  height: 100vh;
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: url('attached_assets/soup16_1764776164212.png') center/cover no-repeat;
  border-radius: 0;
  backdrop-filter: blur(10px);
  padding: 40px 0;
  box-shadow: none;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
}

.layer1::after,
.layer1::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.25);
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  filter: blur(25px);
  z-index: 0;
}

.layer1::after {
  animation: steamRight 3s infinite;
}

.layer1::before {
  animation: steamLeft 3s infinite;
}

.layer1 .steam-middle {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.3);
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  filter: blur(15px);
  z-index: 0;
  animation: steamMiddle 3.5s infinite;
}

@keyframes steamLeft {
  0% {
    transform: translateX(-60%) translateY(0) scale(1);
    opacity: 0;
  }

  50% {
    transform: translateX(-75%) translateY(-125px) scale(1.25);
    opacity: 0.4;
  }

  100% {
    transform: translateX(-90%) translateY(-250px) scale(1.5);
    opacity: 0;
  }
}

@keyframes steamRight {
  0% {
    transform: translateX(-40%) translateY(0) scale(1);
    opacity: 0;
  }

  50% {
    transform: translateX(25%) translateY(-125px) scale(1.25);
    opacity: 0.4;
  }

  100% {
    transform: translateX(40%) translateY(-250px) scale(1.5);
    opacity: 0;
  }
}

@keyframes steamMiddle {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 0;
  }

  50% {
    transform: translateX(-50%) translateY(-125px) scale(1.5);
    opacity: 0.45;
  }

  100% {
    transform: translateX(-50%) translateY(-250px) scale(1.75);
    opacity: 0;
  }
}

.layer1::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.0);
  border-radius: 20px;
  z-index: 0;
}

.layer1>* {
  position: relative;
  z-index: 1;
}

.logo-title-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10%;
}

.maggi-logo {
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
}

.main-title {
  font-size: 48px;
  font-weight: 700;
  color: white;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: -0.5px;
  line-height: 1.1;
  padding: 30px;
}

.main-subtitle {
  font-size: 21px;
  color: #86868b;
  text-align: center;
  margin-bottom: 60px;
  font-weight: 400;
  max-width: 600px;
}

.inner-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

.camera-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  width: 80%;
  max-width: 300px;
}

.camera-text {
  background-color: #DA251D;
  color: white;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  margin: 0;
  font-size: 19.2px;
}

.select-image-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.select-image-btn {
  background-color: #DA251D;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  font-size: 19.2px;
  text-align: center;
  width: 80%;
  max-width: 300px;
  border: none;
}

.preview-section {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

#analyze-button {
  background-color: #4285f4;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 20px;
  width: 80%;
  max-width: 300px;
}

#analyze-button:hover {
  background-color: #3b78e7;
}

.result-section {
  position: fixed;
  top: 10%;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 90%;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 15px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.result-content {
  line-height: 1.5;
  padding-right: 30px;
  /* Make space for close button */
}

.result-close-button {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: red;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 30px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
}

/* Previous animation styles - commented out
.animated-result {
  transform: translateX(-50%) rotate(-10deg);
  display: block;
  float: left;
  left: 50%;
  position: relative;
  margin-bottom: 20px;
  color: #e55643;
  text-transform: uppercase;
  font-size: 24px;
  font-family: 'Fjalla One', sans-serif;
}

.animated-result span {
  transform: skew(-10deg);
  display: block;
  float: left;
  text-shadow: #533d4a 1px 1px, #533d4a 2px 2px, #533d4a 3px 3px, #533d4a 4px 4px;
  min-width: 10px;
  min-height: 10px;
  position: relative;
}

.fullscreen-result-content .animated-result {
  transform: none;
  float: none;
  left: 0;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
*/

/* Typewriter effect styles */
@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro');

.typewriter-text {
  border-right: solid 3px rgba(0, 255, 0, .75);
  white-space: normal;
  overflow: visible;
  font-family: 'Source Code Pro', monospace;
  font-size: 20px;
  color: rgba(0, 0, 0, .85);
  margin: 0 auto;
  max-width: 100%;
  display: inline-block;
  animation: animated-cursor 600ms steps(50, end) infinite;
}

.fullscreen-result-content .typewriter-text {
  color: rgba(255, 255, 255, 1);
  font-size: 24px;
  text-align: left;
  margin: 0 auto;
  width: 100%;
}

/* cursor animations */
@keyframes animated-cursor {
  from {
    border-right-color: rgba(0, 255, 0, .75);
  }

  to {
    border-right-color: transparent;
  }
}

/* Audio player layer removed */

/* Camera fullscreen styles */
.camera-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #000;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  /* Remove padding that might cause issues on Android */
  box-sizing: border-box;
}

.camera-fullscreen video {
  max-width: 100%;
  max-height: 80vh;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.capture-button {
  position: absolute;
  bottom: 50px;
  background-color: #DA251D;
  color: white;
  border: none;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  font-size: 11px;
  cursor: pointer;
}

.close-camera-button {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: rgba(255, 255, 255, 0.3);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fullscreen-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: transparent;
  z-index: 150;
  display: flex;
  flex-direction: column;
  transition: opacity 0.5s ease;
}

.fullscreen-image img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  display: block;
}





.fullscreen-image.fade-out {
  opacity: 0;
}

.fullscreen-results {
  position: absolute;
  bottom: 2%;
  left: 0;
  right: 0;
  max-width: 80%;
  height: 90%;
  margin: 0 auto;
  padding: 6px;
  background: #FCEE3B;
  border-radius: 15px;
  overflow-y: auto;
}

.fullscreen-results h2 {
  margin-top: 0;
  color: #333;
}

.fullscreen-result-content {

  line-height: 1.5;
  color: #333;
}

/* Audio-related styles removed */

.fullscreen-close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: rgba(255, 255, 255, 0.7);
  color: #333;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 160;
}

/* Independent results close button layer */
#results-close-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 0, 0, 0.3);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: all;
}

#results-close-btn {
  background-color: red;
  color: white;
  border: 5px solid white;
  border-radius: 20px;
  font-size: 40px;
  font-weight: bold;
  padding: 20px;
  width: 80%;
  height: 100px;
  cursor: pointer;
  box-shadow: 0 0 30px black;
  z-index: 10001;
}

/* PIN Verification Styles */
.pin-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 300;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pin-container {
  background-color: white;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  max-width: 90%;
  width: 300px;
}

.pin-container h2 {
  margin-top: 0;
  color: #333;
  margin-bottom: 20px;
}

.pin-input-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
}

.pin-digit {
  width: 40px;
  height: 50px;
  font-size: 24px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.pin-submit-btn {
  background-color: #4285f4;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  width: 80%;
}

.pin-error {
  color: red;
  margin-top: 15px;
  font-size: 14px;
}

.recipe-options {
  margin-top: 20px;
  width: 100%;
}

.recipe-options p {
  color: white;
  margin-bottom: 15px;
  font-size: 18px;
  text-align: center;
}

.recipe-buttons-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0px;
  width: 100%;
}

.recipe-text {
  color: #2c3e50;
  font-size: 16px;
  line-height: 1.6;
  padding: 20px;
  background: #ffffff;
  border-radius: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.recipe-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: #006400;
  letter-spacing: -0.5px;
  text-align: center;
  border-bottom: 2px solid #eee;
  padding-bottom: 20px;
}

.recipe-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  margin-bottom: 24px;
}

.recipe-type,
.recipe-time {
  color: #1d1d1f;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.recipe-for {
  color: #1d1d1f;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 24px 0;
  text-align: center;
}

.recipe-section {
  margin: 0 0 24px 0;
  text-align: left;
}

.recipe-section h4 {
  font-size: 18px;
  color: #1d1d1f;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.recipe-section:last-child {
  margin-bottom: 0;
}

.recipe-ingredients {
  color: #495057;
  line-height: 1.6;
  margin-bottom: 10px;
}

.recipe-steps {
  margin: 0;
  padding-left: 20px;
}

.recipe-steps li {
  margin-bottom: 16px;
  line-height: 1.7;
  color: #495057;
  padding-left: 8px;
}

.recipe-steps li:last-child {
  margin-bottom: 0;
}

.fullscreen-results {
  background: #FCEE3B;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.recipe-option-btn {
  background-color: #DA251D;
  color: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 22px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.recipe-option-btn:hover {
  background-color: #DA251D;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.recipe-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
  color: #86868b;
  font-size: 14px;
}

.recipe-for {
  color: #006400;
  margin: 8px 0;
}

.recipe-section {
  margin: 5px 0;
}

.recipe-section h4 {
  font-size: 18px;
  color: #006400;
  margin: 0 0 4px 0;
}

.recipe-option-btn {
  background-color: #DA251D;
  color: white;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 38px;
  cursor: pointer;
  width: 80%;
  height: 120px;
  text-align: center;
  margin: 10px auto;
  border: none;
  transition: all 0.3s ease;
  display: block;
}

.recipe-option-btn:hover {
  transform: none;
  box-shadow: none;
  background-color: #DA251D;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-spinner {
  width: 115px;
  height: 115px;
  border: 11px solid #FCEE3B;
  border-top: 10px solid #DA251D;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 38px;
}

.loading-spinner::after {
  content: '🥕';
  position: absolute;
  animation: changeEmoji 5s steps(1) infinite;
}

@keyframes changeEmoji {
  0% {
    content: '🥕';
  }

  20% {
    content: '🥬';
  }

  40% {
    content: '🥦';
  }

  60% {
    content: '🍆';
  }

  80% {
    content: '🫑';
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.error-text {
  color: #ff4444;
  font-size: 16px;
  text-align: center;
}

.captured-image-preview {
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 10px;
}

.captured-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.action-button {
  padding: 12px 30px;
  border-radius: 38px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  background-color: #DA251D;
  color: white;
  width: 80%;
  max-width: 300px;
  margin: 10px auto;
}

.action-button:hover {
  transform: none;
  box-shadow: none;
  background-color: #DA251D;
}