* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --orange: #FF6B35;
  --orange-dark: #E85520;
  --orange-light: #FFF0EB;
  --green: #2ECC71;
  --yellow: #F39C12;
  --red: #E74C3C;
  --dark: #1A1A2E;
  --dark2: #16213E;
  --text: #2D3436;
  --text-light: #636E72;
  --white: #FFFFFF;
  --card-bg: rgba(255, 255, 255, 0.95);
  --shadow: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 16px;
}

body {
  font-family: 'Baloo 2', 'Noto Sans Devanagari', sans-serif;
  background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
  min-height: 100vh;
  color: var(--text);
  overflow-x: hidden;
}

/* Animated Background */
.bg-pattern {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(46, 204, 113, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(52, 152, 219, 0.06) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  padding: 40px 0 30px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.logo-icon {
  font-size: 2.4rem;
  animation: pulse 2s ease-in-out infinite;
}

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

.logo {
  font-size: 3rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
}

.logo span {
  color: var(--orange);
}

.tagline {
  font-size: 1.3rem;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 6px;
}

.sub-tagline {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

/* Search Section */
.search-section {
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  gap: 8px;
  background: var(--card-bg);
  border-radius: 50px;
  padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow), 0 0 0 2px rgba(255,107,53,0.2);
  transition: box-shadow 0.3s;
}

.search-box:focus-within {
  box-shadow: var(--shadow), 0 0 0 3px rgba(255,107,53,0.5);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: 'Baloo 2', sans-serif;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #b2bec3;
  font-size: 0.9rem;
}

#searchBtn {
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

#searchBtn:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

#searchBtn:active {
  transform: translateY(0);
}

#searchBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-icon {
  font-size: 1.2rem;
}

.location-note {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-top: 10px;
}

/* Status */
.status {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
  font-size: 1rem;
  color: var(--text-light);
}

.status.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #eee;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.status.error {
  background: #FFF5F5;
  color: var(--red);
  border-left: 4px solid var(--red);
}

.status.info {
  background: #F0FFF4;
  color: #27AE60;
}

/* Results */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.results-header {
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  padding: 0 4px;
  margin-bottom: 4px;
}

.result-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideUp 0.4s ease both;
  border-left: 4px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card:nth-child(1) { animation-delay: 0.05s; border-left-color: var(--green); }
.result-card:nth-child(2) { animation-delay: 0.1s; border-left-color: var(--green); }
.result-card:nth-child(3) { animation-delay: 0.15s; border-left-color: var(--yellow); }
.result-card:nth-child(4) { animation-delay: 0.2s; border-left-color: var(--yellow); }
.result-card:nth-child(n+5) { animation-delay: 0.25s; border-left-color: #DDD; }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.shop-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  flex: 1;
}

.probability-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}

.prob-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: white;
  position: relative;
}

.prob-high { background: linear-gradient(135deg, #27AE60, #2ECC71); }
.prob-mid  { background: linear-gradient(135deg, #E67E22, #F39C12); }
.prob-low  { background: linear-gradient(135deg, #C0392B, #E74C3C); }

.prob-label {
  font-size: 0.65rem;
  color: var(--text-light);
  margin-top: 2px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-light);
}

.meta-chip {
  background: #F8F9FA;
  border-radius: 20px;
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-chip.distance {
  background: var(--orange-light);
  color: var(--orange-dark);
  font-weight: 600;
}

.reason-text {
  font-size: 0.82rem;
  color: var(--text-light);
  font-style: italic;
  border-top: 1px solid #F0F0F0;
  padding-top: 8px;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  flex: 1;
  min-width: 120px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Baloo 2', sans-serif;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  transition: all 0.2s;
}

.action-btn.directions {
  background: var(--orange);
  color: white;
}

.action-btn.directions:hover {
  background: var(--orange-dark);
}

.action-btn.call {
  background: #E8F8F0;
  color: #27AE60;
}

.action-btn.call:hover {
  background: #D0F0E0;
}

.action-btn.disabled {
  background: #F8F9FA;
  color: #CCC;
  cursor: default;
}

/* Add Shop CTA */
.add-shop-cta {
  margin-top: 24px;
  background: linear-gradient(135deg, rgba(255,107,53,0.15), rgba(255,107,53,0.05));
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: var(--radius);
  padding: 16px;
}

.cta-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-icon {
  font-size: 2rem;
}

.cta-content > div {
  flex: 1;
  min-width: 200px;
}

.cta-content strong {
  color: var(--white);
  display: block;
  font-size: 0.95rem;
}

.cta-content p {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  margin-top: 2px;
}

.cta-btn {
  background: var(--orange);
  color: white;
  border-radius: 8px;
  padding: 10px 18px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: background 0.2s;
}

.cta-btn:hover {
  background: var(--orange-dark);
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 32px;
  color: rgba(255,255,255,0.3);
  font-size: 0.78rem;
}

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

/* Mobile */
@media (max-width: 480px) {
  .logo { font-size: 2.2rem; }
  .tagline { font-size: 1.1rem; }
  .search-box { padding: 4px 4px 4px 14px; }
  #searchBtn { padding: 10px 16px; font-size: 0.9rem; }
  .btn-text { display: none; }
  .prob-circle { width: 46px; height: 46px; font-size: 0.85rem; }
  .card-actions { gap: 6px; }
}
