/* ===== AI CREATIVE COMPONENT STYLES ===== */

/* Body and Layout */
.ai-creative-body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  min-height: 100vh;
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  overflow-x: hidden;
}

.ai-creative-body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Header Styles */
.ai-creative-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.token-counter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #fff, #f8f9fa);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 600;
  color: #333;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

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

.token-counter i {
  color: #ffd700;
  font-size: 1.1em;
  animation: pulse 2s infinite;
}

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

/* Navigation Tabs */
.style-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.nav-tab {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(102, 126, 234, 0.3);
  color: #667eea;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.nav-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.nav-tab:hover::before {
  left: 100%;
}

.nav-tab:hover,
.nav-tab.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  border-color: transparent;
}

/* Container */
.ai-creative-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

/* Trial Banner */
.trial-banner {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  padding: 1rem;
  border-radius: 15px;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* Hero Section */
.hero-section {
  margin-bottom: 2rem;
  text-align: center;
  padding: 1rem;
}

.hero-content {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.hero-image {
  position: relative;
  display: inline-block;
  border-radius: 25px;
  overflow: hidden;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-image:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.main-model-image {
  width: clamp(250px, 80vw, 350px);
  height: clamp(350px, 120vw, 500px);
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.hero-image:hover .main-model-image {
  transform: scale(1.05);
}

.style-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    transparent 0%,
    rgba(0, 0, 0, 0.3) 30%,
    rgba(0, 0, 0, 0.8) 100%
  );
  color: white;
  padding: clamp(1rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.5rem);
  text-align: center;
  backdrop-filter: blur(5px);
}

.style-description {
  margin: 0 0 1rem 0;
  font-size: clamp(0.8rem, 2.5vw, 0.95rem);
  opacity: 0.95;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.generate-style-btn {
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.generate-style-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.generate-style-btn:hover::before {
  left: 100%;
}

.generate-style-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.generate-style-btn:active {
  transform: translateY(-1px) scale(1.02);
}

/* Style Categories */
.style-categories {
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.category-section {
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.category-section:nth-child(1) { animation-delay: 0.1s; }
.category-section:nth-child(2) { animation-delay: 0.2s; }
.category-section:nth-child(3) { animation-delay: 0.3s; }
.category-section:nth-child(4) { animation-delay: 0.4s; }

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

.category-title {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  text-align: center;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  position: relative;
  padding-bottom: 0.5rem;
}

.category-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #667eea, #f093fb);
  border-radius: 2px;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
  padding: 0 0.5rem;
}

.style-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  height: auto;
  min-height: 320px;
  position: relative;
  border: 2px solid transparent;
}

.style-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.style-card:hover::before {
  opacity: 1;
}

.style-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.3);
}

.style-card.active {
  transform: translateY(-5px) scale(1.01);
  box-shadow:
    0 15px 35px rgba(102, 126, 234, 0.3),
    0 0 0 2px #667eea;
  background: rgba(255, 255, 255, 1);
}

.style-card.active::after {
  content: '✓';
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  animation: checkmark 0.3s ease;
}

@keyframes checkmark {
  0% { transform: scale(0) rotate(180deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.style-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
  position: relative;
  z-index: 0;
}

.style-card:hover img {
  transform: scale(1.1);
}

.style-info {
  padding: 1.2rem;
  text-align: center;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.style-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 700;
  color: #333;
  transition: color 0.3s ease;
}

.style-card:hover .style-info h3 {
  color: #667eea;
}

.style-info p {
  margin: 0;
  color: #666;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  font-weight: 500;
}

/* Custom Input Section */
.custom-input-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 25px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin: 2rem 0.5rem;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.custom-input-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
}

.custom-input-section h3 {
  color: #333;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 700;
  position: relative;
}

.custom-input-section h3::after {
  content: '✨';
  margin-left: 0.5rem;
  font-size: 0.8em;
}

.custom-input-section textarea {
  width: 100%;
  min-height: clamp(100px, 20vw, 120px);
  padding: 1.2rem;
  border: 2px solid #e9ecef;
  border-radius: 20px;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  resize: vertical;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.custom-input-section textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow:
    0 0 0 4px rgba(102, 126, 234, 0.1),
    0 8px 25px rgba(102, 126, 234, 0.15);
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
}

.custom-input-section textarea::placeholder {
  color: #999;
  font-style: italic;
}

/* Generate Button */
.generate-section {
  text-align: center;
  margin-top: 2rem;
}

.main-generate-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 1rem 3rem;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.main-generate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

/* Output and History Sections */
.output-section,
.history-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.section-title {
  color: #333;
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.output-grid,
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.output-grid img,
.history-grid img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.output-grid img:hover,
.history-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Bottom Navigation Enhanced */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  padding: 0.75rem 1rem 1rem 1rem;
  box-shadow:
    0 -8px 32px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  z-index: 100;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: #666;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.5rem;
  border-radius: 15px;
  min-width: 60px;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 15px;
}

.nav-item.active::before,
.nav-item:hover::before {
  opacity: 1;
}

.nav-item.active,
.nav-item:hover {
  color: #667eea;
  transform: translateY(-3px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.nav-item i {
  font-size: 1.3rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.nav-item:hover i {
  transform: scale(1.1);
}

.nav-item.active i {
  color: #667eea;
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 20%, 60%, 100% { transform: translateY(0) scale(1.1); }
  40% { transform: translateY(-4px) scale(1.2); }
  80% { transform: translateY(-2px) scale(1.15); }
}

.nav-item span {
  font-size: 0.75rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.nav-item:hover span {
  transform: scale(1.05);
}

/* Floating Action Button Style for Generate */
.floating-generate {
  position: fixed;
  bottom: 100px;
  right: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  box-shadow:
    0 8px 25px rgba(102, 126, 234, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
  display: none;
}

.floating-generate:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow:
    0 12px 35px rgba(102, 126, 234, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.3);
}

.floating-generate.show {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 0.5s ease;
}

/* Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(135deg, #667eea, #f093fb);
  z-index: 101;
  transition: width 0.1s ease;
}

/* Loading States */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== API TESTING SECTION STYLES ===== */

.testing-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 25px;
  padding: 2rem;
  margin: 2rem 0.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(102, 126, 234, 0.2);
}

.testing-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 15px;
  padding: 0.5rem;
  flex-wrap: wrap;
}

.testing-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #667eea;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 120px;
}

.testing-tab-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
}

.testing-tab-btn:hover:not(.active) {
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.testing-tab-content {
  display: none;
}

.testing-tab-content.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

.testing-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid rgba(102, 126, 234, 0.2);
  margin-bottom: 1rem;
}

.testing-card h3 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-display {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-family: monospace;
  font-size: 0.9rem;
}

.status-display.warning {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}

.status-display.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.testing-form {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-col {
  display: flex;
  flex-direction: column;
}

.form-col label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-col input,
.form-col textarea {
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
}

.form-col input:focus,
.form-col textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: white;
}

.form-col textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

.test-generate-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  align-self: flex-end;
  white-space: nowrap;
}

.test-generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

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

.test-result {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  padding: 1rem;
  font-family: monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.test-result img {
  max-width: 200px;
  border-radius: 8px;
  margin: 0.5rem 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.api-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-card {
  background: rgba(102, 126, 234, 0.05);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.info-card strong {
  color: #667eea;
  display: block;
  margin-bottom: 0.5rem;
}

/* Testing Preview Styles */
#trial-test-preview,
#user-test-preview {
  margin-top: 0.5rem;
  text-align: center;
}

#trial-test-preview img,
#user-test-preview img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive Design for Testing Section */
@media (max-width: 768px) {
  .testing-tabs {
    flex-direction: column;
  }

  .testing-tab-btn {
    min-width: auto;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .api-info {
    grid-template-columns: 1fr;
  }

  .testing-card {
    padding: 1rem;
  }

  .form-col input,
  .form-col textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Loading spinner for testing */
.test-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

/* ===== ENHANCED UI COMPONENTS ===== */

/* Enhanced Header */
.enhanced-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px);
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  font-size: 2rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse 2s infinite;
}

.enhanced-counter {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 20px;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
}

.enhanced-counter:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.counter-icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.counter-info {
  display: flex;
  flex-direction: column;
}

.counter-label {
  font-size: 0.8rem;
  color: #666;
  font-weight: 500;
}

.counter-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
}

/* Enhanced Navigation */
.enhanced-nav {
  background: rgba(102, 126, 234, 0.05);
  border: 2px solid rgba(102, 126, 234, 0.1);
  border-radius: 25px;
  padding: 0.75rem;
  backdrop-filter: blur(20px);
}

.enhanced-nav .nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 20px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.enhanced-nav .nav-tab i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.enhanced-nav .nav-tab:hover i {
  transform: scale(1.2) rotate(5deg);
}

.enhanced-nav .nav-tab.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

/* Enhanced Hero Section */
.enhanced-hero {
  padding: 4rem 1rem;
  background: linear-gradient(135deg,
    rgba(102, 126, 234, 0.05) 0%,
    rgba(240, 147, 251, 0.05) 50%,
    rgba(102, 126, 234, 0.05) 100%);
  border-radius: 30px;
  margin: 2rem 0.5rem;
  position: relative;
  overflow: hidden;
}

.enhanced-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23667eea" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #333, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.2rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

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

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #667eea;
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.primary-action {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  color: white;
  border: none;
  padding: 1.5rem 3rem;
  border-radius: 35px;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow:
    0 12px 40px rgba(102, 126, 234, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid transparent;
  min-width: 280px;
  justify-content: center;
}

.primary-action::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  z-index: -1;
  border-radius: 35px;
  filter: blur(15px);
  opacity: 0.6;
  transition: all 0.4s ease;
}

.primary-action:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow:
    0 20px 60px rgba(102, 126, 234, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.primary-action:hover::before {
  filter: blur(25px);
  opacity: 1;
  transform: scale(1.05);
}

.primary-action i {
  font-size: 1.4rem;
  transition: all 0.4s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.primary-action:hover i {
  transform: rotate(360deg) scale(1.2);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.primary-action span {
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.primary-action:hover .btn-shine {
  left: 100%;
}

.secondary-action {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
  padding: 1.25rem 2rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.secondary-action:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

.hero-image-container {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transition: all 0.5s ease;
}

.hero-image-container:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.image-overlay {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 0.75rem 1rem;
}

.ai-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #667eea;
  font-weight: 600;
  font-size: 0.9rem;
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.float-element {
  position: absolute;
  color: rgba(102, 126, 234, 0.6);
  font-size: 1.5rem;
  animation: float 3s ease-in-out infinite;
  animation-delay: var(--delay);
}

.float-element:nth-child(1) {
  top: 20%;
  left: 10%;
}

.float-element:nth-child(2) {
  top: 60%;
  right: 15%;
}

.float-element:nth-child(3) {
  bottom: 30%;
  left: 20%;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
}

/* Enhanced Input Section */
.enhanced-input {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px);
  border-radius: 30px;
  padding: 3rem;
  margin: 2rem 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border: 2px solid rgba(102, 126, 234, 0.1);
  position: relative;
  overflow: hidden;
}

.enhanced-input::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  text-align: center;
  justify-content: center;
}

.section-icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.section-title-group {
  text-align: left;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: #333;
  margin: 0 0 0.5rem 0;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin: 0;
}

.enhanced-form {
  max-width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.form-section {
  background: rgba(102, 126, 234, 0.02);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.form-label i {
  color: #667eea;
  font-size: 1.2rem;
}

.required {
  color: #e74c3c;
  font-weight: 800;
}

.optional {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.form-help {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 10px;
  border-left: 4px solid #667eea;
}

.textarea-container {
  position: relative;
}

.enhanced-textarea {
  width: 100%;
  min-height: 120px;
  padding: 1.5rem;
  border: 2px solid #e9ecef;
  border-radius: 15px;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.enhanced-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  background: white;
  transform: translateY(-2px);
}

.textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.char-count {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

.quick-suggestions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.suggestion-btn {
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.2);
  color: #667eea;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.suggestion-btn:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Enhanced Upload Area */
.enhanced-upload {
  border: 2px dashed #d1d5db;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  background: rgba(249, 250, 251, 0.5);
  position: relative;
  overflow: hidden;
}

.enhanced-upload:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
  transform: translateY(-2px);
}

.enhanced-upload.dragover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  transform: scale(1.02);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.upload-icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.upload-text h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 0.5rem 0;
}

.upload-text p {
  font-size: 1rem;
  color: #666;
  margin: 0 0 0.5rem 0;
}

.upload-text small {
  font-size: 0.85rem;
  color: #999;
}

.upload-features {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #667eea;
  font-size: 0.9rem;
  font-weight: 600;
}

.feature-item i {
  font-size: 1rem;
}

/* Enhanced Attributes */
.enhanced-attributes {
  margin-top: 1.5rem;
}

.attributes-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.enhanced-select {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 15px;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

.enhanced-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.attributes-help {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 10px;
}

/* Enhanced Preview */
.enhanced-preview {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(102, 126, 234, 0.02);
  border-radius: 15px;
  border: 1px solid rgba(102, 126, 234, 0.1);
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.enhanced-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.enhanced-preview img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* Enhanced Generate Section */
.enhanced-generate {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg,
    rgba(102, 126, 234, 0.03) 0%,
    rgba(240, 147, 251, 0.03) 50%,
    rgba(102, 126, 234, 0.03) 100%);
  border-radius: 30px;
  margin: 3rem 0.5rem;
  position: relative;
  overflow: hidden;
}

.enhanced-generate::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.generate-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}

.enhanced-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  color: white;
  border: none;
  padding: 1.75rem 4rem;
  border-radius: 50px;
  font-size: 1.3rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 10px 40px rgba(102, 126, 234, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  min-width: 320px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.enhanced-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  z-index: -1;
  border-radius: 50px;
  filter: blur(20px);
  opacity: 0.7;
  transition: all 0.4s ease;
}

.enhanced-btn:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow:
    0 20px 60px rgba(102, 126, 234, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

.enhanced-btn:hover::before {
  filter: blur(30px);
  opacity: 1;
  transform: scale(1.1);
}

.enhanced-btn:active {
  transform: translateY(-4px) scale(1.02);
  transition: all 0.1s ease;
}

.enhanced-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.enhanced-btn.loading {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow:
      0 10px 40px rgba(102, 126, 234, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow:
      0 15px 50px rgba(102, 126, 234, 0.6),
      0 0 0 1px rgba(255, 255, 255, 0.2);
  }
}

.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  position: relative;
  z-index: 2;
}

.btn-content i {
  font-size: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.enhanced-btn:hover .btn-content i {
  transform: rotate(360deg) scale(1.3);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.enhanced-btn.loading .btn-content i {
  animation: spin 1s linear infinite;
}

.btn-content span {
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.enhanced-btn:hover .btn-content span {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
}

.btn-glow {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 50%,
    rgba(255, 255, 255, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 50px;
  z-index: -1;
}

.enhanced-btn:hover .btn-glow {
  opacity: 1;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.btn-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.enhanced-btn:active .btn-ripple {
  width: 400px;
  height: 400px;
  opacity: 0;
}

.generate-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #333;
  font-size: 1rem;
  font-weight: 600;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 25px;
  border: 2px solid rgba(102, 126, 234, 0.1);
  backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.info-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.info-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.2);
}

.info-item:hover::before {
  opacity: 1;
}

.info-item i {
  color: #667eea;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
  padding: 0.75rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  min-width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-item:hover i {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  transform: scale(1.1) rotate(5deg);
}

.info-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-item-title {
  font-weight: 700;
  color: #333;
  font-size: 1rem;
}

.info-item-desc {
  font-weight: 500;
  color: #666;
  font-size: 0.85rem;
}

/* Enhanced Output and History Sections */
.output-section,
.history-section {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px);
  border-radius: 25px;
  padding: 3rem;
  margin: 2rem 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border: 2px solid rgba(102, 126, 234, 0.1);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: #333;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 2px;
}

.output-grid,
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.output-grid img,
.history-grid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border: 3px solid transparent;
}

.output-grid img:hover,
.history-grid img:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  border-color: #667eea;
}

/* Enhanced Bottom Navigation */
.bottom-nav {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px);
  border-top: 2px solid rgba(102, 126, 234, 0.1);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08);
  padding: 1rem 1rem 1.5rem 1rem;
}

.nav-item {
  border-radius: 20px;
  padding: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 20px;
}

.nav-item.active::before,
.nav-item:hover::before {
  opacity: 1;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(240, 147, 251, 0.15));
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
  transform: translateY(-3px);
}

.nav-item i {
  font-size: 1.4rem;
  transition: all 0.3s ease;
}

.nav-item:hover i {
  transform: scale(1.2) rotate(5deg);
}

.nav-item.active i {
  color: #667eea;
  animation: bounce 0.6s ease;
}

.nav-item span {
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

/* Advanced Mobile Responsive Design */
@media (max-width: 1200px) {
  .enhanced-btn {
    min-width: 280px;
    padding: 1.5rem 3rem;
  }

  .generate-info {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }

  .info-item {
    padding: 1.25rem 1.5rem;
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .enhanced-nav {
    padding: 0.5rem;
  }

  .enhanced-nav .nav-tab {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .enhanced-nav .nav-tab span {
    display: none;
  }

  .enhanced-btn {
    min-width: 260px;
    padding: 1.4rem 2.5rem;
    font-size: 1.1rem;
  }

  .primary-action {
    min-width: 240px;
    padding: 1.3rem 2.5rem;
    font-size: 1.1rem;
  }

  .generate-info {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .info-item {
    padding: 1rem 1.5rem;
    flex-direction: row;
    text-align: left;
  }

  .info-item i {
    min-width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .enhanced-header .header-content {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
  }

  .brand-section {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .enhanced-counter {
    padding: 0.75rem 1.25rem;
    gap: 0.75rem;
  }

  .counter-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .enhanced-nav {
    width: 100%;
    justify-content: center;
    padding: 0.5rem;
  }

  .enhanced-nav .nav-tab {
    flex: 1;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  .enhanced-nav .nav-tab i {
    font-size: 1.1rem;
  }

  .enhanced-hero {
    padding: 2rem 1rem;
    margin: 1rem 0.25rem;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .primary-action {
    width: 100%;
    justify-content: center;
    min-width: auto;
    padding: 1.25rem 2rem;
    font-size: 1rem;
  }

  .secondary-action {
    width: 100%;
    justify-content: center;
    padding: 1.25rem 2rem;
  }

  .enhanced-input {
    padding: 2rem 1rem;
    margin: 1rem 0.25rem;
  }

  .section-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .section-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .form-section {
    padding: 1.5rem 1rem;
  }

  .form-label {
    font-size: 1rem;
  }

  .quick-suggestions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .suggestion-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .upload-features {
    flex-direction: column;
    gap: 0.75rem;
  }

  .feature-item {
    font-size: 0.85rem;
  }

  .enhanced-generate {
    padding: 3rem 1rem;
    margin: 2rem 0.25rem;
  }

  .enhanced-btn {
    width: 100%;
    min-width: auto;
    padding: 1.5rem 2rem;
    font-size: 1.1rem;
    border-radius: 25px;
  }

  .btn-content {
    gap: 1rem;
  }

  .btn-content i {
    font-size: 1.3rem;
  }

  .generate-info {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
  }

  .info-item {
    padding: 1.25rem 1rem;
    gap: 1rem;
  }

  .info-item i {
    min-width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }

  .info-item-title {
    font-size: 0.95rem;
  }

  .info-item-desc {
    font-size: 0.8rem;
  }

  .output-grid,
  .history-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .enhanced-textarea,
  .enhanced-select {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 1.25rem;
  }

  .enhanced-upload {
    padding: 1.5rem 1rem;
  }

  .upload-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .upload-text h4 {
    font-size: 1.1rem;
  }

  .upload-text p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .enhanced-header .header-content {
    padding: 0.75rem;
  }

  .brand-title {
    font-size: 1.5rem;
  }

  .enhanced-counter {
    padding: 0.5rem 1rem;
    gap: 0.5rem;
  }

  .counter-icon {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .counter-label {
    font-size: 0.7rem;
  }

  .counter-value {
    font-size: 1rem;
  }

  .enhanced-nav .nav-tab {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }

  .enhanced-nav .nav-tab i {
    font-size: 1rem;
  }

  .enhanced-hero {
    padding: 1.5rem 0.75rem;
    margin: 0.5rem 0.125rem;
  }

  .hero-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    margin-bottom: 1rem;
  }

  .hero-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .stat-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .primary-action {
    padding: 1.125rem 1.75rem;
    font-size: 0.95rem;
    border-radius: 20px;
  }

  .primary-action i {
    font-size: 1.2rem;
  }

  .secondary-action {
    padding: 1.125rem 1.75rem;
    font-size: 0.95rem;
    border-radius: 20px;
  }

  .enhanced-input {
    margin: 0.75rem 0.125rem;
    padding: 1.5rem 0.75rem;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .form-section {
    padding: 1.25rem 0.75rem;
  }

  .form-label {
    font-size: 0.95rem;
    gap: 0.5rem;
  }

  .form-help {
    font-size: 0.9rem;
    padding: 0.75rem;
  }

  .enhanced-textarea {
    min-height: 100px;
    padding: 1rem;
    font-size: 16px;
  }

  .textarea-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .char-count {
    font-size: 0.8rem;
  }

  .suggestion-btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    border-radius: 15px;
  }

  .enhanced-upload {
    padding: 1.25rem 0.75rem;
  }

  .upload-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .upload-text h4 {
    font-size: 1rem;
  }

  .upload-text p {
    font-size: 0.85rem;
  }

  .upload-text small {
    font-size: 0.75rem;
  }

  .enhanced-generate {
    padding: 2.5rem 0.75rem;
    margin: 1.5rem 0.125rem;
  }

  .enhanced-btn {
    width: 100%;
    min-width: auto;
    padding: 1.375rem 1.5rem;
    font-size: 1rem;
    border-radius: 20px;
  }

  .btn-content {
    gap: 0.75rem;
  }

  .btn-content i {
    font-size: 1.2rem;
  }

  .btn-content span {
    font-size: 1rem;
  }

  .generate-info {
    margin-top: 1.5rem;
    gap: 0.75rem;
  }

  .info-item {
    padding: 1rem 0.75rem;
    gap: 0.75rem;
    border-radius: 15px;
  }

  .info-item i {
    min-width: 40px;
    height: 40px;
    font-size: 1.1rem;
    padding: 0.5rem;
  }

  .info-item-title {
    font-size: 0.9rem;
  }

  .info-item-desc {
    font-size: 0.75rem;
  }

  .output-section,
  .history-section {
    padding: 2rem 1rem;
    margin: 1rem 0.125rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .output-grid,
  .history-grid {
    gap: 1rem;
  }

  .output-grid img,
  .history-grid img {
    height: 250px;
    border-radius: 15px;
  }
}

/* Ultra-small screens (320px and below) */
@media (max-width: 320px) {
  .enhanced-btn {
    padding: 1.25rem 1.25rem;
    font-size: 0.95rem;
  }

  .btn-content span {
    font-size: 0.95rem;
  }

  .primary-action {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
  }

  .info-item {
    padding: 0.875rem 0.625rem;
  }

  .info-item i {
    min-width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .enhanced-input,
  .enhanced-generate,
  .output-section,
  .history-section {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ===== ADVANCED BUTTON ANIMATIONS ===== */

/* Magnetic effect for buttons */
.enhanced-btn,
.primary-action {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.enhanced-btn:hover,
.primary-action:hover {
  animation: magneticPulse 0.6s ease-out;
}

@keyframes magneticPulse {
  0% {
    transform: translateY(-8px) scale(1.05);
  }
  50% {
    transform: translateY(-10px) scale(1.08);
  }
  100% {
    transform: translateY(-8px) scale(1.05);
  }
}

/* Success state animation */
.enhanced-btn.success {
  background: linear-gradient(135deg, #10b981, #059669);
  animation: successBounce 0.8s ease-out;
}

@keyframes successBounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Loading state enhancements */
.enhanced-btn.loading {
  background: linear-gradient(135deg, #6b7280, #9ca3af);
  cursor: not-allowed;
  animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% {
    box-shadow:
      0 10px 40px rgba(107, 114, 128, 0.3),
      0 0 0 0 rgba(107, 114, 128, 0.4);
  }
  50% {
    box-shadow:
      0 15px 50px rgba(107, 114, 128, 0.4),
      0 0 0 10px rgba(107, 114, 128, 0);
  }
}

/* Particle effect on click */
.enhanced-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.6s ease-out;
}

.enhanced-btn:active::after {
  width: 300px;
  height: 300px;
  opacity: 1;
  transition: all 0s;
}

/* Gradient animation */
.enhanced-btn,
.primary-action {
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Hover glow effect */
.enhanced-btn:hover,
.primary-action:hover {
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    filter: brightness(1) saturate(1);
  }
  50% {
    filter: brightness(1.1) saturate(1.2);
  }
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
  .enhanced-btn:active,
  .primary-action:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  .enhanced-btn:active::before,
  .primary-action:active::before {
    filter: blur(25px);
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Accessibility enhancements */
.enhanced-btn:focus,
.primary-action:focus {
  outline: none;
  box-shadow:
    0 15px 50px rgba(102, 126, 234, 0.4),
    0 0 0 3px rgba(102, 126, 234, 0.3);
}

.enhanced-btn:focus-visible,
.primary-action:focus-visible {
  animation: focusPulse 1s ease-in-out infinite;
}

@keyframes focusPulse {
  0%, 100% {
    box-shadow:
      0 15px 50px rgba(102, 126, 234, 0.4),
      0 0 0 3px rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow:
      0 20px 60px rgba(102, 126, 234, 0.5),
      0 0 0 5px rgba(102, 126, 234, 0.4);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .enhanced-btn,
  .primary-action,
  .enhanced-btn::before,
  .primary-action::before,
  .btn-glow,
  .btn-ripple {
    animation: none !important;
    transition: none !important;
  }

  .enhanced-btn:hover,
  .primary-action:hover {
    transform: none;
    filter: brightness(1.05);
  }
}

/* ===== DEBUG PANEL STYLES ===== */

.debug-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 350px;
  max-height: 80vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 15px;
  border: 2px solid #333;
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  z-index: 10000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-bottom: 1px solid #333;
}

.debug-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: bold;
}

.debug-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.debug-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.debug-content {
  padding: 1rem;
  max-height: calc(80vh - 60px);
  overflow-y: auto;
}

.debug-section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #333;
}

.debug-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.debug-section h5 {
  margin: 0 0 0.5rem 0;
  color: #667eea;
  font-size: 13px;
  font-weight: bold;
}

.debug-section div {
  color: #ccc;
  line-height: 1.4;
  word-break: break-word;
}

.debug-console {
  max-height: 150px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  padding: 0.5rem;
  font-size: 11px;
}

.debug-log {
  margin-bottom: 0.25rem;
  padding: 0.25rem;
  border-radius: 3px;
}

.debug-log.error {
  background: rgba(231, 76, 60, 0.2);
  color: #ff6b6b;
}

.debug-log.warn {
  background: rgba(243, 156, 18, 0.2);
  color: #feca57;
}

.debug-log.info {
  background: rgba(52, 152, 219, 0.2);
  color: #74b9ff;
}

.debug-log.success {
  background: rgba(46, 204, 113, 0.2);
  color: #55efc4;
}

.debug-toggle {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.debug-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

/* Mobile debug panel adjustments */
@media (max-width: 768px) {
  .debug-panel {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: 70vh;
  }

  .debug-toggle {
    bottom: 80px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
}

/* ===== QUICK TEST BUTTON STYLES ===== */

.quick-test-btn {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.quick-test-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.quick-test-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
