/* SVG Gallery - Integrated with Main Site Design */
:root {
  /* Use main site variables for consistency */
  --primary-color: #fe8887;
  --primary-hover: #ff6b6b;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-light: #999999;
  --text-muted: #999999;
  --background: #ffffff;
  --background-alt: #f8f9fa;
  --background-hover: #f1f3f4;
  --border: #e1e5e9;
  --border-hover: #d1d5db;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.1);
  --gradient: linear-gradient(135deg, #fe8887 0%, #ff6b6b 100%);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
.header {
  background: var(--background);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Header top section with back button */
.header-top {
  position: fixed;
  top: 2rem;
  left: 2rem;
  right: 2rem;
  z-index: 9999;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Back button */
.back-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  min-width: 35px;
  text-align: center;
  justify-content: center;
}

.back-button:not([style*="display: none"]) {
  display: flex;
}

.back-button:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.back-button:active {
  transform: translateY(0);
}

.back-button svg {
  width: 16px;
  height: 16px;
  transition: var(--transition);
}

/* Contact button */
.contact-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  min-width: 35px;
  text-align: center;
  justify-content: center;
}

.contact-button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(254, 136, 135, 0.35);
}

.contact-button:active {
  transform: translateY(0);
}

.contact-button svg {
  width: 16px;
  height: 16px;
  transition: var(--transition);
}

.back-button:hover svg {
  transform: translateX(-2px);
}

/* Плаваючий ефект при прокрутці */
.back-button.scrolled {
  top: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

/* Мобільні пристрої */
@media (max-width: 768px) {
  .header-top {
    top: 1rem;
    left: 1rem;
  }
  
  .back-button {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: 35px;
  }
  
  .back-button.scrolled {
    top: 0.5rem;
  }
}

@media (max-width: 480px) {
  .header-top {
    left: 0.5rem;
    right: 0.5rem;
  }
  
  .back-button {
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    min-width: auto;
    text-align: center;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
  }
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  margin-bottom: 1rem;
  position: relative;
}

.logo img {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 4px 12px rgba(254, 136, 135, 0.2));
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 300;
}

/* Main Content */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem;
}

/* Search */
.search-container {
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
}

.search-box {
  width: 100%;
  max-width: 500px;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-card);
}

.search-box:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(254, 136, 135, 0.1);
  transform: translateY(-1px);
}

.search-box::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.controls label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.items-select {
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
}

.items-select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(254, 136, 135, 0.1);
}

.items-select option {
  background: var(--background);
  color: var(--text-primary);
  padding: 0.5rem;
  border: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.items-select option:hover {
  background: var(--background-hover);
  color: var(--primary-color);
}

.items-select option:checked {
  background: var(--primary-color);
  color: white;
}


/* Category Filter */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0 1rem;
}

.category-btn {
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.category-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.category-btn.active {
  background: var(--gradient);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 8px rgba(254, 136, 135, 0.3);
}

.category-btn.active:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(254, 136, 135, 0.4);
}

/* Stats Container */
.stats-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Stats */
.stats {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  flex: 1;
}

.stats strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Animation Card */
.animation-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-card);
  position: relative;
}

.animation-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.animation-card:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(254, 136, 135, 0.2);
}

.card-preview {
  height: 180px;
  background: linear-gradient(135deg, var(--background-alt) 0%, #f1f3f4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(254, 136, 135, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.animation-card:hover .card-preview::before {
  transform: translateX(100%);
}

.preview-icon {
  font-size: 2rem;
  color: var(--primary-color);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.animation-card:hover .preview-icon {
  transform: scale(1.1);
  opacity: 1;
}

.preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: all 0.3s ease;
  background: var(--background-alt);
  border-radius: var(--radius-sm);
}

.animation-card:hover .preview-image {
  transform: scale(1.05);
}

/* Enhanced preview styles */
.preview-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

/* Different aspect ratio handling */
.preview-image[src*="Screenshot"] {
  object-fit: contain;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
}

/* For very wide screenshots */
.preview-image[src*="Screenshot"] {
  max-height: 160px;
  width: auto;
}

/* For very tall screenshots */
.preview-image[src*="Screenshot"] {
  max-width: 100%;
  height: auto;
}

/* Special handling for different screenshot types */
.preview-image[src*="Screenshot"] {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
}

/* Lottie Animation Preview Styles */
.preview-lottie {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background-alt);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.lottie-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.lottie-container svg {
  z-index: 2;
  position: relative;
  width: 100%;
  height: 100%;
}

/* Hide placeholder when animation is loaded */
.lottie-container:has(svg) .lottie-placeholder {
  display: none !important;
  visibility: hidden !important;
}

.lottie-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-primary);
  padding: 1rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background-alt);
  border-radius: var(--radius-sm);
  z-index: 1;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  pointer-events: none;
}

.lottie-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  animation: pulse 2s infinite;
}

.lottie-text {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.9;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.animation-card:hover .preview-lottie {
  transform: scale(1.05);
}

.animation-card:hover .lottie-icon {
  animation-duration: 1s;
}

/* Video Preview Styles */
.preview-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--background-alt);
  border-radius: var(--radius-sm);
}

