:root {
  /* Color Palette - Dark Premium Theme */
  --bg-dark: #050505;
  --bg-surface: rgba(255, 255, 255, 0.03);
  --bg-surface-hover: rgba(255, 255, 255, 0.05);
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-neon-blue: #00f0ff;
  --accent-neon-purple: #ff00ea;
  --accent-gradient: linear-gradient(135deg, var(--accent-neon-blue), var(--accent-neon-purple));
  
  --border-light: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(0, 240, 255, 0.5);

  --shadow-glow: 0 0 20px rgba(0, 240, 255, 0.2), 0 0 40px rgba(255, 0, 234, 0.1);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.4);

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Animations */
.bg-gradient-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-dark);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-neon-purple);
  top: -10%;
  left: -10%;
  animation-duration: 25s;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: var(--accent-neon-blue);
  bottom: -20%;
  right: -10%;
  animation-duration: 30s;
  animation-delay: -5s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: #4f46e5;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 20s;
  animation-delay: -10s;
}

.glass-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(100px);
  background: rgba(5, 5, 5, 0.5);
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 30px) scale(1.1); }
  100% { transform: translate(-30px, 60px) scale(0.9); }
}

/* Base Layout */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Typography & Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* Navigation */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-icon {
  color: var(--accent-neon-blue);
  width: 24px;
  height: 24px;
}

.accent-text {
  color: var(--accent-neon-purple);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link i {
  width: 18px;
  height: 18px;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  margin-bottom: 2rem;
  animation: slideDown 0.6s ease-out;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-neon-blue);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-neon-blue);
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
  animation-fill-mode: backwards;
}

/* Glassmorphism Classes */
.glass-card {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  position: relative;
  transition: var(--transition-smooth);
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0.5;
}

/* Generator Form Container */
.generator-container {
  width: 100%;
  max-width: 680px;
  position: relative;
  z-index: 10;
}

.form-card {
  padding: 2.5rem;
  animation: scaleUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
  animation-fill-mode: backwards;
}

.ai-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 0.25rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  transition: var(--transition-smooth);
}

input, select {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  padding: 1rem 1rem 1rem 3rem;
  border-radius: 12px;
  outline: none;
  transition: var(--transition-smooth);
  appearance: none;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus, select:focus {
  border-color: var(--accent-neon-blue);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.1);
  background: rgba(0, 0, 0, 0.6);
}

input:focus + .input-icon, select:focus + .input-icon {
  color: var(--accent-neon-blue);
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%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: right 1rem center;
  background-size: 1em;
}

select option {
  background: #111;
  color: #fff;
}

/* Big Shiny Button */
.btn-generate {
  margin-top: 1rem;
  position: relative;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 1.25rem;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: var(--transition-smooth);
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

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

.btn-generate:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.4), 0 0 50px rgba(255, 0, 234, 0.2);
}

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

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

.btn-generate .btn-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.btn-generate:hover .btn-icon {
  transform: rotate(15deg) scale(1.1);
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  animation: fadeIn 0.4s ease-out;
}

.spinner-ring {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-neon-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  color: var(--accent-neon-blue);
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.05em;
  animation: pulse-op 1.5s ease-in-out infinite;
}

/* Results Section */
.results-container {
  margin-top: 3rem;
  width: 100%;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.results-header h2 {
  font-size: 1.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: var(--font-heading);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary i {
  width: 16px;
  height: 16px;
}

/* Result Cards */
.results-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-card {
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.8) 0%, rgba(10, 10, 10, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  padding-top: 1.25rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);

  /* Animation */
  opacity: 0;
  transform: translateY(20px);
}

/* Active State for staggered animation */
.results-container.active .result-card {
  animation: staggerFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--stagger-idx) * 0.15s + 0.1s);
}

.result-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.result-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-card-header h3 {
  font-size: 1.125rem;
  color: var(--accent-neon-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-card-header h3 i {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.icon-btn.copied {
  color: #10b981; /* Emerald green */
}

.result-content {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.result-content .highlight {
  color: var(--accent-neon-purple);
  font-weight: 500;
}

.ideas-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ideas-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ideas-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-neon-purple);
  box-shadow: 0 0 8px var(--accent-neon-purple);
}

.ideas-list li b {
  color: var(--text-primary);
  font-family: var(--font-heading);
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.heart-icon {
  width: 14px;
  height: 14px;
  color: #ef4444;
  vertical-align: middle;
  margin: 0 0.25rem;
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Animations */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(0, 240, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); }
}

@keyframes pulse-op {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsiveness */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .form-card {
    padding: 1.5rem;
  }
  
  .top-nav {
    padding: 1rem 1.5rem;
  }
}
