/* ============================================
   AI THUMBNAIL CREATOR - Main Stylesheet
   ============================================ */

/* CSS Custom Properties */
:root {
  --primary-gradient: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --dark-bg: #0f172a;
  --dark-card: #1e293b;
  --dark-text: #e2e8f0;
  --light-bg: #ffffff;
  --light-card: #f8fafc;
  --light-text: #334155;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--light-text);
  background-color: var(--light-bg);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: #2563eb; }

ul { list-style: none; }

/* Utility Classes */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 80px 0; }

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: #64748b;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--secondary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--light-text);
}

.btn-outline:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; }

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

body.dark-mode .navbar {
  background: rgba(15, 23, 42, 0.95);
  border-bottom-color: #334155;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo span { color: var(--light-text); }
body.dark-mode .nav-logo span { color: var(--dark-text); }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--light-text);
  position: relative;
}

.nav-links a:hover { color: #3b82f6; }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #3b82f6;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-links a:hover::after { transform: scaleX(1); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--light-text);
}

/* Hero Section */
.hero {
  padding-top: 160px;
  padding-bottom: 100px;
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(240,249,255,1) 100%);
}

body.dark-mode .hero { background: linear-gradient(180deg, var(--dark-bg) 0%, #0f172a 100%); }

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

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

.hero-text p { font-size: 1.25rem; color: #64748b; margin-bottom: 2rem; }

body.dark-mode .hero-text p { color: #94a3b8; }

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.hero-shape-1 { width: 200px; height: 200px; background: var(--accent-gradient); opacity: 0.3; top: -50px; right: -50px; }
.hero-shape-2 { width: 150px; height: 150px; background: var(--secondary-gradient); opacity: 0.3; bottom: -30px; left: -30px; animation-delay: 2s; }
.hero-shape-3 { width: 80px; height: 80px; background: var(--primary-gradient); opacity: 0.4; top: 40%; right: 10%; animation-delay: 4s; }

/* Features Section */
.features {
  background: var(--light-card);
}

body.dark-mode .features { background: #0f172a; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

body.dark-mode .feature-card { background: var(--dark-card); border-color: #334155; }

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--secondary-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: white;
  font-size: 1.75rem;
}

.feature-card h3 { margin-bottom: 0.75rem; font-size: 1.25rem; }
.feature-card p { color: #64748b; }

/* How It Works */
.how-it-works {
  background: var(--light-bg);
}

body.dark-mode .how-it-works { background: var(--dark-bg); }

.work-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  position: relative;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
}

.step-card h3 { margin-bottom: 1rem; font-size: 1.25rem; }
.step-card p { color: #64748b; }

/* Template Showcase */
.template-showcase {
  background: var(--light-card);
}

body.dark-mode .template-showcase { background: #0f172a; }

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.template-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

body.dark-mode .template-card { background: var(--dark-card); }

.template-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
  border-color: #3b82f6;
}

.template-preview {
  height: 120px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

body.dark-mode .template-preview { background: #1e293b; }

.template-preview img { width: 100%; height: 100%; object-fit: cover; }
.template-name {
  padding: 1rem;
  font-weight: 600;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

body.dark-mode .template-name { border-color: #334155; }

/* Testimonials */
.testimonials {
  background: var(--primary-gradient);
  color: white;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 16px;
}

.testimonial-card p { color: white; font-style: italic; margin-bottom: 1.5rem; }
.testimonial-author { display: flex; align-items: center; gap: 1rem; }
.author-avatar { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.3); }
.author-info h4 { font-size: 1rem; }
.author-info span { font-size: 0.875rem; opacity: 0.8; }

/* FAQ Section */
.faq { background: var(--light-card); }

body.dark-mode .faq { background: #0f172a; }

.faq-item { border-bottom: 1px solid var(--border-color); margin-bottom: 1rem; }

body.dark-mode .faq-item { border-color: #334155; }

.faq-question {
  padding: 1.5rem 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.125rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover { color: #3b82f6; }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: #64748b;
  padding-bottom: 1rem;
}

.faq-item.active .faq-answer { max-height: 500px; }

.faq-item.active .faq-icon { transform: rotate(180deg); }

/* Footer */
.footer {
  background: var(--dark-bg);
  color: #cbd5e1;
  padding: 4rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand h2 { color: white; margin-bottom: 1rem; font-size: 1.5rem; }
.footer-brand p { color: #94a3b8; line-height: 1.6; }

.footer-links h4 { color: white; margin-bottom: 1.5rem; font-size: 1rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #94a3b8; transition: color 0.2s; }
.footer-links a:hover { color: #3b82f6; }

.footer-newsletter input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: white;
  margin-bottom: 1rem;
}

.social-links { display: flex; gap: 1rem; margin-top: 1.5rem; }
.social-link {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #334155;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
}
.social-link:hover { background: var(--primary-gradient); transform: translateY(-2px); }

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright { font-size: 0.875rem; color: #94a3b8; }

/* Dark Mode Toggle */
.dark-mode-toggle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--secondary-gradient);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
  color: white;
}

.dark-mode-toggle:hover { transform: rotate(15deg); }

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toast {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: slideIn 0.3s ease;
  border-left: 4px solid var(--success-color);
  min-width: 300px;
}

.toast.success { border-left-color: var(--success-color); }
.toast.error { border-left-color: var(--danger-color); }
.toast.info { border-left-color: #3b82f6; }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

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

/* Animations */
.animate-fade-up { animation: fadeUp 0.6s ease forwards; opacity: 0; transform: translateY(30px); }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-text h1 { font-size: 2.5rem; }
  .hero-buttons { justify-content: center; }
  .hero-shape { display: none; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-md);
  }

  body.dark-mode .nav-links { background: var(--dark-card); }

  .nav-links.active { transform: translateY(0); }
  .nav-toggle { display: block; }
  .footer-content { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