.animation-card:hover .preview-video {
  transform: scale(1.05);
}

/* Hover effect for screenshots */
.animation-card:hover .preview-image[src*="Screenshot"] {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

/* Loading state for images */
.preview-image {
  opacity: 0;
  animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Fallback styles */
.preview-fallback {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--background-alt) 0%, #f1f3f4 100%);
}

.card-content {
  padding: 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.25rem 1.25rem;
}

.view-btn {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(254, 136, 135, 0.3);
}

.view-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(254, 136, 135, 0.4);
}

.category-tag {
  background: var(--background-alt);
  color: var(--text-secondary);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

/* Loading */
.loading {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.spinner {
  border: 3px solid var(--border);
  border-radius: 50%;
  border-top: 3px solid var(--primary-color);
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* No Results */
.no-results {
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem 2rem;
  font-size: 1rem;
  font-weight: 500;
}

.no-results::before {
  content: '🔍';
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Back Button */
.back-btn {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  background: var(--gradient);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
  z-index: 1000;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.back-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.back-btn.show {
  display: block;
}

/* Animation Info */
.animation-info {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--background);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  max-width: 280px;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.animation-info h3 {
  margin: 0 0 0.5rem 0;
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 600;
}

.animation-info p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Fade In Animation */
.fade-in {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.pagination-btn {
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 40px;
  text-align: center;
}

.pagination-btn:hover:not(.disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.pagination-btn.active {
  background: var(--gradient);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 8px rgba(254, 136, 135, 0.3);
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.pagination-dots {
  color: var(--text-light);
  padding: 0 0.5rem;
  font-size: 0.9rem;
}

/* Mini Footer */
.mini-footer {
  background: var(--background);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.brand-text {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.brand-text:hover {
  color: var(--primary-hover);
}

.footer-separator {
  color: var(--text-light);
  font-weight: 300;
}

.footer-tagline {
  color: var(--text-secondary);
  font-weight: 400;
}

.admin-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.admin-link:hover {
  opacity: 1;
  color: var(--primary-color);
}

.footer-stats {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 400;
}

.footer-legal {
  max-width: 1200px;
  margin: 1rem auto 0;
  padding: 0 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.copyright-notice {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.usage-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.removal-notice {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 600px;
  margin: 0.5rem auto 0;
  text-align: center;
  font-style: italic;
}

/* ========================================
   RESPONSIVE DESIGN - TABLET & MOBILE
======================================== */

/* Tablet styles (768px and below) */
@media (max-width: 768px) {
  .header {
    padding: 1.5rem 0;
  }
  
  /* Back button tablet styles */
  .header-top {
    top: 0.75rem;
    left: 1.5rem;
  }
  
  .back-button {
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
  }
  
  .header-content {
    padding: 0 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .logo img {
    width: 60px;
    height: 60px;
  }
  
  .container {
    padding: 1.5rem 1rem;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .card-preview {
    height: 170px;
  }
  
  .preview-image[src*="Screenshot"] {
    max-height: 150px;
  }
  
  .animation-info {
    top: 4rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
  
  .back-btn {
    top: 1rem;
    left: 1rem;
  }
  
  .category-filter {
    gap: 0.375rem;
    margin-top: 1rem;
  }
  
  .category-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .stats-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .controls {
    gap: 0.5rem;
    align-self: flex-end;
  }
  
  .controls label {
    font-size: 0.85rem;
  }
  
  .items-select {
    padding: 0.4rem 1.8rem 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: 70px;
    background-position: right 0.4rem center;
    background-size: 0.9rem;
  }
  
  .items-select option {
    background: var(--background);
    color: var(--text-primary);
    padding: 0.4rem;
    font-size: 0.8rem;
  }
  
  .pagination {
    gap: 0.25rem;
    margin: 1.5rem 0;
  }
  
  .pagination-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: 35px;
  }
  
  .mini-footer {
    padding: 1rem 0;
    margin-top: 2rem;
  }
  
  .footer-content {
    padding: 0 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .footer-brand {
    font-size: 0.85rem;
  }
  
  .brand-text {
    font-size: 0.9rem;
  }
  
  .footer-legal {
    margin-top: 0.75rem;
    padding: 0 1rem;
    padding-top: 0.75rem;
  }
  
  .copyright-notice {
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
  }
  
  .usage-disclaimer {
    font-size: 0.7rem;
    line-height: 1.3;
  }
  
  .removal-notice {
    font-size: 0.7rem;
    line-height: 1.3;
    margin-top: 0.4rem;
  }
}

/* Mobile styles (480px and below) */
@media (max-width: 480px) {
  .header {
    padding: 1rem 0;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  .logo img {
    width: 50px;
    height: 50px;
  }
  
  .container {
    padding: 1rem 0.75rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .card-preview {
    height: 160px;
  }
  
  .preview-image[src*="Screenshot"] {
    max-height: 140px;
  }
  
  .search-box {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
  
  .card-content {
    padding: 1rem;
  }
  
  .card-actions {
    padding: 0 1rem 1rem;
  }
  
  .category-filter {
    gap: 0.25rem;
    margin-top: 0.75rem;
    padding: 0 0.5rem;
  }
  
  .category-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
  }
  
  .stats-container {
    gap: 0.5rem;
  }
  
  .controls {
    gap: 0.4rem;
    align-self: stretch;
    justify-content: center;
  }
  
  .controls label {
    font-size: 0.8rem;
  }
  
  .items-select {
    padding: 0.35rem 1.5rem 0.35rem 0.5rem;
    font-size: 0.75rem;
    min-width: 60px;
    background-position: right 0.3rem center;
    background-size: 0.8rem;
  }
  
  .items-select option {
    background: var(--background);
    color: var(--text-primary);
    padding: 0.35rem;
    font-size: 0.75rem;
  }
  
  .pagination {
    gap: 0.2rem;
    margin: 1rem 0;
  }
}

/* ============ CONTACT FORM STYLES ============ */
.contact-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10002;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.contact-form-overlay.show {
  opacity: 1;
  visibility: visible;
}

.contact-form-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10003;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 500px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.8);
  transition: all 0.3s ease;
}

.contact-form-container.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.contact-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px 15px;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
  border-radius: 12px 12px 0 0;
}

.contact-form-header h4 {
  font-family: var(--font-family);
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
}

.contact-form-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.contact-form-close:hover {
  background: #f0f0f0;
  color: var(--text-primary);
}

.contact-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-family);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(254, 136, 135, 0.1);
  transform: translateY(-2px);
}

.contact-form textarea {
  resize: vertical;
  min-height: 80px;
  max-height: 120px;
  font-family: var(--font-family);
}

.contact-form button {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-family);
  position: relative;
  overflow: hidden;
}

.contact-form button:hover:not(.loading) {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(254, 136, 135, 0.4);
}

.contact-form button.loading {
  opacity: 0.8;
  cursor: not-allowed;
}

.contact-form button.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Consent checkbox styles */
.contact-form .consent-checkbox {
  margin: 8px 0 12px 0;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.contact-form .consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
  color: #666;
}

.contact-form .consent-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-form .consent-text {
  flex: 1;
}

/* Mobile styles for contact form */
@media (max-width: 768px) {
  .contact-form-container {
    width: calc(100vw - 20px);
    max-width: none;
    max-height: calc(100vh - 80px);
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .contact-form-header {
    padding: 20px 25px 15px;
  }

  .contact-form-header h4 {
    font-size: 1.2rem;
  }

  .contact-form {
    padding: 25px;
    gap: 18px;
  }

  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    padding: 14px 16px;
    font-size: 16px;
  }

  .contact-form textarea {
    min-height: 100px;
  }

  .contact-form button {
    padding: 15px 20px;
    font-size: 16px;
  }
}
  
  .pagination-btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    min-width: 30px;
  }
  
  .mini-footer {
    padding: 0.75rem 0;
    margin-top: 1.5rem;
  }
  
  .footer-content {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }
  
  .footer-brand {
    font-size: 0.8rem;
    gap: 0.5rem;
  }
  
  .brand-text {
    font-size: 0.85rem;
  }
  
  .footer-stats {
    font-size: 0.75rem;
  }
  
  .footer-legal {
    margin-top: 0.5rem;
    padding: 0 0.75rem;
    text-align: center;
  }
  
  .copyright-notice {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
  }
  
  .usage-disclaimer {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.3;
  }
  
  .removal-notice {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 0.3rem;
  }
  
  /* Back button mobile styles */
  .header-top {
    top: 0.75rem;
    left: 1rem;
  }
  
  .back-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .back-button svg {
    width: 14px;
    height: 14px;
  }
}

/* ========================================
   ADDITIONAL RESPONSIVE BREAKPOINTS
======================================== */

/* Large mobile devices (481px - 600px) */
@media (min-width: 481px) and (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .card-preview {
    height: 150px;
  }
  
  .preview-image[src*="Screenshot"] {
    max-height: 130px;
  }
}

/* Small tablets (601px - 768px) */
@media (min-width: 601px) and (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  
  .card-preview {
    height: 160px;
  }
  
  .preview-image[src*="Screenshot"] {
    max-height: 140px;
  }
}

/* Large tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .card-preview {
    height: 180px;
  }
  
  .preview-image[src*="Screenshot"] {
    max-height: 160px;
  }
}

/* ========================================
   ACCESSIBILITY & PERFORMANCE
======================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
  .animation-card {
    border: 2px solid var(--text-primary);
  }
  
  .category-btn {
    border: 2px solid var(--text-primary);
  }
  
  .pagination-btn {
    border: 2px solid var(--text-primary);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .animation-card {
    transition: none;
  }
  
  .animation-card:hover {
    transform: none;
  }
  
  .preview-image {
    animation: none;
  }
  
  .spinner {
    animation: none;
  }
}

/* Dark mode support (disabled for now) */
/* @media (prefers-color-scheme: dark) {
  :root {
    --background: #1a1a1a;
    --background-alt: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-light: #999999;
    --border: #404040;
    --border-hover: #606060;
  }
} */
