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

:root {
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --primary-dark: #0f766e;
  --accent: #f59e0b;
  --dark: #0f172a;
  --light: #f8fafc;
  --white: #ffffff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #e2e8f0;
  
  --bg: #f1f5f9;
  --text: #1e293b;
  --text-muted: #64748b;
  
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-backdrop: blur(12px);
  --nav-bg: rgba(255, 255, 255, 0.95);
  
  --gradient-primary: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --card-bg: rgba(30, 41, 59, 0.7);
  --nav-bg: rgba(15, 23, 42, 0.95);
  --border: #334155;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; margin-bottom: 1rem; color: var(--text); }

/* Layout & Container */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.bg-light { background: var(--bg); }
.bg-dark { background: var(--dark); color: var(--white); }

/* Navigation */
.navbar {
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}
.navbar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.navbar.bg-dark {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid #334155;
}
.navbar.bg-dark .logo {
  background: none;
  -webkit-text-fill-color: var(--white);
  color: var(--white) !important;
}
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-weight: 500; }
.nav-links a:not(.btn) { color: var(--text-muted); }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--primary); }
.navbar.bg-dark .nav-links a:not(.btn) { color: #cbd5e1; }
.navbar.bg-dark .nav-links a:not(.btn):hover, .navbar.bg-dark .nav-links a.active { color: var(--white); }

/* Glassmorphism Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: var(--card-backdrop);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Forms & Inputs */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.form-control, input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-weight: 500;
  text-align: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient-primary);
  color: var(--white) !important;
  box-shadow: 0 4px 6px -1px rgba(15, 118, 110, 0.2);
}
.btn-primary:hover {
  box-shadow: 0 6px 10px -1px rgba(15, 118, 110, 0.3);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}
.navbar.bg-dark .btn-outline {
  color: var(--white);
  border-color: rgba(255,255,255,0.2);
}
.navbar.bg-dark .btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}
.btn-success { background: var(--success); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-block { display: block; width: 100%; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
}
.badge-secondary { background: #e2e8f0; color: #475569; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }

/* Tables */
.table-responsive { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
}
.table th, .table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.table tr:last-child td { border-bottom: none; }

/* Grid Helpers */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.grid-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; }

/* Auth Layout */
.auth-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; padding: 2rem; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  background: none;
  border: none;
}
.navbar.bg-dark .nav-toggle { color: var(--white); }
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }
  .navbar.bg-dark .nav-links {
    background: rgba(15, 23, 42, 0.98);
    border-color: #334155;
  }
  .nav-links a { margin: 0.5rem 0; width: 100%; text-align: center; }
  .nav-links.active { display: flex; }
  .grid-layout { grid-template-columns: 1fr; }
}

/* Utilities */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }
.text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--dark);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1000;
  font-weight: 500;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* --- PREMIUM LANDING PAGE STYLES --- */
.hero {
  position: relative;
  padding: 8rem 0 6rem;
  overflow: hidden;
  text-align: center;
  background: radial-gradient(circle at center, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0%, rgba(15, 118, 110, 0.05) 25%, transparent 50%);
  animation: spin 30s linear infinite;
  z-index: -1;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease forwards;
}
[data-theme="dark"] .hero h1 {
  background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  animation-delay: 0.2s;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  animation-delay: 0.4s;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Premium Features */
.section { padding: 6rem 0; }
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}
.feature-card {
  text-align: center;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(145deg, var(--card-bg), rgba(255, 255, 255, 0.4));
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}
[data-theme="dark"] .feature-card {
  background: linear-gradient(145deg, var(--card-bg), rgba(30, 41, 59, 0.4));
}
.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  color: var(--white);
  font-size: 1.5rem;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

/* Skeleton Loader */
.skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}
.skeleton-line {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
.skeleton-line.title {
    height: 30px;
    width: 60%;
    margin-bottom: 20px;
}
.skeleton-line.short {
    width: 80%;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Premium Typography for AI Output */
.preview-box {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.8;
    color: #374151;
    font-size: 15px;
    transition: opacity 0.3s ease;
}
.preview-box h3, .preview-box h4 {
    color: #111827;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
}
.preview-box p {
    margin-bottom: 1em;
}
.preview-box ul, .preview-box ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}
.preview-box li {
    margin-bottom: 0.5em;
}
.preview-box strong {
    color: #1f2937;
    font-weight: 600;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  transition: transform 0.3s ease;
}

/* Social Proof */
.social-proof {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
  text-align: center;
}
.brand-logos {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  opacity: 0.6;
  margin-top: 1.5rem;
  filter: grayscale(100%);
  transition: 0.3s;
}
.brand-logos:hover { opacity: 1; filter: grayscale(0%); }

/* Pricing Premium */
.pricing-card {
  position: relative;
  overflow: hidden;
}
.pricing-card.popular::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: var(--gradient-primary);
}
.pricing-card .price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.5rem 0;
}
.pricing-card .price span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}
.pricing-card ul {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
}
.pricing-card ul li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pricing-card ul li::before {
  content: '✓';
  color: var(--success);
  font-weight: bold;
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-list details {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.faq-list details[open] {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.faq-list summary {
  font-weight: 600;
  font-size: 1.1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  color: var(--primary);
  font-size: 1.5rem;
  transition: 0.3s;
}
.faq-list details[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}
.faq-list p { margin-top: 1rem; color: var(--text-muted); }

/* Scroll Reveal Utility */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- APP LAYOUTS (Dashboard, Generate, Auth) --- */

/* Generate Page Layout */
.generator-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}
@media (min-width: 992px) {
  .generator-layout {
    grid-template-columns: 450px 1fr;
  }
}
.form-panel {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.preview-panel {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  min-height: 600px;
  position: sticky;
  top: 100px;
}
.preview-box {
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  min-height: 500px;
  max-height: 700px;
  overflow-y: auto;
}
.preview-box.watermark {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300" opacity="0.05"><text x="50" y="150" font-size="40" font-family="sans-serif" transform="rotate(-45 150 150)" fill="%23000">PREVIEW</text></svg>');
  background-repeat: repeat;
}
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}
.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.tab-btn:hover {
  color: var(--primary);
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Dashboard Sidebar */
.sidebar {
  position: sticky;
  top: 100px;
}
.table tr:hover td {
  background-color: rgba(20, 184, 166, 0.05);
}

/* Authentication Pages */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.15) 0%, transparent 40%),
              radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.15) 0%, transparent 40%), var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 450px;
  padding: 3rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  border-top: 4px solid var(--primary);
}
