/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ===== CSS Custom Properties ===== */
:root {
  /* F1-inspired color palette */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(20, 20, 35, 0.7);
  --bg-card-hover: rgba(30, 30, 50, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  --accent-red: #e10600;
  --accent-red-glow: rgba(225, 6, 0, 0.4);
  --accent-orange: #ff6b35;
  --accent-yellow: #ffd700;
  --accent-cyan: #00d2ff;
  --accent-purple: #9b59b6;
  --accent-green: #2ecc71;

  --text-primary: #f0f0f5;
  --text-secondary: #8a8a9a;
  --text-muted: #55556a;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(225, 6, 0, 0.3);

  --gradient-hero: linear-gradient(135deg, #e10600 0%, #ff6b35 50%, #ffd700 100%);
  --gradient-card: linear-gradient(145deg, rgba(225, 6, 0, 0.08), rgba(255, 107, 53, 0.04));
  --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 16px 48px rgba(225, 6, 0, 0.15);
  --shadow-glow: 0 0 40px rgba(225, 6, 0, 0.2);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-primary: 'Outfit', sans-serif;
  --font-mono: 'Space Grotesk', monospace;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== Animated Background ===== */
.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-pattern::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse 600px 300px at 20% 30%, rgba(225, 6, 0, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 80% 60%, rgba(0, 210, 255, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 500px 250px at 50% 80%, rgba(155, 89, 182, 0.04) 0%, transparent 70%);
  animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-30px, 20px) rotate(1deg); }
  66% { transform: translate(20px, -15px) rotate(-1deg); }
}

/* Racing stripes */
.racing-stripe {
  position: fixed;
  width: 3px;
  height: 100vh;
  background: linear-gradient(180deg, transparent 0%, var(--accent-red) 20%, var(--accent-red) 80%, transparent 100%);
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
}

.racing-stripe:nth-child(1) { left: 10%; animation: stripeGlow 4s ease-in-out infinite; }
.racing-stripe:nth-child(2) { left: 10.4%; animation: stripeGlow 4s ease-in-out 0.2s infinite; }
.racing-stripe:nth-child(3) { right: 10%; animation: stripeGlow 4s ease-in-out 1s infinite; }
.racing-stripe:nth-child(4) { right: 10.4%; animation: stripeGlow 4s ease-in-out 1.2s infinite; }

@keyframes stripeGlow {
  0%, 100% { opacity: 0.04; }
  50% { opacity: 0.1; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: rgba(225, 6, 0, 0.4);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-red);
}

/* ===== Main Container ===== */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  margin: 0 -24px;
  padding: 16px 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-hero);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 20px var(--accent-red-glow);
  transition: var(--transition-smooth);
}

.nav-logo:hover .nav-logo-icon {
  transform: rotate(-5deg) scale(1.05);
  box-shadow: 0 6px 30px var(--accent-red-glow);
}

.nav-logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-logo-text span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.nav-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(225, 6, 0, 0.1);
}

.nav-btn.primary {
  background: var(--accent-red);
  color: white;
  border-color: transparent;
}

.nav-btn.primary:hover {
  background: #ff1a14;
  box-shadow: 0 4px 25px var(--accent-red-glow);
  transform: translateY(-1px);
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 80px 0 60px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(225, 6, 0, 0.1);
  border: 1px solid rgba(225, 6, 0, 0.2);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-red);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fadeInDown 0.8s ease-out;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero h1 .gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Search Bar ===== */
.search-container {
  max-width: 600px;
  margin: 0 auto 20px;
  position: relative;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

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

.search-icon {
  position: absolute;
  left: 20px;
  color: var(--text-muted);
  font-size: 20px;
  transition: var(--transition-smooth);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 18px 60px 18px 54px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  outline: none;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 4px rgba(225, 6, 0, 0.1), var(--shadow-glow);
  background: var(--bg-card-hover);
}

.search-input:focus ~ .search-icon {
  color: var(--accent-red);
}

.search-clear {
  position: absolute;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition-fast);
  opacity: 0;
  pointer-events: none;
}

.search-clear.visible {
  opacity: 1;
  pointer-events: auto;
}

.search-clear:hover {
  background: rgba(225, 6, 0, 0.15);
  color: var(--accent-red);
}

/* ===== Stats Bar ===== */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 48px;
  animation: fadeInUp 0.8s ease-out 0.35s both;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* ===== Category Filters ===== */
