@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Tailwind CSS CDN will be loaded, this is for custom styles */

:root {
  --green-900: #1B4D3E;
  --green-500: #2ECC71;
  --green-100: #D5F5E3;
  --gray-900: #1A1A1A;
  --gray-500: #666666;
  --gray-200: #E5E5E5;
  --gray-100: #F5F5F5;
  --red-500: #E74C3C;
  --yellow-500: #F1C40F;
  --white: #FFFFFF;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  touch-action: pan-y;
}

/* Prevent pull-to-refresh on mobile */
body {
  overscroll-behavior-y: contain;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-200);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Button press effect */
.btn-press {
  transition: transform 0.1s ease;
}

.btn-press:active {
  transform: scale(0.98);
}

/* Loading spinner */
.spinner {
  border: 3px solid var(--gray-200);
  border-top-color: var(--green-900);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.8s linear infinite;
}

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

/* Card hover effect */
.card-hover {
  transition: all 0.2s ease;
  cursor: pointer;
}

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

.card-hover:active {
  transform: translateY(0);
}

/* Category badges */
.badge-fitness { background-color: #FF6B6B; color: white; }
.badge-study { background-color: #4ECDC4; color: white; }
.badge-habits { background-color: #95E1D3; color: #1A1A1A; }
.badge-health { background-color: #A8E6CF; color: #1A1A1A; }
.badge-finance { background-color: #FFD3B6; color: #1A1A1A; }
.badge-other { background-color: #FFAAA5; color: white; }

/* Status colors */
.status-active { color: var(--green-500); }
.status-finished { color: var(--gray-500); }
.status-open { color: #3498db; }

/* Animations */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Bottom navigation safe area for iOS */
.bottom-nav {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Camera preview styles */
.camera-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Reaction buttons */
.reaction-btn {
  transition: all 0.2s ease;
}

.reaction-btn:hover {
  transform: scale(1.2);
}

.reaction-btn.active {
  animation: bounce 0.3s ease;
}

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

/* Dispute card */
.dispute-card {
  background: linear-gradient(135deg, #FFF9E6 0%, #FFF5CC 100%);
  border-left: 4px solid var(--yellow-500);
}

/* Mobile-first utilities */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Tab indicator */
.tab-active {
  position: relative;
}

.tab-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--green-900);
}

/* Floating action button */
.fab {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--green-900);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 40;
  transition: all 0.3s ease;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.fab:active {
  transform: scale(0.95);
}

/* PWA install prompt */
.install-prompt {
  position: fixed;
  bottom: 100px;
  left: 20px;
  right: 20px;
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 50;
  animation: slideUp 0.3s ease-out;
}