/* CSS Variables for Theme */
:root {
  --primary-orange: #f97316;
  --orange-light: #fed7aa;
  --orange-dark: #ea580c;
  --bg-color: #ffffff;
  --bg-secondary: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --glow-color: rgba(249, 115, 22, 0.3);
  --card-bg: #ffffff;
  --gradient-primary: linear-gradient(135deg, #f97316, #ea580c);
  --gradient-secondary: linear-gradient(135deg, #fed7aa, #f97316);
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-color: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-color: #334155;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --card-bg: #1e293b;
  --glow-color: rgba(249, 115, 22, 0.5);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s ease;
}

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

/* Header Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

[data-theme="dark"] .header {
  background: rgba(15, 23, 42, 0.8);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.nav-logo {
  font-size: 1.5rem;
}

.nav-title {
  font-family: 'Space Mono', monospace;
  color: var(--primary-orange);
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-orange);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
}

.theme-toggle {
  cursor: pointer;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px var(--shadow-color);
}

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

/* Hero Section */
.hero {
  padding: 8rem 1.5rem 4rem;
  text-align: center;
  background: var(--bg-color);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, var(--glow-color) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

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

.glow-text {
  text-shadow: 0 0 30px var(--glow-color);
}

.emoji {
  font-size: 0.8em;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.highlight {
  color: var(--primary-orange);
  font-weight: 600;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 3rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-orange);
  font-family: 'Space Mono', monospace;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cta-button {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--glow-color);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--glow-color);
}

/* Search Section */
.search-section {
  background: var(--bg-secondary);
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

.search-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.search-box {
  position: relative;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px var(--glow-color);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--text-muted);
}

.filter-tags {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-tag {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--primary-orange);
  color: white;
  border-color: var(--primary-orange);
}

/* Prompts Section */
.prompts-section {
  padding: 4rem 0;
  background: var(--bg-color);
}

.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.prompt-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.prompt-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow-color);
  border-color: var(--primary-orange);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card-author {
  color: var(--primary-orange);
}

.card-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-color);
}

.card-image {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  position: relative;
}

.image-label {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.card-content {
  padding: 1.5rem;
}

.prompt-text {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
}

.copy-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary-orange);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.copy-button:hover {
  background: var(--orange-dark);
  transform: scale(1.05);
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-tag {
  background: var(--orange-light);
  color: var(--orange-dark);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

[data-theme="dark"] .card-tag {
  background: rgba(249, 115, 22, 0.2);
  color: var(--orange-light);
}

/* About Section */
.about-section {
  background: var(--bg-secondary);
  padding: 4rem 0;
}

.about-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

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

.about-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.feature-item {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow-color);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-item p {
  color: var(--text-secondary);
}

/* Footer */
.footer {
  background: var(--text-primary);
  color: var(--bg-color);
  padding: 3rem 0 1rem;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.footer-logo {
  font-size: 1.5rem;
}

.footer-title {
  font-family: 'Space Mono', monospace;
  color: var(--primary-orange);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

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

.footer-link:hover {
  color: var(--primary-orange);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Copy Toast */
.copy-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-orange);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  box-shadow: 0 4px 12px var(--shadow-color);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.copy-toast.show {
  transform: translateY(0);
  opacity: 1;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    gap: 1rem;
  }

  .hero {
    padding: 6rem 1rem 3rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

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

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }

  .filter-tags {
    gap: 0.5rem;
  }

  .copy-toast {
    right: 1rem;
    left: 1rem;
  }
}

@media (max-width: 480px) {
  .card-images {
    grid-template-columns: 1fr;
  }

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

/* Loading Animation */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Focus Styles */
button:focus,
input:focus,
.nav-link:focus {
  outline: 2px solid var(--primary-orange);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--glow-color);
  color: var(--text-primary);
}