.filters-section {
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.filters-scroll {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 4px 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
  user-select: none;
}

.filter-chip:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.filter-chip.active {
  background: rgba(225, 6, 0, 0.15);
  color: var(--accent-red);
  border-color: rgba(225, 6, 0, 0.3);
  box-shadow: 0 4px 15px rgba(225, 6, 0, 0.1);
}

.filter-chip .chip-count {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.filter-chip.active .chip-count {
  background: rgba(225, 6, 0, 0.2);
  color: var(--accent-red);
}

/* ===== Results Info ===== */
.results-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 4px;
}

.results-count {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.results-count span {
  color: var(--text-primary);
  font-weight: 700;
}

.sort-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sort-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

/* ===== Meme Grid ===== */
.meme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

/* ===== Meme Card ===== */
.meme-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
  backdrop-filter: blur(10px);
  animation: cardFadeIn 0.5s ease-out both;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.meme-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card-hover);
  background: var(--bg-card-hover);
}

.meme-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.meme-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.meme-card:hover .meme-card-image img {
  transform: scale(1.08);
}

.meme-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 10, 15, 0.9) 100%);
  opacity: 0;
  transition: var(--transition-smooth);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.meme-card:hover .meme-card-overlay {
  opacity: 1;
}

.overlay-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

.overlay-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  backdrop-filter: blur(8px);
}

.overlay-btn:hover {
  background: var(--accent-red);
  border-color: transparent;
}

.meme-card-category {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.meme-card-body {
  padding: 20px;
}

.meme-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meme-card-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.meme-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.meme-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.meme-tag {
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.meme-card-likes {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition-fast);
}

.meme-card-likes.liked {
  color: var(--accent-red);
}

.meme-card-likes:hover {
  color: var(--accent-red);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 15px;
  color: var(--text-muted);
}

/* ===== Lightbox / Modal ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 900px;
  max-height: 90vh;
  width: 90%;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transform: scale(0.9) translateY(20px);
  transition: var(--transition-bounce);
}

.lightbox.active .lightbox-content {
  transform: scale(1) translateY(0);
}

.lightbox-image {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: var(--bg-primary);
}

.lightbox-info {
  padding: 28px;
}

.lightbox-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.lightbox-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.lightbox-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.lightbox-tag {
  padding: 6px 14px;
  background: rgba(225, 6, 0, 0.1);
  border: 1px solid rgba(225, 6, 0, 0.15);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--accent-red);
  font-weight: 500;
}

.lightbox-actions {
  display: flex;
  gap: 12px;
}

.lightbox-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
}

.lightbox-btn.share {
  background: var(--accent-red);
  color: white;
}

.lightbox-btn.share:hover {
  background: #ff1a14;
  box-shadow: 0 4px 20px var(--accent-red-glow);
}

.lightbox-btn.download {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.lightbox-btn.download:hover {
  background: var(--bg-glass-hover);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}

.lightbox-close:hover {
  background: var(--accent-red);
  transform: rotate(90deg);
}

/* ===== Random Meme FAB ===== */
.fab-random {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  background: var(--accent-red);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 30px var(--accent-red-glow);
  transition: var(--transition-smooth);
  animation: fabPulse 3s ease-in-out infinite;
}

@keyframes fabPulse {
  0%, 100% { box-shadow: 0 8px 30px var(--accent-red-glow); }
  50% { box-shadow: 0 8px 50px rgba(225, 6, 0, 0.5); }
}

.fab-random:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 40px rgba(225, 6, 0, 0.5);
}

.fab-random:active {
  transform: translateY(-2px) scale(0.98);
}

.fab-random .dice-icon {
  font-size: 20px;
  transition: var(--transition-smooth);
}

.fab-random:hover .dice-icon {
  animation: diceRoll 0.5s ease-in-out;
}

@keyframes diceRoll {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
  100% { transform: rotate(0deg); }
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 40px;
}

.footer-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.footer-text a {
  color: var(--accent-red);
  text-decoration: none;
  font-weight: 600;
}

.footer-text a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

/* ===== Toast Notification ===== */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 14px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .app-container {
    padding: 0 16px;
  }

  .navbar {
    padding: 12px 16px;
    margin: 0 -16px;
  }

  .nav-logo-text {
    font-size: 18px;
  }

  .nav-btn span {
    display: none;
  }

  .hero {
    padding: 50px 0 40px;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .hero p {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .stats-bar {
    gap: 24px;
    margin-bottom: 32px;
  }

  .stat-value {
    font-size: 22px;
  }

  .search-input {
    padding: 16px 50px 16px 48px;
    font-size: 15px;
  }

  .meme-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .filters-scroll {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .filters-scroll::-webkit-scrollbar {
    display: none;
  }

  .fab-random {
    bottom: 20px;
    right: 20px;
    padding: 14px 20px;
    font-size: 14px;
  }

  .fab-random span:not(.dice-icon) {
    display: none;
  }

  .lightbox-content {
    width: 95%;
    border-radius: var(--radius-lg);
  }

  .lightbox-info {
    padding: 20px;
  }

  .lightbox-title {
    font-size: 20px;
  }

  .racing-stripe {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 36px;
  }

  .stats-bar {
    gap: 16px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 10px;
  }

  .filter-chip {
    padding: 8px 14px;
    font-size: 12px;
  }
}
