:root {
  --orange: #FF9F43;
  --orange-dark: #E8890B;
  --pink: #FFB6C1;
  --pink-light: #FFE4E8;
  --mint: #98D8C8;
  --cream: #FFF9F0;
  --cream-dark: #FFF0E0;
  --green: #4CAF50;
  --text-dark: #2D3436;
  --text-light: #636E72;
}

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

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

.app {
  position: relative;
  min-height: 100vh;
}

/* Floating Paws Background */
.floating-paws {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-paw {
  position: absolute;
  font-size: 24px;
  opacity: 0.1;
  animation: floatPaw 8s ease-in-out infinite;
}

@keyframes floatPaw {
  0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.1; }
  90% { opacity: 0.1; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--orange) 0%, var(--pink) 100%);
  padding: 20px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
}

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

.logo-icon {
  font-size: 36px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.logo-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.tagline {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  margin-bottom: 12px;
}

.subscribed-badge {
  display: inline-block;
  background: white;
  color: var(--orange);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header-btn {
  background: white;
  color: var(--orange);
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Hero Section */
.hero {
  background: linear-gradient(180deg, var(--pink-light) 0%, var(--cream) 100%);
  padding: 40px 20px;
  text-align: center;
  position: relative;
  z-index: 5;
}

.hero-pets {
  font-size: 48px;
  margin-bottom: 16px;
  animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

.hero-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
  line-height: 1.3;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stat {
  background: white;
  padding: 16px 24px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(255, 159, 67, 0.15);
  min-width: 100px;
}

.stat-number {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--orange);
}

.stat-label {
  font-size: 12px;
  color: var(--text-light);
}

.hero-cta {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 25px rgba(255, 159, 67, 0.4);
}

.hero-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(255, 159, 67, 0.5);
}

.hero-cta:active {
  transform: translateY(-1px) scale(0.98);
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 5;
}

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

.search-input {
  width: 100%;
  padding: 16px 24px;
  border: 2px solid var(--pink-light);
  border-radius: 50px;
  font-size: 16px;
  font-family: 'Nunito', sans-serif;
  background: white;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 4px 20px rgba(255, 159, 67, 0.2);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.filter-tab {
  flex-shrink: 0;
  background: white;
  border: 2px solid var(--pink-light);
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-tab:hover {
  border-color: var(--orange);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--orange) 0%, var(--pink) 100%);
  border-color: transparent;
  color: white;
}

/* Filter Row */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-btn {
  background: var(--cream-dark);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background: var(--pink-light);
}

.category-btn.active {
  background: var(--mint);
  color: var(--text-dark);
}

.sort-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.favorites-toggle {
  background: white;
  border: 2px solid var(--pink-light);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.favorites-toggle.active {
  background: var(--pink);
  border-color: var(--pink);
  color: white;
}

.sort-select {
  padding: 8px 16px;
  border: 2px solid var(--pink-light);
  border-radius: 20px;
  font-size: 13px;
  font-family: 'Nunito', sans-serif;
  background: white;
  cursor: pointer;
}

/* Featured Deal */
.featured-deal {
  background: linear-gradient(135deg, #FFF5E6 0%, #FFE4F0 100%);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 30px rgba(255, 159, 67, 0.15);
  position: relative;
  overflow: hidden;
}

.featured-label {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--orange);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.featured-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  padding-top: 30px;
}

.featured-emoji {
  font-size: 64px;
  flex-shrink: 0;
}

.featured-info {
  flex: 1;
  min-width: 200px;
}

.featured-info h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 24px;
  margin-bottom: 8px;
}

.featured-info p {
  color: var(--text-light);
  margin-bottom: 12px;
}

.featured-timer {
  font-size: 14px;
}

.timer-value {
  font-weight: 700;
  color: var(--orange);
  font-family: 'JetBrains Mono', monospace;
}

.featured-action {
  text-align: center;
}

.featured-price {
  margin-bottom: 12px;
}

.featured-price .original {
  text-decoration: line-through;
  color: var(--text-light);
  font-size: 16px;
  margin-right: 8px;
}

.featured-price .discounted {
  color: var(--green);
  font-size: 28px;
  font-weight: 700;
}

.featured-btn {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.featured-btn:hover {
  transform: scale(1.05);
}

/* Savings Tracker */
.savings-tracker {
  background: white;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.savings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.savings-amount {
  font-family: 'Fredoka', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--green);
}

.progress-bar {
  height: 12px;
  background: var(--cream-dark);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mint) 0%, var(--green) 100%);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.savings-goal {
  font-size: 13px;
  color: var(--text-light);
  text-align: right;
}

/* Deals Grid */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Deal Card */
.deal-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.deal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(255, 159, 67, 0.15);
}

.deal-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, var(--orange) 0%, #FFD700 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

.favorite-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

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

.favorite-btn.favorite-active {
  animation: heartBeat 0.3s ease;
}

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

.deal-emoji {
  font-size: 56px;
  text-align: center;
  margin: 20px 0 16px;
}

.deal-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
}

.deal-category {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 8px;
}

.deal-description {
  font-size: 14px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 16px;
}

.deal-pricing {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.original-price {
  text-decoration: line-through;
  color: var(--text-light);
  font-size: 16px;
}

.discounted-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--green);
}

.savings-tag {
  background: var(--mint);
  color: var(--text-dark);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.copy-code-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--orange) 0%, var(--pink) 100%);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-code-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 159, 67, 0.3);
}

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

/* No Results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.no-results-emoji {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: 24px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal-pets {
  font-size: 40px;
  text-align: center;
  margin-bottom: 16px;
  animation: wiggle 2s ease-in-out infinite;
}

.modal-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 28px;
  text-align: center;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 24px;
}

.modal-form {
  margin-bottom: 24px;
}

.modal-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--pink-light);
  border-radius: 50px;
  font-size: 16px;
  font-family: 'Nunito', sans-serif;
  margin-bottom: 16px;
  transition: border-color 0.3s ease;
}

.modal-input:focus {
  outline: none;
  border-color: var(--orange);
}

.modal-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 159, 67, 0.4);
}

.modal-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.benefits-list {
  list-style: none;
}

.benefits-list li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-dark);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  z-index: 1001;
  animation: toastSlide 0.3s ease;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.toast-success {
  background: linear-gradient(135deg, var(--green) 0%, #2E7D32 100%);
}

.toast-info {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1002;
  overflow: hidden;
}

.confetti-particle {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: confettiFall 2s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 40px 20px;
  margin-top: 60px;
  position: relative;
  z-index: 5;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.social-icon {
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.2) rotate(10deg);
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin-bottom: 12px;
}

.footer-credit {
  color: var(--pink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-credit:hover {
  color: var(--orange);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 24px;
  }
  
  .hero-stats {
    gap: 12px;
  }
  
  .stat {
    padding: 12px 16px;
    min-width: 80px;
  }
  
  .stat-number {
    font-size: 22px;
  }
  
  .featured-content {
    flex-direction: column;
    text-align: center;
  }
  
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .category-filters {
    justify-content: center;
  }
  
  .sort-controls {
    justify-content: center;
  }
  
  .deals-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    padding: 30px 24px;
  }
}

@media (min-width: 1024px) {
  .deals-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}