/* ========================================
   NEUROARTISAN - LOGGEDIN PAGE STYLES
   Clean, optimized styles for loggedIn.html
   ======================================== */

/* ==== CSS VARIABLES ==== */
:root {
  --primary-color: #0f0f23;
  --secondary-color: #1a1a2e;
  --accent-color: #6c5ce7;
  --accent-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);
  --text-primary: #ffffff;
  --text-secondary: #b2b2b2;
  --text-muted: #8e8e93;
  --button-primary: linear-gradient(135deg, #6c5ce7, #a29bfe);
  --button-hover: linear-gradient(135deg, #5f51d3, #9088fc);
  --card-bg: rgba(255, 255, 255, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --border-color: rgba(255, 255, 255, 0.1);
  --glow-color: rgba(108, 92, 231, 0.3);
  --success-color: #00d2ff;
  --warning-color: #ff6b35;
  --error-color: #e74c3c;
}

/* ==== RESET & BASE ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}

/* ==== LAYOUT ==== */
.main-content {
  padding-top: 100px;
  min-height: calc(100vh - 70px);
}

/* ==== HEADER ==== */
.modern-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 15px 0;
  transition: all 0.2s ease;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  position: relative;
}

.header-center {
  position: absolute;
  left: 280px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}


.header-left ul,
.header-right ul {
  display: flex;
  list-style: none;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.header-left li {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo {
  /* Резервируем фиксированное место для логотипа */
  min-width: 140px;
  width: 140px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
}

.animated-logo {
  transition: transform 0.3s ease;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.animated-logo:hover {
  transform: scale(1.05);
}

.logo img,
.animated-logo img {
  height: 50px;
  width: auto;
  max-width: 100%;
}

.nav-button {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 1.1rem;
}

.nav-button:hover {
  color: var(--text-primary);
  text-decoration: none;
  transform: translateY(-2px);
}

.nav-button.active {
  color: var(--text-primary);
  background: var(--accent-gradient);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
  transform: translateY(-1px);
}

.burger-menu {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

.nav-menu {
  display: none;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==== HERO SECTION ==== */
.generator-hero,
.profile-hero,
.billing-hero {
  text-align: center;
  padding: 80px 0 40px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6c5ce7, #4a90e2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  animation: fadeInUp 0.8s ease-out;
}

.lightning-icon {
  font-size: 3rem;
  animation: pulse 2s ease-in-out infinite;
}

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

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

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ==== GENERATION SECTION ==== */
.generation-section {
  padding: 20px 0 40px;
}

.generation-card {
  background: rgba(25, 35, 65, 0.05);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.generation-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

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

.modern-input-section {
  margin-bottom: 30px;
}

.prompt-container {
  margin-bottom: 30px;
}

.modern-prompt-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(25, 35, 65, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 15px;
  padding: 25px;
  backdrop-filter: blur(10px);
}

.modern-textarea {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 80px;
  outline: none;
  font-family: inherit;
}

.modern-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* ==== GENERATE BUTTON ==== */
.modern-generate-btn {
  background: var(--button-primary);
  border: none;
  padding: 18px 40px;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px var(--glow-color);
  align-self: flex-start;
}

.modern-generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px var(--glow-color);
}

.modern-generate-btn.generating {
  cursor: not-allowed;
  transform: none;
  animation: pulse-generating 2s ease-in-out infinite;
}

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

@keyframes pulse-generating {
  0%, 100% { 
    box-shadow: 0 8px 30px var(--glow-color);
  }
  50% { 
    box-shadow: 0 12px 40px var(--glow-color);
    transform: translateY(-1px);
  }
}

.btn-icon {
  font-size: 1.2rem;
}

.btn-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.generate-button:hover .btn-glow {
  opacity: 1;
}

/* ==== ERROR ALERT ==== */
.error-alert {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #f44336;
  padding: 12px 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.error-alert.hidden {
  display: none;
}

/* ==== GENERATION INFO ==== */
.generation-info {
  margin-top: 20px;
}

.info-card {
  background: rgba(25, 35, 65, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.info-icon {
  font-size: 1.5rem;
  min-width: 30px;
}

.info-content h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.info-content p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ==== RESULTS SECTION ==== */
.results-section {
  padding: 20px 0;
}

.gallery-header {
  text-align: center;
  margin-bottom: 30px;
}

.gallery-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.gallery-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.modern-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 30px 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==== IMAGE CARDS ==== */
.image-card {
  position: relative;
  background: rgba(25, 35, 65, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.image-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(108, 92, 231, 0.5);
  box-shadow: 0 20px 40px rgba(108, 92, 231, 0.2);
}

.image-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 15px 15px 0 0;
  transition: all 0.4s ease;
  aspect-ratio: 1;
  object-fit: cover;
  background: linear-gradient(45deg, rgba(108, 92, 231, 0.1), rgba(74, 144, 226, 0.1));
}

.image-card:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Image Card Overlay */
.image-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(74, 144, 226, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 18px;
  z-index: 1;
}

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

/* Image Card Actions */
.image-card-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 15px 12px 12px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 2;
  border-radius: 0 0 18px 18px;
}

.image-card:hover .image-card-actions {
  transform: translateY(0);
}

.image-card-info {
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 10px;
  text-align: center;
}

/* Prompt display styles */
.image-card-prompt {
  background: rgba(108, 92, 231, 0.2);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--text-primary);
  max-height: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  cursor: help;
  transition: all 0.3s ease;
}

.image-card-prompt:hover {
  background: rgba(108, 92, 231, 0.3);
  border-color: rgba(108, 92, 231, 0.5);
  max-height: none;
  -webkit-line-clamp: unset;
}

.image-card-date {
  font-size: 0.7rem;
  color: var(--text-secondary);
  opacity: 0.8;
  text-align: center;
  margin-bottom: 6px;
}

.image-card-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.image-card-btn {
  background: rgba(108, 92, 231, 0.2);
  border: 1px solid rgba(108, 92, 231, 0.4);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.image-card-btn:hover {
  background: rgba(108, 92, 231, 0.4);
  transform: translateY(-2px);
}

/* Loading Card Animation */
.loading-card {
  background: linear-gradient(45deg, rgba(108, 92, 231, 0.1), rgba(74, 144, 226, 0.1));
  border: 1px solid rgba(108, 92, 231, 0.3);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-loading 2s ease-in-out infinite;
}

@keyframes pulse-loading {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Gallery Empty State */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.gallery-empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.gallery-empty-text {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.gallery-empty-subtext {
  font-size: 1.1rem;
  opacity: 0.8;
}

/* ==== DROPDOWNS ==== */
.dropdown {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.dropdown-toggle {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.15), rgba(74, 144, 226, 0.15));
  border: 1px solid rgba(108, 92, 231, 0.3);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 25px;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.dropdown-toggle:hover {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.25), rgba(74, 144, 226, 0.25));
  border-color: rgba(108, 92, 231, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
}

.dropdown-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
  margin-left: 6px;
  vertical-align: middle;
}

.dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(25, 35, 65, 0.98);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 15px;
  padding: 15px;
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  margin-top: 5px;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 5px;
}

.dropdown-link:last-child {
  margin-bottom: 0;
}

.dropdown-link:hover {
  background: rgba(108, 92, 231, 0.15);
  transform: translateX(8px);
  box-shadow: 0 5px 15px rgba(108, 92, 231, 0.2);
}

.dropdown-link.active {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(74, 144, 226, 0.2));
  border: 1px solid rgba(108, 92, 231, 0.4);
  box-shadow: 0 5px 20px rgba(108, 92, 231, 0.3);
}

/* ==== USER SECTION ==== */
.user-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.balance-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.balance-display:hover {
  background: rgba(108, 92, 231, 0.2);
  transform: translateY(-1px);
}

/* Резервируем место для всего user-section */
.user-section {
  min-width: 280px; /* Фиксированная ширина для стабильности */
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Стили для элементов баланса */
#balance-amount {
  font-size: 0.9rem;
  font-weight: 600;
}

.balance-placeholder {
  /* Placeholder для баланса - резервирует место */
  color: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  user-select: none;
  pointer-events: none;
}

/* Скрываем placeholder когда баланс загружен */
#balance-amount:not([style*="display: none"]) ~ .balance-placeholder {
  display: none;
}

/* Стили для checkout.html */
.balance-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.balance-container .balance-placeholder {
  color: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  user-select: none;
  pointer-events: none;
}

.balance-container #balance-amount {
  font-size: 0.9rem;
  font-weight: 600;
}

.balance-icon {
  width: 18px;
  height: 18px;
}

/* ==== PROFILE DROPDOWN ==== */
.profile-dropdown {
  position: relative;
}

.profile-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 15px 25px;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  /* Резервируем фиксированную ширину для email */
  min-width: 180px;
  max-width: 250px;
}

.profile-btn:hover {
  color: var(--text-primary);
  background: rgba(108, 92, 231, 0.1);
  transform: translateY(-2px);
}

.profile-btn #headerEmail {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 120px !important;
  display: inline-block !important;
}

/* Placeholder для email */
.email-placeholder {
  color: transparent;
  user-select: none;
  pointer-events: none;
  position: absolute;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

/* Скрываем placeholder когда email загружен и не равен "Profile" */
#headerEmail:not([style*="display: none"]):not(:empty) ~ .email-placeholder {
  display: none;
}

.status-dot {
  position: relative;
  width: 10px;
  height: 10px;
  background: #4caf50;
  border-radius: 50%;
  margin-left: 8px;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(25, 35, 65, 0.98);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 15px;
  padding: 0;
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  margin-top: 8px;
  z-index: 1000;
  overflow: hidden;
}

.profile-dropdown:hover .profile-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-info {
  padding: 20px 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid rgba(108, 92, 231, 0.2);
  margin-bottom: 10px;
}

.profile-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #4a90e2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  border: 2px solid rgba(108, 92, 231, 0.3);
  flex-shrink: 0;
}

.profile-details {
  flex: 1;
  min-width: 0;
}

.profile-name {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.3;
  max-width: 160px !important;
}

.profile-status {
  display: block;
  color: #4CAF50;
  font-size: 0.85rem;
  font-weight: 500;
}

.menu-item {
  display: flex;
  align-items: center; 
  gap: 15px;
  padding: 18px 25px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 500;
}

.menu-item:hover {
  background: rgba(108, 92, 231, 0.1);
  transform: translateX(5px);
}

.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0;
}

