/* Custom application styles */

/* Safe-area inset helpers */
.pt-safe { padding-top: env(safe-area-inset-top, 1rem); }
.pb-safe { padding-bottom: env(safe-area-inset-bottom, 1rem); }

/* Hidden utility */
.hidden { display: none; }

/* Results and loading overlays */
.results-overlay,
.loading-overlay,
.share-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 50;
}

/* Error toast */
.error-toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 0, 0, 0.8);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  z-index: 60;
}

/* Share modal content */
.share-modal-content {
  background-color: #fff;
  border-radius: 0.5rem;
  padding: 1rem;
  max-width: 90%;
  width: 20rem;
}

/* Share option buttons */
.share-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #e5e7eb;
  color: #111827;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  margin: 0.25rem;
  text-decoration: none;
  font-weight: 600;
}
.share-option:hover {
  background-color: #d1d5db;
}

/* Remove default focus outline */
button:focus {
  outline: none;
}

/* Celebration flash */
.celebration-flash {
  position: fixed;
  inset: 0;
  background-color: rgba(255,255,255,0.6);
  pointer-events: none;
  z-index: 55;
  animation: flash 0.5s ease-out;
}

@keyframes flash {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

/* Celebration sparkles */
.celebration-sparkle {
  position: fixed;
  bottom: 0;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  pointer-events: none;
  animation: celebrateFloat 2s ease-out forwards;
}

@keyframes celebrateFloat {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-100px) scale(0.5); opacity: 0; }
}

/* Ambient sparkles */
.ambient-sparkle {
  position: fixed;
  bottom: 0;
  width: 4px;
  height: 4px;
  background-color: #fff;
  border-radius: 9999px;
  opacity: 0.6;
  pointer-events: none;
  animation: ambientFloat 4s linear forwards;
}

@keyframes ambientFloat {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-50px) scale(0.5); opacity: 0; }
}

/* Neon glow for mood buttons */
button[data-mood] {
  position: relative;
  overflow: hidden;
}
button[data-mood]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, #ff00cc, #3333ff, #ffcc00, #00ffcc);
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
button[data-mood]:hover::after,
button[data-mood]:focus::after {
  opacity: 0.4;
}

/* Neon glow for primary buttons */
#discover-btn,
#try-again-btn {
  position: relative;
  overflow: hidden;
  font-weight: 700;
}
#discover-btn::before,
#try-again-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg at 50% 50%, #ff00cc, #3333ff, #ffcc00, #00ffcc);
  filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
#discover-btn:hover::before,
#discover-btn:focus::before,
#try-again-btn:hover::before,
#try-again-btn:focus::before {
  opacity: 0.6;
}

/* Neon glow for modal card */
.modal-card {
  position: relative;
}
.modal-card::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: conic-gradient(from 0deg at 50% 50%, #ff00cc, #3333ff, #ffcc00, #00ffcc);
  border-radius: 0.5rem;
  filter: blur(8px);
  z-index: -1;
}

/* Mood banner strip inside modal */
.mood-banner {
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
}

/* Metadata badges (mood and time-of-day) */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Pop-in animation for modal card */
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.8);} 
  60% { opacity: 1; transform: scale(1.05);} 
  100% { transform: scale(1);} 
}
.pop-in {
  animation: popIn 0.6s ease-out forwards;
}

/* Overlay backdrop blur enhancement */
.results-overlay {
  backdrop-filter: blur(12px);
}

/* Remove legacy shimmer and shadow styles */

/* Neon glow for modal card */
.modal-card {
  position: relative;
}
.modal-card::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: conic-gradient(from 0deg at 50% 50%, #ff00cc, #3333ff, #ffcc00, #00ffcc);
  border-radius: 0.5rem;
  filter: blur(8px);
  z-index: -1;
}

/* Mood banner strip inside modal */
.mood-banner {
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
}

/* Metadata badges (mood and time-of-day) */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Remove duplicate shimmer overlay and modal pseudo styles */

/* Remove old modal gradient border styles */
.modal-card {
  position: relative;
}
.modal-card::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: conic-gradient(from 0deg at 50% 50%, #ff00cc, #3333ff, #ffcc00, #00ffcc);
  border-radius: 0.5rem;
  filter: blur(8px);
  z-index: -1;
}

/* Mood banner strip inside modal */
.mood-banner {
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
}

