body {
  margin: 0;
  padding: 0;
  font-family: Poppins, sans-serif;
  background-color: #f5f5f5;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-user-select: none;
  user-select: none;
}

/* Support Page Styles */
.support-page {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    color: #333;
}

.support-page header h1 {
    font-size: 2em;
    color: #FF3008;
    margin: 10px 0 20px;
}

.support-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.support-content h2 {
    color: #FF3008;
    margin-bottom: 20px;
}

.support-content p {
    margin: 15px 0;
    line-height: 1.6;
}

.support-content a {
    color: #FF3008;
    text-decoration: none;
    font-weight: bold;
}

.support-content button {
    background-color: #FF3008;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.support-content button:hover {
    background-color: #e62b07;
}

/* Landing Page Styles */
.landing {
  width: 100%;
  max-width: 400px;
  padding: 20px;
  text-align: center;
  color: #333;
  position: relative;
  top: -8%; /* Changed from -15% to add more space at the top */
}

.landing header h1 {
  font-size: 2em;
  color: #FF3008;
  margin: 10px 0 20px;
}

.landing main p {
  font-size: 1.1em;
  margin: 0 0 20px;
  line-height: 1.5;
}

.slider-container {
  margin-bottom: 25px;
  text-align: center;
  color: #FF3008;
}

.slider-container label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  color: #FF3008;
}

#question-count {
  width: 80%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  outline: none;
}

#question-count::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #FF3008;
  border-radius: 50%;
  cursor: pointer;
}

#question-count::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #FF3008;
  border-radius: 50%;
  cursor: pointer;
}

.landing #start-btn {
  background-color: #FF3008;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.2em;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  animation: pulse 2s infinite;
}

.landing #start-btn:hover {
  background-color: #e62b07;
}

.share-btn.support {
  background-color: #808080;
  color: white;
}

.share-btn.support:hover {
  background-color: #666666;
}

.app-store-coming-soon {
  margin-top: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-store-coming-soon .app-store-logo {
  height: 24px;
  margin-left: 10px;
}

.app-store-coming-soon span {
  font-size: 0.9em;
  font-weight: bold;
  color: #333;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Card Page Styles */
.container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  top: -15%;
}

#card-stack {
  position: relative;
  width: 300px;
  height: 424px;
  margin-top: 20px;
}

.card {
  background: linear-gradient(135deg, #fff, #f9f9f9);
  border: 1px solid #ddd;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: absolute;
  width: 260px;
  height: 384px;
  left: 0;
  top: 0;
  text-align: center;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
  touch-action: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  color: #333;
}

.card.swiping {
  opacity: 1;
}

.card.swiping-out {
  opacity: 0;
}

.card h2 {
  margin: 40px 0 0 0;
  font-size: 1.2em;
  padding: 10px;
  width: 100%;
  word-wrap: break-word;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  color: #333;
}

.question-emoji {
  font-size: 5em;
  margin: 15px 0;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  filter: grayscale(0);
}

.skip-btn {
  background-color: #ccc;
  color: #333;
  border: none;
  padding: 8px 16px;
  font-size: 0.9em;
  border-radius: 20px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background-color 0.3s ease;
}

.skip-btn:hover {
  background-color: #bbb;
}

.back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: #FF3008;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background-color 0.3s ease;
  z-index: 1;
}

.back-btn:hover {
  background-color: #e62b07;
}

.hidden {
  display: none;
}

.result-card {
  background: #fb5c3c;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  width: 260px;
  height: 384px;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: absolute;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.result-card h2,
.result-card p {
  text-align: center;
  margin: 0;
  width: 100%;
  padding: 10px;
  pointer-events: none;
}

.result-card button {
  background-color: white;
  color: #fb5c3c;
  border: none;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 5px;
  width: 80%;
  max-width: 200px;
}

.dinner-icon {
  width: 100px;
  height: 100px;
  margin: 10px 0;
}

#search-btn {
  background-color: white;
  color: #fb5c3c;
  font-weight: bold;
}

#restart-btn {
  margin-bottom: 15px;
}

