:root {
  --bg-color: #030008;
  --card-bg: rgba(10, 8, 20, 0.45);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(99, 102, 241, 0.25);
  --border-focus: rgba(99, 102, 241, 0.6);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary-grad: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #e0f2fe 100%);
  --hover-grad: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-color: #818cf8;
  --shadow-color: rgba(99, 102, 241, 0.15);
  --error-color: #f87171;
}

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.4);
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

.background-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.glow-1 {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  filter: blur(100px);
  animation: floatGlow1 20s ease-in-out infinite alternate;
}

.glow-2 {
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
  filter: blur(100px);
  animation: floatGlow2 20s ease-in-out infinite alternate;
}

@keyframes floatGlow1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8%, 8%) scale(1.08); }
}

@keyframes floatGlow2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-8%, -8%) scale(1.08); }
}

.app-container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  flex: 1;
}

.hero-header {
  text-align: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.logo:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(99, 102, 241, 0.15);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-svg {
  display: block;
  flex-shrink: 0;
}


.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.gradient-text {
  background: var(--primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.generator-card {
  background: linear-gradient(135deg, rgba(13, 11, 28, 0.5) 0%, rgba(8, 7, 16, 0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 3rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.5), 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 50px rgba(99, 102, 241, 0.05);
  position: relative;
  overflow: hidden;
}

.generator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), rgba(168, 85, 247, 0.4), transparent);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

textarea {
  width: 100%;
  min-height: 130px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.2rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

textarea:hover {
  border-color: rgba(99, 102, 241, 0.25);
  background: rgba(0, 0, 0, 0.3);
}

textarea:focus {
  border-color: var(--border-focus);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 
    0 0 20px rgba(99, 102, 241, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

textarea::-webkit-scrollbar-track {
  background: transparent;
}

textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.3);
  background-clip: padding-box;
}

textarea::-webkit-resizer {
  background: transparent;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.9rem 2.5rem 0.9rem 1.2rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.custom-select-trigger:hover {
  background-color: rgba(0, 0, 0, 0.3);
  border-color: rgba(99, 102, 241, 0.25);
}

.custom-select.open .custom-select-trigger {
  border-color: var(--border-focus);
  background-color: rgba(0, 0, 0, 0.35);
  box-shadow: 
    0 0 20px rgba(99, 102, 241, 0.15),
    inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.custom-arrow {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.custom-select.open .custom-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.custom-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(10, 8, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(99, 102, 241, 0.15);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  padding: 0.4rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.custom-select.open .custom-options {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.custom-option {
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.custom-option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.custom-option.selected {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  font-weight: 600;
}

#submit-btn {
  width: 100%;
  position: relative;
  overflow: hidden;
  padding: 1.2rem;
  border-radius: 14px;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #6366f1);
  background-size: 300% 100%;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 10px 25px rgba(168, 85, 247, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: gradientShift 6s linear infinite;
}

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

#submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 15px 35px rgba(168, 85, 247, 0.5),
    0 0 30px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#submit-btn:active {
  transform: translateY(1px);
}

#submit-btn:disabled {
  background: #1e1b29;
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  animation: none;
}

.error-banner {
  background: rgba(239, 68, 110, 0.1);
  border: 1px solid rgba(239, 68, 110, 0.3);
  color: #f87171;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  text-align: center;
  font-size: 0.95rem;
}

.results-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeIn 0.5s ease forwards;
}

.results-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.domain-card {
  background: linear-gradient(135deg, rgba(16, 14, 35, 0.45) 0%, rgba(8, 7, 18, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 1.5rem 2.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.domain-card:hover {
  transform: translateX(6px) scale(1.01);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3), 
    0 0 25px rgba(99, 102, 241, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(20, 18, 44, 0.5) 0%, rgba(10, 8, 22, 0.7) 100%);
}

.domain-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
  min-width: 220px;
}

.domain-name-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.domain-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(120deg, #f8fafc 40%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.premium-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f472b6;
  text-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.1);
}

.domain-explanation {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  flex: 1;
  margin: 0;
}

.domain-actions {
  display: flex;
  align-items: center;
  min-width: 180px;
}

.domain-actions .btn-action {
  width: 100%;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  outline: none;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-muted);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.15) 0%, rgba(192, 132, 252, 0.15) 100%);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: #e0e7ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.btn-primary:hover {
  border-color: rgba(129, 140, 248, 0.8);
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.3) 0%, rgba(192, 132, 252, 0.3) 100%);
  color: white;
  box-shadow: 
    0 10px 20px rgba(129, 140, 248, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.loading-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.loading-bar-wrapper {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.loading-bar-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  border-radius: 9999px;
  animation: loadingSlide 1.5s cubic-bezier(0.65, 0.05, 0.36, 1) infinite;
  position: absolute;
}

@keyframes loadingSlide {
  0% { left: -50%; width: 30%; }
  50% { width: 40%; }
  100% { left: 100%; width: 30%; }
}

.skeleton-header {
  height: 2.5rem;
  width: 250px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: pulse 1.5s infinite;
}

.skeleton-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skeleton-card {
  height: 85px;
  background: linear-gradient(135deg, rgba(16, 14, 35, 0.3) 0%, rgba(8, 7, 18, 0.4) 100%);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.skeleton-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.03) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.hidden {
  display: none !important;
}

.app-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: auto;
  padding-top: 2rem;
}

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

@keyframes pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

.label-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.idea-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--accent-color);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  user-select: none;
  outline: none;
}

.btn-text-action:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
}

.btn-text-action:active:not(:disabled) {
  transform: scale(0.95);
}

.btn-text-action:disabled {
  color: var(--text-muted);
  opacity: 0.5;
  cursor: not-allowed;
}

.spinner {
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

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

@media (max-width: 480px) {
  .label-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 2rem 1rem;
    gap: 2rem;
  }

  .hero-header h1 {
    font-size: 2.2rem;
  }

  .generator-card {
    padding: 1.5rem;
  }

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

  .domain-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.5rem;
  }

  .domain-card:hover {
    transform: translateY(-2px);
  }

  .domain-card-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: auto;
  }

  .domain-actions {
    min-width: auto;
    margin-top: 0.5rem;
  }

  .skeleton-card {
    height: 160px;
  }
}
