@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Color & Theme CSS Variables */
:root {
  --bg-deep-space: #050515;
  --bg-nebula: radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.15) 0%, transparent 40%),
                #050515;
  --card-bg: rgba(13, 13, 35, 0.55);
  --card-border: rgba(124, 58, 237, 0.18);
  --card-border-hover: rgba(6, 182, 212, 0.4);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --primary-glow: 0 0 15px rgba(124, 58, 237, 0.5);
  --secondary-glow: 0 0 15px rgba(6, 182, 212, 0.5);
  --accent-purple: #7c3aed;
  --accent-blue: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --button-hover-bg: rgba(6, 182, 212, 0.15);
  --success: #10b981;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  --header-height: 70px;
  --container-width: 1200px;
}

/* Light Theme Variables */
body.light-theme {
  --bg-deep-space: #f8fafc;
  --bg-nebula: radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
                #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(124, 58, 237, 0.15);
  --card-border-hover: rgba(6, 182, 212, 0.3);
  --text-main: #0f172a;
  --text-muted: #475569;
  --primary-glow: 0 0 15px rgba(124, 58, 237, 0.2);
  --secondary-glow: 0 0 15px rgba(6, 182, 212, 0.2);
  --button-hover-bg: rgba(124, 58, 237, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-nebula);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep-space);
}
::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
  box-shadow: var(--secondary-glow);
}

/* Layout Elements */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation Header */
header {
  height: var(--header-height);
  background: rgba(5, 5, 21, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background 0.3s ease;
}

body.light-theme header {
  background: rgba(248, 250, 252, 0.8);
}

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

/* Brand Logo (Spiral Galaxy + AI Circuit Lines) */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-wrapper {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.galaxy-svg {
  width: 100%;
  height: 100%;
  animation: rotateGalaxy 12s linear infinite;
  filter: drop-shadow(0 0 5px rgba(6, 182, 212, 0.7));
}

.circuit-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(124, 58, 237, 0.7));
}

.brand-text {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: flex;
  align-items: center;
  letter-spacing: 0.5px;
}

/* Navbar Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-blue);
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 60%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Toggle Button */
.theme-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--secondary-glow);
  transform: scale(1.05);
}

/* Base Buttons */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.7);
}

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

.btn-secondary:hover {
  background: var(--button-hover-bg);
  border-color: var(--accent-blue);
  box-shadow: var(--secondary-glow);
  transform: translateY(-2px);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Glassmorphism Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.15), 0 0 15px rgba(6, 182, 212, 0.1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Grid Layouts */
.grid {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Animations */
@keyframes rotateGalaxy {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes drawCircuit {
  0% {
    stroke-dashoffset: 200;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

/* Footer Section */
footer {
  margin-top: auto;
  background: rgba(5, 5, 21, 0.9);
  border-top: 1px solid rgba(124, 58, 237, 0.1);
  padding: 60px 0 30px 0;
  font-size: 14px;
  color: var(--text-muted);
}

body.light-theme footer {
  background: #f1f5f9;
  border-top: 1px solid rgba(124, 58, 237, 0.08);
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-description {
  line-height: 1.6;
  max-width: 320px;
}

.footer-title {
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent-blue);
}

.footer-newsletter {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.input-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: all 0.2s ease;
}

body.light-theme .input-field {
  background: #ffffff;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: var(--secondary-glow);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.light-theme .footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.social-icons {
  display: flex;
  gap: 16px;
}

.social-icon {
  color: var(--text-muted);
  font-size: 18px;
  transition: color 0.2s ease;
}

.social-icon:hover {
  color: var(--accent-blue);
}

/* Prompt Card Specific Styles */
.prompt-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.prompt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.ai-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-chatgpt { background: rgba(16, 163, 127, 0.15); color: #10a37f; border: 1px solid rgba(16, 163, 127, 0.3); }
.badge-gemini { background: rgba(26, 115, 232, 0.15); color: #4285f4; border: 1px solid rgba(26, 115, 232, 0.3); }
.badge-claude { background: rgba(217, 119, 6, 0.15); color: #d97706; border: 1px solid rgba(217, 119, 6, 0.3); }
.badge-grok { background: rgba(255, 255, 255, 0.15); color: var(--text-main); border: 1px solid rgba(255, 255, 255, 0.3); }
.badge-midjourney { background: rgba(124, 58, 237, 0.15); color: #a78bfa; border: 1px solid rgba(124, 58, 237, 0.3); }
.badge-leonardo-ai { background: rgba(219, 39, 119, 0.15); color: #f472b6; border: 1px solid rgba(219, 39, 119, 0.3); }
.badge-flux { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-stable-diffusion { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-ideogram { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.badge-template {
  background: var(--accent-gradient);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.prompt-card-fav {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
}

.prompt-card-fav:hover {
  transform: scale(1.2);
}

.prompt-card-fav.active {
  color: #ef4444;
  filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5));
}

.prompt-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prompt-card-title:hover {
  color: var(--accent-blue);
}

.prompt-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.prompt-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
  margin-top: auto;
}

body.light-theme .prompt-card-meta {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.prompt-card-category {
  display: flex;
  align-items: center;
  gap: 4px;
}

.prompt-card-copies {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Mobiles Toggle Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 24px;
  cursor: pointer;
}
