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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #1a1a1a;
  color: #ffffff;
}

.bg-dark {
  background-color: #1a1a1a;
}

.gradient-text {
  background: linear-gradient(135deg, #ff914d 0%, #ffc107 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.community-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255, 145, 77, 0.1);
  border-radius: 50px;
  font-size: 13px;
  color: #ff914d;
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 145, 77, 0.3); }
  50% { box-shadow: 0 0 15px rgba(255, 145, 77, 0.5); }
}

.berrry-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 2px solid #ff914d;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  color: #ff914d;
  background: rgba(255, 145, 77, 0.1);
}

.berrry-balance {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: #2a2a2a;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: #ffc107;
}

.trending-section {
  overflow: hidden;
}

.trending-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.trending-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 50px;
  font-size: 13px;
  color: #cccccc;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.trending-pill:hover {
  border-color: #ff914d;
  color: #ff914d;
  box-shadow: 0 0 10px rgba(255, 145, 77, 0.3);
}

.input-field {
  background: #2a2a2a;
  border: 2px solid #3a3a3a;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 16px;
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-field:focus {
  border-color: #ff914d;
}

.input-field::placeholder {
  color: #666666;
}

.input-field:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.generate-btn {
  background: linear-gradient(135deg, #ff914d 0%, #ffc107 100%);
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  animation: pulse-btn 2s ease-in-out infinite;
}

@keyframes pulse-btn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.generate-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(255, 145, 77, 0.4);
  animation: none;
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  animation: none;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.results-area {
  min-height: 300px;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #3a3a3a;
  border-top-color: #ff914d;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-message {
  color: #888888;
  font-size: 16px;
  text-align: center;
}

.error-message {
  background: rgba(255, 100, 100, 0.1);
  border: 1px solid rgba(255, 100, 100, 0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #ff9999;
  font-size: 15px;
}

.gif-card {
  background: #2a2a2a;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
}

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

.gif-header {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #ffc107;
  margin-bottom: 16px;
}

.gif-container {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #1a1a1a;
}

.gif-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: contain;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag {
  background: #3a3a3a;
  color: #cccccc;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.gif-description {
  color: #aaaaaa;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  font-style: italic;
}

.action-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.download-btn {
  flex: 1;
  background: linear-gradient(135deg, #ffc107 0%, #ffdb4d 100%);
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4);
}

.share-btn {
  flex: 1;
  background: transparent;
  border: 2px solid #ff914d;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #ff914d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.share-btn:hover {
  background: rgba(255, 145, 77, 0.1);
  transform: translateY(-2px);
}

.daily-counter {
  text-align: center;
  font-size: 13px;
  color: #888888;
  padding-top: 12px;
  border-top: 1px solid #3a3a3a;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666666;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: bounce 2s ease-in-out infinite;
}

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

.footer {
  text-align: center;
  padding: 24px;
  color: #666666;
  font-size: 14px;
  border-top: 1px solid #2a2a2a;
}

.footer-link {
  color: #ff914d;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #ffc107;
  text-decoration: underline;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #2a2a2a;
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  animation: toastIn 0.3s ease;
  border: 1px solid #ff914d;
}

@keyframes toastIn {
  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: 999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-fall 3s ease-out forwards;
}

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

/* Mobile Responsive */
@media (max-width: 640px) {
  .gradient-text {
    font-size: 2rem !important;
  }
  
  .berrry-badge,
  .berrry-balance {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .input-field {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .generate-btn {
    padding: 14px 20px;
    min-width: 56px;
  }
  
  .gif-card {
    padding: 16px;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .trending-pill {
    font-size: 12px;
    padding: 6px 12px;
  }
}