/* NewsPulse Landing & Dashboard Styles */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --success: #16a34a;
    --danger: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border: #e5e7eb;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: white;
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 36px;
    width: auto;
}

.logo-img-sm {
    height: 28px;
    width: auto;
}

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

.nav a:not(.btn) {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.15s;
}

.nav a:not(.btn):hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: 0.2s;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 8rem 2rem 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 90vh;
}

.hero-content {
    flex: 1;
    max-width: 560px;
}

.hero-badge {
    display: inline-block;
    background: #dbeafe;
    color: var(--primary);
    padding: 0.375rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.hero-note {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-mockup {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.mockup-header {
    background: var(--gray-100);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-300);
}

.mockup-content {
    padding: 1.5rem;
}

.mockup-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.mockup-date {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.mockup-section {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.25rem;
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}

.mockup-article {
    height: 12px;
    background: var(--gray-200);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.mockup-article:nth-child(odd) {
    width: 90%;
}

.mockup-article:nth-child(even) {
    width: 75%;
}

/* ============================================
   Social Proof
   ============================================ */
.social-proof {
    background: var(--gray-50);
    padding: 3rem 2rem;
    text-align: center;
}

.social-proof > p {
    color: var(--gray-500);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.proof-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray-500);
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   How It Works
   ============================================ */
.how-it-works {
    padding: 5rem 2rem;
    background: var(--gray-900);
    color: white;
}

.how-it-works .section-header h2 {
    color: white;
}

.how-it-works .section-header p {
    color: var(--gray-400);
}

.steps {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    flex: 1;
    text-align: center;
    max-width: 280px;
}

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

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--gray-400);
    font-size: 0.95rem;
    line-height: 1.6;
}

.step-connector {
    width: 80px;
    height: 2px;
    background: var(--gray-700);
    margin-top: 28px;
    flex-shrink: 0;
}

/* ============================================
   Pricing Section
   ============================================ */
.pricing {
    padding: 5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.pricing-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.pricing-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.price-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gray-900);
}

.price-period {
    font-size: 1rem;
    color: var(--gray-500);
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--gray-700);
}

.pricing-features svg {
    width: 20px;
    height: 20px;
    color: var(--success);
    flex-shrink: 0;
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 5rem 2rem;
    text-align: center;
    color: white;
}

.cta h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.cta p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--gray-700);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    height: 32px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 0.95rem;
}

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

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: var(--gray-400);
}

.footer-col a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 0.375rem 0;
    font-size: 0.95rem;
    transition: color 0.15s;
}

.footer-col a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-white:hover {
    background: var(--gray-100);
}

.btn-xl {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

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

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   Auth Pages (Login, Signup)
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--gray-50);
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.auth-card .logo {
    display: block;
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card h1 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.375rem;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.auth-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* ============================================
   Dashboard
   ============================================ */
.dashboard {
    min-height: 100vh;
    background: var(--gray-50);
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

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

.user-email {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.dash-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

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

.dash-title h1 {
    font-size: 1.75rem;
}

.pulse-grid {
    display: grid;
    gap: 1rem;
}

.pulse-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    overflow: hidden;
}

.pulse-color {
    width: 6px;
    flex-shrink: 0;
}

.pulse-info {
    flex: 1;
    padding: 1.5rem;
}

.pulse-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.pulse-url {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.pulse-tagline {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.pulse-meta {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.pulse-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    border-left: 1px solid var(--border);
    justify-content: center;
}

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.upgrade-notice {
    text-align: center;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-top: 2rem;
}

/* ============================================
   Wizard (Create Pulse)
   ============================================ */
.wizard {
    min-height: 100vh;
    background: var(--gray-50);
}

.wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

.steps-indicator {
    display: flex;
    gap: 0.5rem;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.step-dot.active {
    background: var(--primary);
    color: white;
}

.wizard-main {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.wizard-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.wizard-card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.wizard-card .subtitle {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.wizard-form .form-group {
    margin-bottom: 1.5rem;
}

.wizard-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.wizard-form input,
.wizard-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.wizard-form small {
    display: block;
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-top: 0.375rem;
}

.input-prefix {
    display: flex;
    align-items: stretch;
}

.input-prefix span {
    background: var(--gray-100);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    padding: 0.75rem 1rem;
    color: var(--gray-500);
    font-family: monospace;
    font-size: 0.9rem;
    white-space: nowrap;
}

.input-prefix input {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.category-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.category-row input {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .btn:first-child {
    flex: 0;
}

.form-actions .btn:last-child {
    flex: 1;
}

.success-card {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-details {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.detail-row label {
    color: var(--gray-500);
}

.detail-value code {
    background: var(--gray-200);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.success-note {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* ============================================
   Settings Page
   ============================================ */
.settings-page h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-grid {
    display: grid;
    gap: 1.5rem;
}

.settings-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.settings-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.settings-card .form-group {
    margin-bottom: 1rem;
}

.settings-card label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.settings-card input,
.settings-card textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.settings-card input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 4px;
    cursor: pointer;
}

.category-list {
    margin-bottom: 1rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.add-category-form {
    display: flex;
    gap: 0.5rem;
}

.add-category-form input {
    flex: 1;
}

/* ============================================
   Messages
   ============================================ */
.message {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.message-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.message-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 1.25rem;
    border-radius: var(--radius);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        padding-top: 7rem;
        min-height: auto;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-cta {
        align-items: center;
    }

    .hero-visual {
        margin-top: 2rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step-connector {
        width: 2px;
        height: 40px;
        margin: 0;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        gap: 0.5rem;
    }

    .nav.nav-open {
        display: flex;
    }

    .nav a:not(.btn) {
        padding: 0.75rem;
    }

    .nav .btn {
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .proof-stats {
        gap: 2rem;
    }

    .pulse-card {
        flex-direction: column;
    }

    .pulse-color {
        width: 100%;
        height: 4px;
    }

    .pulse-actions {
        flex-direction: row;
        border-left: none;
        border-top: 1px solid var(--border);
    }
}