/* ==== MODAL ==== */
.modern-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 2000;
  overflow: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modern-modal.modal-opening {
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modern-modal.modal-opening .modal-backdrop {
  opacity: 1;
}

.modal-content {
  position: relative;
  background: rgba(25, 35, 65, 0.95);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 20px;
  max-width: 90vw;
  max-height: 90vh;
  margin: 5vh auto;
  padding: 30px;
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  z-index: 2001;
  transform: scale(0.8) translateY(-50px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modern-modal.modal-opening .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute !important;
  top: 15px !important;
  right: 20px !important;
  background: none !important;
  border: none !important;
  font-size: 2rem !important;
  color: var(--text-secondary) !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  z-index: 2002 !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
}

.modal-close:hover {
  color: var(--text-primary);
  transform: rotate(90deg);
}

.modal-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.modal-image {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: block;
  margin: 0 auto;
  transform: scale(0.95);
  transition: transform 0.4s ease;
}

.modern-modal.modal-opening .modal-image {
  transform: scale(1);
}

.modal-prompt-container {
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
  backdrop-filter: blur(10px);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease 0.2s;
}

.modern-modal.modal-opening .modal-prompt-container {
  transform: translateY(0);
  opacity: 1;
}

.modal-prompt-label {
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 10px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-prompt-label::before {
  content: "✨";
  font-size: 1.1rem;
}

.modal-prompt-text {
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 0.95rem;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease 0.3s;
}

.modern-modal.modal-opening .modal-actions {
  transform: translateY(0);
  opacity: 1;
}

.modern-download-btn {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.15), rgba(74, 144, 226, 0.15));
  border: 1px solid rgba(108, 92, 231, 0.3);
  color: var(--text-primary);
  padding: 12px 25px;
  border-radius: 25px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.modern-download-btn:hover {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.25), rgba(74, 144, 226, 0.25));
  border-color: rgba(108, 92, 231, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(108, 92, 231, 0.2);
}

/* ==== FAQ SECTION ==== */
.faq-section {
  padding: 60px 0;
  background: rgba(25, 35, 65, 0.03);
}

.faq-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.faq-header {
  text-align: center;
  margin-bottom: 50px;
}

.faq-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.faq-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-item {
  background: rgba(25, 35, 65, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(108, 92, 231, 0.4);
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.1);
}

.faq-checkbox {
  display: none;
}

.question {
  display: block;
  padding: 20px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  position: relative;
  padding-right: 50px;
}

.question::after {
  content: '+';
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: rgba(108, 92, 231, 0.6);
  transition: transform 0.3s ease;
}

.faq-checkbox:checked + .question::after {
  transform: translateY(-50%) rotate(45deg);
}

.answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.answer p {
  padding: 0 25px 20px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.faq-checkbox:checked ~ .answer {
  max-height: 300px;
}

/* ==== FOOTER ==== */
.modern-footer {
  background: linear-gradient(135deg, rgba(15, 15, 35, 0.95) 0%, rgba(26, 26, 46, 0.98) 100%);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 20px;
  margin-top: 100px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
}

.footer-section h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 400px;
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.footer-section ul li a:hover {
  color: var(--text-primary);
  transform: translateX(5px);
  display: inline-block;
}

.footer-bottom {
  border-top: 1px solid rgba(108, 92, 231, 0.2);
  padding-top: 30px;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom-content p {
  color: var(--text-secondary);
  margin: 0;
}

.payment-methods {
  display: flex;
  gap: 15px;
  align-items: center;
}

.payment-methods img {
  height: 30px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.payment-methods img:hover {
  opacity: 1;
}

/* ==== ALERT MODAL ==== */
.modern-alert-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modern-alert-modal.show {
  opacity: 1;
}

.alert-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.alert-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(25, 35, 65, 0.98);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.modern-alert-modal.show .alert-modal-content {
  transform: translate(-50%, -50%) scale(1);
}

.alert-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.alert-message {
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.modern-alert-btn {
  background: var(--button-primary);
  border: none;
  padding: 12px 35px;
  border-radius: 25px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

.modern-alert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(108, 92, 231, 0.4);
}

/* ==== PARTICLES BACKGROUND ==== */
.particles-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: rgba(108, 92, 231, 0.3);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) {
  width: 8px;
  height: 8px;
  left: 10%;
  top: 20%;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  width: 6px;
  height: 6px;
  left: 80%;
  top: 30%;
  animation-delay: 1s;
}

.particle:nth-child(3) {
  width: 12px;
  height: 12px;
  left: 60%;
  top: 60%;
  animation-delay: 2s;
}

.particle:nth-child(4) {
  width: 10px;
  height: 10px;
  left: 20%;
  top: 80%;
  animation-delay: 3s;
}

.particle:nth-child(5) {
  width: 14px;
  height: 14px;
  left: 90%;
  top: 70%;
  animation-delay: 4s;
}

.particle:nth-child(6) {
  width: 8px;
  height: 8px;
  left: 30%;
  top: 10%;
  animation-delay: 1.5s;
}

.particle:nth-child(7) {
  width: 12px;
  height: 12px;
  left: 70%;
  top: 40%;
  animation-delay: 2.5s;
}

.particle:nth-child(8) {
  width: 6px;
  height: 6px;
  left: 50%;
  top: 90%;
  animation-delay: 3.5s;
}

.particle:nth-child(9) {
  width: 10px;
  height: 10px;
  left: 40%;
  top: 50%;
  animation-delay: 0.5s;
}

.particle:nth-child(10) {
  width: 8px;
  height: 8px;
  left: 85%;
  top: 15%;
  animation-delay: 4.5s;
}

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

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .hero-title {
    font-size: 2rem;
  }

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

  .generation-card {
    padding: 25px;
  }

  .modern-prompt-box {
    padding: 20px;
  }

  .modern-generate-btn {
    padding: 15px 30px;
    font-size: 1rem;
  }

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

  .modern-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  .faq-title {
    font-size: 2rem;
  }

  .dropdown-content {
    min-width: 240px;
  }

  .profile-btn {
    padding: 12px 20px;
    font-size: 1rem;
  }

  .burger-menu {
    display: block;
  }

  .header-center,
  .header-left,
  .header-right {
    display: none;
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(25, 35, 65, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(108, 92, 231, 0.3);
    padding: 20px;
    z-index: 999;
  }

  .nav-menu.active {
    display: block;
  }

  .nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .nav-menu ul li {
    margin-bottom: 10px;
  }

  .nav-menu ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    border-radius: 10px;
    transition: all 0.2s ease;
  }

  .nav-menu ul li a:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .header-content {
    padding: 0 20px;
  }
}
