@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --card-bg: #ffffff;
  --text-primary: #1e2a3a;
  --text-secondary: #5a6c7d;
  --border-color: #e9ecef;
  --primary-color: #0077b6;
  --primary-hover: #005f92;
  --primary-light: rgba(0, 119, 182, 0.08);
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-nav: 0 -2px 10px rgba(0, 0, 0, 0.05);
  --shadow-focus: 0 0 0 3px rgba(0, 119, 182, 0.2);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #f1f3f5;
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

/* App Wrapper for Phone Aspect Ratio on Desktop */
.app-container {
  width: 100%;
  max-width: 428px;
  height: 100vh;
  min-height: 550px;
  background-color: var(--bg-primary);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

@media (min-width: 435px) {
  .app-container {
    height: 850px;
    border-radius: 30px;
    border: 8px solid #1e2a3a;
  }
}

/* Scrollable Container without visible Scrollbar */
.scrollable {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  padding: 20px 16px 90px 16px;
  background-color: var(--bg-secondary);
}

.scrollable::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* App Bar / Header */
.app-header {
  height: 60px;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
  flex-shrink: 0;
}

.app-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 1.5px;
}

.logo-text span {
  color: var(--primary-color);
}

.logo-img {
  max-height: 30px;
  object-fit: contain;
  vertical-align: middle;
}

.header-action {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.header-action:hover {
  background-color: var(--bg-secondary);
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  box-shadow: var(--shadow-nav);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 10;
  padding: 0 10px;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  transition: color 0.3s ease, font-weight 0.3s ease;
  cursor: pointer;
  background: none;
  border: none;
  gap: 2px;
  width: 65px;
  height: 100%;
  justify-content: center;
  position: relative;
}

.nav-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.nav-svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-secondary);
  transition: stroke 0.3s ease, transform 0.3s ease;
}

.nav-label {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hover & Active States */
.nav-item:hover {
  color: var(--primary-color);
}

.nav-item:hover .nav-icon-container {
  transform: translateY(-3px);
}

.nav-item:hover .nav-svg {
  stroke: var(--primary-color);
}

.nav-item.active {
  color: var(--primary-color);
  font-weight: 700;
}

.nav-item.active .nav-icon-container {
  background-color: var(--bg-primary);
  border: 2px solid var(--primary-color);
  border-radius: 40%;
  width: 44px;
  height: 44px;
  transform: translateY(-8px);
  box-shadow: 0 4px 0 var(--primary-color), 0 4px 8px rgba(0, 119, 182, 0.15);
}

.nav-item.active .nav-svg {
  stroke: var(--primary-color);
  transform: scale(1.05);
}

/* Tactile Pressed 3D click feedback */
.nav-item:active .nav-icon-container {
  transform: translateY(-2px);
  box-shadow: 0 2px 0 var(--primary-color), 0 2px 4px rgba(0, 119, 182, 0.15);
}

/* 3D block colored line at the bottom of active item */
.nav-item::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 20px;
  height: 3px;
  border-radius: 1.5px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item.active::after {
  transform: scaleX(1);
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  padding: 16px;
  margin-bottom: 16px;
  transition: var(--transition-normal);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* Forms & Input fields */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background-color: var(--bg-primary);
  border: 1px solid #ced4da;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-focus);
}

textarea.form-control {
  min-height: 100px;
  resize: none;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary-color);
  padding: 8px;
  width: auto;
  font-size: 14px;
}

.btn-text:hover {
  text-decoration: underline;
}

/* Category Chips */
.chips-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chips-container::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--radius-lg);
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.chip.active {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* Badge and Rating Stars */
.rating-stars {
  color: #ffb703;
  display: flex;
  align-items: center;
  gap: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.badge-info {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

/* Chat styles */
.message-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.message-sent {
  background-color: var(--primary-color);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.message-received {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

/* Search bar styling */
.search-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.search-input {
  padding-left: 40px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 16px;
  pointer-events: none;
}

/* Animations */
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-fade-in {
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-secondary { color: var(--text-secondary); }

/* Premium Glassmorphic Notification Toast */
.toast-notification {
  position: absolute;
  top: 70px;
  left: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 119, 182, 0.18);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 999;
  transform: translateY(-120px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 22px;
  background: var(--primary-light);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
