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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  min-height: 100vh;
  color: #ffffff;
}

.bg-dark {
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
}

.text-red {
  color: #ff4444;
}

.text-orange {
  color: #ff914d;
}

.text-yellow {
  color: #ffc107;
}

.cost-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 2px solid #ff914d;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: #ff914d;
  background: rgba(255, 145, 77, 0.1);
  transition: all 0.2s ease;
}

.cost-badge:hover {
  background: rgba(255, 145, 77, 0.2);
  transform: scale(1.02);
}

.balance-display {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: #282828;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: #888888;
}

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

.input-field:focus {
  border-color: #ff914d;
  box-shadow: 0 0 20px rgba(255, 145, 77, 0.2);
}

.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: 10px;
  padding: 16px 24px;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
}

.generate-btn:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow: 0 4px 25px rgba(255, 145, 77, 0.5);
}

.generate-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.generate-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.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: 56px;
  height: 56px;
  border: 4px solid #3a3a3a;
  border-top-color: #ff914d;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}

.loading-message {
  color: #888888;
  font-size: 16px;
  text-align: center;
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

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

.gif-card {
  background: #282828;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s ease-out;
}

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

.success-badge {
  text-align: center;
  color: #ffc107;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
  animation: pulse 1.5s ease-in-out;
}

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

.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: 14px;
}

.tag {
  background: #444444;
  color: #ff914d;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tag:hover {
  background: #555555;
  transform: scale(1.05);
}

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

.download-btn {
  width: 100%;
  background: linear-gradient(135deg, #FFD700 0%, #ffc107 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: all 0.2s ease;
}

.download-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.download-btn:active {
  transform: translateY(-1px);
}

.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: 56px;
  margin-bottom: 20px;
  animation: bounce 2s ease-in-out infinite;
}

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

.footer {
  text-align: center;
  padding: 28px;
  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;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  h1 {
    font-size: 2rem !important;
  }
  
  .cost-badge,
  .balance-display {
    font-size: 12px;
    padding: 8px 14px;
  }
  
  .input-field {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .generate-btn {
    padding: 14px 20px;
    min-width: 56px;
  }
  
  .gif-card {
    padding: 16px;
  }
  
  .empty-icon {
    font-size: 48px;
  }
  
  .loading-spinner {
    width: 48px;
    height: 48px;
  }
}