/* -----------------------------------------
   Premium Style Design System
   Suseong Blue Ribbon Guide Mobile Web App
----------------------------------------- */

/* Font & Variables */
:root {
  --font-main: 'Noto Sans KR', sans-serif;
  --font-accent: 'Outfit', sans-serif;
  
  /* Gradation */
  --grad-primary: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
  --grad-hot: linear-gradient(135deg, #ff4e50 0%, #f9d423 100%);
  --grad-dark-glass: linear-gradient(135deg, rgba(20, 24, 33, 0.8) 0%, rgba(10, 12, 16, 0.9) 100%);
  
  /* Shadow */
  --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 15px rgba(6, 182, 212, 0.4);
  
  /* Transitions */
  --trans-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --trans-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Safe Area */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark Theme (Default) */
.dark-theme {
  --bg-app: #090a0f;
  --bg-card: rgba(22, 26, 38, 0.7);
  --bg-header: rgba(9, 10, 15, 0.8);
  --bg-nav: rgba(15, 18, 28, 0.85);
  --border-glow: rgba(255, 255, 255, 0.08);
  --border-active: rgba(6, 182, 212, 0.3);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  --btn-secondary: rgba(255, 255, 255, 0.06);
  --btn-secondary-hover: rgba(255, 255, 255, 0.12);
  
  --ribbon-badge-bg: rgba(6, 182, 212, 0.15);
  --ribbon-badge-text: #22d3ee;
}

/* Light Theme */
.light-theme {
  --bg-app: #f4f6fa;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-header: rgba(244, 246, 250, 0.8);
  --bg-nav: rgba(255, 255, 255, 0.9);
  --border-glow: rgba(0, 0, 0, 0.06);
  --border-active: rgba(139, 92, 246, 0.3);
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --btn-secondary: rgba(0, 0, 0, 0.04);
  --btn-secondary-hover: rgba(0, 0, 0, 0.08);
  
  --ribbon-badge-bg: rgba(139, 92, 246, 0.12);
  --ribbon-badge-text: #7c3aed;
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  line-height: 1.5;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select {
  font-family: inherit;
  outline: none;
  border: none;
  background: none;
}

/* -----------------------------------------
   Splash Screen
----------------------------------------- */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #090a0f;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
}

.splash-content {
  text-align: center;
  animation: pulseLogo 2s infinite ease-in-out;
}

.splash-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 15px rgba(6, 182, 212, 0.6));
}

.splash-title {
  font-family: var(--font-accent);
  font-size: 2.2rem;
  letter-spacing: 6px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
}

.splash-subtitle {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 4px;
  font-weight: 500;
  margin-bottom: 30px;
}

.splash-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(6, 182, 212, 0.1);
  border-radius: 50%;
  border-top-color: #06b6d4;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.03); filter: brightness(1.15); }
}

/* -----------------------------------------
   App Layout
----------------------------------------- */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  max-width: 480px; /* Mobile width constraint on larger screens */
  margin: 0 auto;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
  position: relative;
  background-color: var(--bg-app);
}

/* Header */
.app-header {
  height: 56px;
  min-height: 56px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-glow);
  backdrop-filter: blur(15px);
  z-index: 100;
  transition: var(--trans-smooth);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  width: 28px;
  height: 28px;
}

.header-brand {
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 1.25rem;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--btn-secondary);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.icon-btn:active {
  transform: scale(0.9);
  background-color: var(--btn-secondary-hover);
}

/* Main Scroll Area */
.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 80px; /* Account for navbar + safe area */
  position: relative;
  -webkit-overflow-scrolling: touch;
}

/* Tab Switching Content */
.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Bottom Nav Bar */
.app-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(64px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background-color: var(--bg-nav);
  border-top: 1px solid var(--border-glow);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 200;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 20%;
  height: 100%;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--trans-smooth);
}

.nav-item i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.nav-item span {
  font-size: 0.7rem;
  font-weight: 500;
}

.nav-item.active {
  color: #06b6d4;
}

.dark-theme .nav-item.active {
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.nav-item.active i {
  transform: translateY(-2px) scale(1.1);
}

/* -----------------------------------------
   HOME TAB COMPONENTS
----------------------------------------- */
/* Hero Banner */
.hero-banner {
  height: 200px;
  position: relative;
  margin: 16px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
}

.hero-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 6s ease;
}

.hero-banner:hover .hero-bg {
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(9, 10, 15, 0.95) 10%, rgba(9, 10, 15, 0.2) 100%);
}

.hero-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--grad-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 30px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-glow);
}

.hero-title {
  font-size: 1.4rem;
  margin-bottom: 4px;
  color: #fff;
}

.hero-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-btn {
  background-color: #fff;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.hero-btn:active {
  transform: scale(0.95);
}

/* Category Grid */
.section-container {
  padding: 16px;
}

.section-title {
  font-size: 1.1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.cat-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: var(--trans-bounce);
}

.category-card:active .cat-icon-wrapper {
  transform: scale(0.9);
}