.loading-card {
  background: linear-gradient(135deg, #FF3008, #fb5c3c);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.loading-card h2 {
  color: white;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.cuisine-card {
  background: linear-gradient(135deg, #FF3008, #fb5c3c);
  color: white;
}

.cuisine-card h2 {
  color: white;
  font-size: 1.4em;
  margin-top: 20px;
  pointer-events: none;
}

.cuisine-card .subtitle {
  font-size: 1em;
  opacity: 0.9;
  margin: 0;
  pointer-events: none;
}

.cuisine-card .swipe-hint {
  font-size: 0.85em;
  opacity: 0.8;
  margin-bottom: 20px;
  pointer-events: none;
}

.restaurant-card {
  background: linear-gradient(135deg, #fff, #f9f9f9);
  color: #FF3008;
  border: 1px solid #ddd;
}

.restaurant-card h2 {
  color: #FF3008;
  font-size: 1.3em;
  margin-top: 10px;
  pointer-events: none;
}

.restaurant-card .restaurant-number {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 0.8em;
  opacity: 0.7;
  color: #FF3008;
  pointer-events: none;
}

.restaurant-card .neighborhood {
  font-size: 1em;
  margin: 5px 0;
  color: #333;
  pointer-events: none;
}

.restaurant-card .description {
  font-size: 0.95em;
  line-height: 1.4;
  color: #555;
  padding: 10px 15px;
  flex-grow: 1;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.restaurant-card .swipe-hint {
  font-size: 0.75em;
  opacity: 0.6;
  margin-bottom: 15px;
  color: #999;
  pointer-events: none;
}

.error-card {
  background: linear-gradient(135deg, #FF3008, #fb5c3c);
  color: white;
}

.error-card h2 {
  color: white;
}

.restart-container {
  margin-top: 20px;
  text-align: center;
  z-index: 200;
}

.restart-btn {
  background-color: #FF3008;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1em;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.restart-btn:hover {
  background-color: #e62b07;
}

.end-options-card {
  background: linear-gradient(135deg, #fff, #f9f9f9);
  color: #333;
  border: 1px solid #ddd;
}

.end-options-card h2 {
  color: #FF3008;
  font-size: 1.2em;
  margin-top: 30px;
  pointer-events: none;
}

.end-options-card p {
  font-size: 0.95em;
  color: #555;
  padding: 10px;
  pointer-events: none;
}

.end-options-card .menu-btn {
  background-color: #FF3008;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1em;
  border-radius: 25px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background-color 0.3s ease;
}

.end-options-card .menu-btn:hover {
  background-color: #e62b07;
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 9999;
}

.swiping {
  cursor: grabbing;
}

.swiping-right::after {
  content: "YES";
  position: absolute;
  top: 20px;
  right: 20px;
  color: #4CAF50;
  border: 3px solid #4CAF50;
  padding: 5px 10px;
  border-radius: 5px;
  transform: rotate(15deg);
  font-weight: bold;
}

.swiping-left::after {
  content: "NO";
  position: absolute;
  top: 20px;
  left: 20px;
  color: #F44336;
  border: 3px solid #F44336;
  padding: 5px 10px;
  border-radius: 5px;
  transform: rotate(-15deg);
  font-weight: bold;
}

.restaurant-card.swiping-right::after {
  content: "SEARCH";
  color: #4CAF50;
  border-color: #4CAF50;
  background: rgba(255,255,255,0.9);
}

.restaurant-card.swiping-left::after {
  content: "NEXT";
  color: #F44336;
  border-color: #F44336;
  background: rgba(255,255,255,0.9);
}

.cuisine-card.swiping-right::after,
.cuisine-card.swiping-left::after {
  content: "→";
  color: white;
  border-color: white;
}

/* Progress Indicator */
.progress {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1em;
  color: #333;
  z-index: 20;
}

/* API Key Dialog Styles */
.api-key-dialog {
  background: white;
  width: 90%;
  max-width: 500px;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  text-align: center;
}

.api-key-dialog h2 {
  color: #FF3008;
  margin-bottom: 20px;
}

.api-key-container {
  display: flex;
  flex-direction: column;
  margin: 20px 0;
}

.api-key-container input {
  padding: 12px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  margin-bottom: 15px;
}

.api-key-container button {
  background-color: #FF3008;
  color: white;
  border: none;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
}

.api-key-info {
  font-size: 0.9em;
  color: #777;
  margin-top: 15px;
}

#card-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.swipe-indicators {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 300px;
  margin-bottom: 10px; /* Revert to original spacing */
  position: relative;
  z-index: 0;
}

.swipe-indicator {
  padding: 8px 15px;
  border-radius: 15px;
  font-size: 0.9em;
  font-weight: bold;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.1s ease, background-color 0.2s ease;
}

.swipe-indicator:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.swipe-indicator:active {
  transform: scale(0.95);
  opacity: 0.9;
}

.left-indicator {
  color: #F44336;
  border: 2px solid #F44336;
}

.right-indicator {
  color: #4CAF50;
  border: 2px solid #4CAF50;
}

.swipe-indicator span {
  font-size: 1.5em;
  margin: 0 5px;
}

/* Social Share Styles */
.social-share {
  margin-top: 20px;
  text-align: center;
}

.social-share p {
  font-size: 0.9em;
  color: #333;
  margin: 0 0 10px;
}

.share-btn {
  display: inline-block;
  padding: 3px 6px;
  width: 38px; /* Slightly wider to accommodate Discord text */
  margin: 0 3px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.375em;
  font-weight: bold;
  font-family: Poppins, sans-serif;
  text-align: center;
  transition: background-color 0.3s ease;
}

.share-btn.x {
  background-color: #000000;
  color: white;
}

.share-btn.x:hover {
  background-color: #333333;
}

/* Facebook button removed */

.share-btn.incubeai {
  background-color: #3d8fd2;
  color: white;
  width: auto;
  padding: 3px 10px;
}

.share-btn.incubeai:hover {
  background-color: #3580bd;
}

.share-btn.reddit {
  background-color: #FF4500;
  color: white;
}

.share-btn.reddit:hover {
  background-color: #e03d00;
}

.share-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  filter: brightness(0) invert(1); /* This makes the icon white */
}

.reddit-icon {
  filter: none; /* Remove filter for Reddit icon */
}

.share-btn.copy {
  background-color: #2c3e50;
  color: white;
}

.share-btn.copy:hover {
  background-color: #1a252f;
}

/* Position result-social-share right below result card */
.result-social-share {
  margin-top: 450px; /* Position further below result card */
  margin-bottom: 20px;
  width: 100%;
  text-align: center;
  z-index: 20;
  position: relative;
}

/* Make share buttons on result page fit on one line */
.result-social-share .share-btn {
  display: inline-block;
  width: 19%; /* Adjusted for 4 buttons instead of 5 */
  max-width: 42px;
  margin: 0 1.5%;
  padding: 3px 1px;
  font-size: 0.35em;
}

/* Ensure buttons appear in a row */
.result-social-share {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}