/* ListCraft AI — Styles */
:root {
    --primary: #2563EB;
    --primary-dark: #1d4ed8;
    --accent: #10B981;
    --accent-dark: #059669;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px 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: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Navbar */
.navbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { font-size: 1.5rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.navbar-brand:hover { text-decoration: none; }
.navbar-nav { display: flex; align-items: center; gap: 16px; }
.navbar-nav a, .navbar-nav button { font-size: 0.95rem; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius); font-size: 0.95rem;
    font-weight: 500; cursor: pointer; border: none; transition: all 0.2s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-alt); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 4px; color: var(--text); }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.95rem; transition: border-color 0.2s;
    font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-textarea { min-height: 80px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Cards */
.card {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px;
    box-shadow: var(--shadow);
}

/* Hero */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
}
.hero h1 { font-size: 3rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.25rem; color: var(--text-light); max-width: 600px; margin: 0 auto 32px; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 48px; font-size: 1.1rem; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 960px; margin: 0 auto; }
.pricing-card { text-align: center; padding: 32px 24px; position: relative; }
.pricing-card.featured { border-color: var(--primary); border-width: 2px; }
.pricing-card .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; padding: 4px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.pricing-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.pricing-card .price { font-size: 2.5rem; font-weight: 800; color: var(--primary); }
.pricing-card .price-sub { color: var(--text-light); font-size: 0.9rem; margin-bottom: 24px; }
.pricing-card ul { list-style: none; margin-bottom: 24px; text-align: left; }
.pricing-card ul li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.pricing-card ul li::before { content: '✓'; color: var(--accent); margin-right: 8px; font-weight: 700; }

/* Demo */
.demo-section { max-width: 800px; margin: 0 auto; }

/* Results */
.variation-card {
    background: var(--bg-alt); border-radius: var(--radius);
    padding: 20px; margin-bottom: 16px; position: relative;
}
.variation-card .variation-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.variation-card .variation-label { font-weight: 600; color: var(--primary); font-size: 0.9rem; }
.variation-card p { line-height: 1.7; }
.copy-btn { background: none; border: 1px solid var(--border); padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.copy-btn:hover { background: var(--border); }
.copy-btn.copied { background: var(--accent); color: white; border-color: var(--accent); }

/* Dashboard */
.dashboard-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.credit-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: #eff6ff; color: var(--primary); padding: 8px 16px;
    border-radius: 20px; font-weight: 600; font-size: 0.95rem;
}
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab {
    padding: 12px 20px; cursor: pointer; font-weight: 500; color: var(--text-light);
    border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
    background: none; border-top: none; border-left: none; border-right: none; font-size: 0.95rem;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab:hover { color: var(--text); }

/* History */
.listing-item {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all 0.2s;
}
.listing-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.listing-item .listing-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.listing-item .listing-title { font-weight: 600; }
.listing-item .listing-date { font-size: 0.85rem; color: var(--text-light); }
.listing-item .listing-details { font-size: 0.9rem; color: var(--text-light); margin-top: 4px; }

/* FAQ */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-q { font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-q::after { content: '+'; font-size: 1.5rem; color: var(--text-light); transition: transform 0.2s; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; color: var(--text-light); }
.faq-item.open .faq-a { max-height: 200px; padding-top: 12px; }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.testimonial-card { padding: 24px; }
.testimonial-card .stars { color: #f59e0b; margin-bottom: 12px; font-size: 1.2rem; }
.testimonial-card blockquote { font-style: italic; margin-bottom: 12px; line-height: 1.6; }
.testimonial-card .author { font-weight: 600; font-size: 0.9rem; }
.testimonial-card .role { color: var(--text-light); font-size: 0.85rem; }

/* Auth Modal */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 200; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg); border-radius: var(--radius-lg); padding: 32px;
    width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); position: relative;
}
.modal-close {
    position: absolute; top: 12px; right: 16px; background: none; border: none;
    font-size: 1.5rem; cursor: pointer; color: var(--text-light);
}
.modal h2 { margin-bottom: 24px; }

/* Alerts */
.alert {
    padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.9rem;
}
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* Loading */
.spinner {
    display: inline-block; width: 20px; height: 20px;
    border: 2px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { display: inline-flex; align-items: center; gap: 8px; }

/* Footer */
.footer {
    background: var(--text); color: #9ca3af; padding: 40px 0; text-align: center;
    font-size: 0.9rem; margin-top: 64px;
}
.footer a { color: #d1d5db; }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 360px; }
    .dashboard-header { flex-direction: column; align-items: flex-start; }
    .navbar-nav { gap: 8px; }
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