/* Metadata badges (mood and time-of-day) */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Fry Me Again button: fryer style with bubbly oil animation */
.fryer-btn {
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, #FFD54F, #FFB300);
  color: #1F2937; /* dark text for contrast */
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}
.fryer-btn:hover {
  transform: scale(1.05);
}
.fryer-btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255,215,0,0.5);
}

/* Oil bubble animations */
.fryer-btn::before,
.fryer-btn::after {
  content: "";
  position: absolute;
  bottom: 10%;
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  animation: bubble 4s infinite ease-in-out;
}
.fryer-btn::before {
  left: 25%;
  animation-duration: 3s;
  animation-delay: 0s;
}
.fryer-btn::after {
  left: 60%;
  animation-duration: 4.5s;
  animation-delay: 1.5s;
}
@keyframes bubble {
  0% { transform: translateY(0) scale(0.5); opacity: 0.8; }
  50% { opacity: 0.4; }
  100% { transform: translateY(-120%) scale(1.2); opacity: 0; }
}

/* Rainbow text effect for fry name */
.rainbow-text {
  background: linear-gradient(90deg, #ff0066, #ffcc00, #33ccff, #cc33ff, #ff0066);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow 4s linear infinite;
}
@keyframes rainbow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Fry pattern background overlay */
body {
  position: relative;
  z-index: 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><text y='14' font-size='14'>🍟</text></svg>");
  background-size: 80px 80px;
  background-repeat: repeat;
  opacity: 0.08;
  animation: fryPatternMove 40s linear infinite, discoHue 20s linear infinite;
  will-change: background-position;
  filter: hue-rotate(0deg);
  pointer-events: none;
  z-index: 0;
}
@keyframes fryPatternMove {
  0% { background-position: 0 0; }
  100% { background-position: 80px 80px; }
}

/* Disco hue-rotate effect */
@keyframes discoHue {
  0% { filter: hue-rotate(0deg); }
  25% { filter: hue-rotate(90deg); }
  50% { filter: hue-rotate(180deg); }
  75% { filter: hue-rotate(270deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Ensure app content floats above pattern */
#app {
  position: relative;
  z-index: 1;
}

/* Subtle glitter stripe overlay for Y2K shimmer */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 10%, transparent 10%, transparent 50%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.1) 60%, transparent 60%, transparent);
  background-size: 20px 20px;
  opacity: 0.12;
  animation: glitterStripe 8s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes glitterStripe {
  from { background-position: 0 0; }
  to { background-position: 20px 20px; }
}

/* New reveal feedback styles */
.reveal-feedback-panel {
  position: absolute;
  bottom: 2.25rem;
  right: 1rem;
  width: 240px;
  background-color: #ffffff;
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 30;
  transition: all 0.2s ease-out;
  color: #333;
}
.reveal-feedback-panel.hidden {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
}
.reveal-feedback-panel input {
  color: #333;
  width: 100%;
  border: 1px solid #ddd;
  padding: 0.5rem;
  border-radius: 0.5rem;
}
.reveal-feedback-panel input:focus {
  outline: none;
  border-color: #ff9a9e;
}

/* Custom styles for the main call-to-action button */
.discover-btn-custom {
  background: linear-gradient(45deg, #ff00ff, #ffdb58, #ff00ff, #ffdb58);
  background-size: 400% 400%;
  animation: gradient-flow 10s ease infinite, sparkle-deep-fry 1.5s infinite linear;
  color: white;
  text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #ff00ff, 0 0 20px #ff00ff;
  border: 2px solid #fff;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  letter-spacing: 1px;
  box-shadow: 0 0 20px #ff00ff, inset 0 0 10px #ffdb58;
  transition: all 0.3s ease;
  padding: 1rem; /* Replaces py-4 for consistent padding */
  border-radius: 0.5rem; /* Replaces rounded-lg */
}

.discover-btn-custom:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 30px #ff00ff, 0 0 10px #fff, inset 0 0 15px #ffdb58;
}

.discover-btn-custom:disabled {
  cursor: not-allowed;
  filter: grayscale(80%);
  background: #555;
  color: #999;
  text-shadow: none;
  box-shadow: none;
  border-color: #777;
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes sparkle-deep-fry {
  0% { border-color: #fff; }
  50% { border-color: #ffdb58; }
  100% { border-color: #fff; }
} 