.w-bg { background: linear-gradient(135deg, #f472b6 0%, #e11d48 100%); }
.k-bg { background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%); }
.m-bg { background: linear-gradient(135deg, #f87171 0%, #dc2626 100%); }
.e-bg { background: linear-gradient(135deg, #34d399 0%, #059669 100%); }
.c-bg { background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%); }

.cat-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* District Grid (New) */
.district-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.district-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--trans-bounce);
}

.district-card:active {
  transform: scale(0.92);
  border-color: var(--border-active);
}

.dist-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--btn-secondary);
  color: #06b6d4;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  transition: var(--trans-smooth);
}

.dark-theme .dist-icon {
  background-color: rgba(6, 182, 212, 0.1);
}

.district-card:active .dist-icon {
  background: var(--grad-primary);
  color: white;
}

.dist-name {
  font-size: 0.78rem;
  font-weight: 700;
}

/* Suggestion Banner */
.suggestion-banner {
  background: var(--grad-primary);
  margin: 8px 16px;
  padding: 16px 20px;
  border-radius: 20px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-glow);
  cursor: pointer;
  transition: var(--trans-smooth);
}

.suggestion-banner:active {
  transform: scale(0.98);
}

.suggest-left h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.suggest-left p {
  font-size: 0.8rem;
  opacity: 0.85;
}

.suggest-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  backdrop-filter: blur(10px);
}

/* Lists and Cards */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.see-all {
  font-size: 0.75rem;
  color: #06b6d4;
  font-weight: 600;
  cursor: pointer;
}

.featured-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Restaurant Card Common Style */
.restaurant-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.restaurant-card:active {
  transform: scale(0.97);
  border-color: var(--border-active);
}

.card-img-wrapper {
  width: 80px;
  height: 80px;
  min-width: 80px;
  border-radius: 14px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-info {
  flex: 1;
  overflow: hidden;
}

.card-cat {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2px;
}

.card-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-ribbons {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ribbon-badge-text);
  background-color: var(--ribbon-badge-bg);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-heart-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  font-size: 1.05rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 50;
  transition: var(--trans-bounce);
}

.card-heart-btn:active {
  transform: scale(0.7);
}

.card-heart-btn.is-fav {
  color: #ff4e50;
  animation: heartPop 0.4s ease;
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* -----------------------------------------
   SEARCH TAB COMPONENTS
----------------------------------------- */
.search-header-sticky {
  position: sticky;
  top: 0;
  background-color: var(--bg-app);
  padding: 12px 16px 4px 16px;
  z-index: 90;
  border-bottom: 1px solid var(--border-glow);
  transition: background-color 0.4s ease;
}

.search-bar-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  transition: var(--trans-smooth);
}

.search-bar-wrapper:focus-within {
  border-color: #06b6d4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

.search-icon {
  color: var(--text-muted);
  font-size: 1.05rem;
}

#search-input {
  flex: 1;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 500;
}

#search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.clear-btn {
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
}

.clear-btn.visible {
  display: block;
}

/* Horizontal chips container common class */
.filter-chips-container {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 10px 0 2px 0;
  scrollbar-width: none; /* Firefox */
}

.filter-chips-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.chip, .chip-dist {
  white-space: nowrap;
  padding: 6px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 30px;
  background-color: var(--btn-secondary);
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--trans-smooth);
}

.chip.active, .chip-dist.active {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

/* Give extra margin to separate filter groups */
.category-chips-scroller {
  padding-bottom: 8px;
}

/* Results & Sorting Bar */
.results-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.results-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.sort-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.sort-select {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  cursor: pointer;
  padding-right: 18px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.sort-caret {
  position: absolute;
  right: 2px;
  font-size: 0.65rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* Grid layout for list */
.restaurant-list-container {
  padding: 16px;
}

.restaurant-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.no-results i {
  font-size: 3rem;
  margin-bottom: 16px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.no-results p {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
}

/* -----------------------------------------
   FAVORITES TAB COMPONENTS
----------------------------------------- */
.favorites-header {
  padding: 24px 20px 10px 20px;
}

.favorites-header h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fav-title-icon {
  color: #ff4e50;
}

.favorites-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.favorites-container {
  padding: 16px;
}

.action-btn {
  background: var(--grad-primary);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: var(--shadow-glow);
  cursor: pointer;
  transition: var(--trans-smooth);
}

.action-btn:active {
  transform: scale(0.95);
}

/* -----------------------------------------
   ROULETTE TAB COMPONENTS
----------------------------------------- */
.roulette-header {
  padding: 24px 20px 10px 20px;
  text-align: center;
}

.roulette-header h2 {
  font-size: 1.4rem;
}

.roulette-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.roulette-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

/* Slot Machine Frame */
.slot-machine-container {
  width: 100%;
  max-width: 320px;
  background: var(--grad-dark-glass);
  border: 4px solid #1e293b;
  border-radius: 30px;
  padding: 20px;
  box-shadow: var(--shadow-premium), 0 0 30px rgba(6, 182, 212, 0.1);
  position: relative;
  margin-bottom: 24px;
}

.dark-theme .slot-machine-container {
  border-color: #2e3b52;
}

.slot-frame {
  background-color: #090a0f;
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  height: 140px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9);
}

.slot-window {
  width: 90%;
  height: 100px;
  overflow: hidden;
  position: relative;
}

.slot-reel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.reel-item {
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: white;
}

.reel-item i {
  font-size: 2.2rem;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.reel-item.default-item span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.reel-item.food-item {
  animation: none;
}

.reel-item.food-item h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  padding: 0 10px;
}

.reel-item.food-item span {
  font-size: 0.72rem;
  background-color: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.slot-pointer {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 15px solid #ff4e50;
  z-index: 10;
  filter: drop-shadow(0 0 5px rgba(255, 78, 80, 0.5));
}

.machine-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.decor-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #334155;
}

.slot-machine-container.spinning .decor-light {
  animation: blinkLights 0.4s infinite alternate;
}

.slot-machine-container.spinning .decor-light.right {
  animation-delay: 0.2s;
}

@keyframes blinkLights {
  from { background-color: #06b6d4; box-shadow: 0 0 8px #06b6d4; }
  to { background-color: #8b5cf6; box-shadow: 0 0 8px #8b5cf6; }
}

.slot-machine-container.shake {
  animation: machineShake 0.15s infinite;
}

@keyframes machineShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(2px, 1px) rotate(0.5deg); }
  50% { transform: translate(-1px, -2px) rotate(-0.5deg); }
  75% { transform: translate(1px, 2px) rotate(0deg); }
}

.spin-btn {
  background: var(--grad-primary);
  color: white;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 14px 40px;
  border-radius: 35px;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
  cursor: pointer;
  transition: var(--trans-smooth);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.spin-btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 3px 10px rgba(6, 182, 212, 0.2);
}

.spin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Result Card */
.result-card-container {
  width: 100%;
  max-width: 320px;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpResult 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

.result-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ff9f43;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* -----------------------------------------
   Bottom Sheet Details Modal
----------------------------------------- */
.sheet-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(9, 10, 15, 0.6);
  backdrop-filter: blur(5px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.sheet-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 82%;
  background-color: var(--bg-app);
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.32, 0.94, 0.6, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
}

.bottom-sheet.open {
  transform: translateY(0);
}

.sheet-handle-wrapper {
  padding: 10px 0;
  width: 100%;
  display: flex;
  justify-content: center;
  cursor: grab;
}

.sheet-handle {
  width: 40px;
  height: 5px;
  border-radius: 10px;
  background-color: var(--text-muted);
  opacity: 0.4;
}

.sheet-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  background-color: rgba(9, 10, 15, 0.5);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(5px);
  z-index: 1010;
  transition: var(--trans-smooth);
}

.sheet-close-btn:active {
  transform: scale(0.9);
}

/* Sheet Scroll Area */
.sheet-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(30px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}

.sheet-hero {
  height: 180px;
  position: relative;
}

.sheet-hero-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.sheet-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--bg-app) 5%, rgba(0, 0, 0, 0.1) 100%);
}

.sheet-fav-btn {
  position: absolute;
  bottom: 15px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-glow);
  color: var(--text-muted);
  font-size: 1.3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: var(--trans-bounce);
  z-index: 1005;
}

.sheet-fav-btn:active {
  transform: scale(0.85);
}

.sheet-fav-btn.is-fav {
  color: #ff4e50;
  background-color: var(--bg-card);
}

.sheet-body {
  padding: 0 20px;
}

.sheet-header-info {
  margin-top: 10px;
  margin-bottom: 12px;
}

.sheet-category-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.sheet-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.sheet-ribbon-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ribbon-badge-text);
  background-color: var(--ribbon-badge-bg);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
}

.sheet-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--btn-secondary);
  padding: 4px 10px;
  border-radius: 30px;
  border: 1px solid var(--border-glow);
}

.sheet-desc-text {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Quick Action Buttons in Sheet */
.quick-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.action-btn-outline {
  border: 1px solid #ff4e50;
  color: #ff4e50;
  height: 48px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.action-btn-outline:active {
  background-color: rgba(255, 78, 80, 0.08);
  transform: scale(0.97);
}

.action-btn-primary {
  background: var(--grad-primary);
  color: white;
  height: 48px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
  transition: var(--trans-smooth);
}

.action-btn-primary:active {
  transform: scale(0.97);
}

.sheet-divider {
  border: none;
  height: 1px;
  background-color: var(--border-glow);
  margin: 20px 0;
}

.sheet-subtitle {
  font-size: 1.05rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sheet-subtitle i {
  color: #06b6d4;
}

/* Menu list style */
.sheet-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background-color: var(--btn-secondary);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
}

.menu-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.menu-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ff9f43;
}

.sheet-address-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* -----------------------------------------
   Media Query for Desktop view
----------------------------------------- */
@media (min-width: 481px) {
  body {
    background-color: #0f1015;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
