:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --border-color: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-green: #10b981;
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    --warning-amber: #f59e0b;
    --danger-red: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    line-height: 1.5;
}

header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.05em; text-transform: uppercase; }
.brand-title span { color: var(--accent-green); }
.container { max-width: 1500px !important; margin: 2rem auto; padding: 0 1.5rem; }
.view-section { display: none !important; }
.view-active-flex { display: flex !important; }
.view-active-block { display: block !important; }

/* Dashboard UI */
.panel { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 2rem; }
.panel-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.5rem; border-left: 3px solid var(--accent-green); padding-left: 0.75rem; }
.interactive-accordion { background: rgba(30, 41, 59, 0.7); border: 1px solid var(--border-color); border-radius: 8px; padding: 1.25rem; margin-bottom: 1.5rem; }
.interactive-accordion summary { font-weight: 600; cursor: pointer; color: var(--text-main); display: flex; justify-content: space-between; align-items: center; }
.interactive-accordion summary::-webkit-details-marker { display: none; }
.interactive-accordion summary::after { content: '＋'; color: var(--accent-green); font-weight: 700; }
.interactive-accordion[open] summary::after { content: '－'; }

.connection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
@media (max-width: 568px) { .connection-grid { grid-template-columns: 1fr; } }
.conn-card { background: rgba(15, 23, 42, 0.4); border: 1px solid var(--border-color); border-radius: 8px; padding: 1.25rem; text-align: center; display: flex; flex-direction: column; justify-content: space-between; min-height: 160px; }

.badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.5rem; border-radius: 4px; text-transform: uppercase; margin-top: 0.5rem; align-self: center; }
.badge-red { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-green { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.guide-box { background: rgba(51, 65, 85, 0.2); border: 1px dashed var(--border-color); border-radius: 8px; padding: 1rem; margin-bottom: 1.5rem; }
.guide-box summary { font-weight: 600; cursor: pointer; color: var(--accent-green); }
.guide-box ul { margin-top: 0.75rem; padding-left: 1.25rem; color: var(--text-muted); font-size: 0.9rem; }
.guide-box li { margin-bottom: 0.5rem; }

textarea { width: 100%; background-color: var(--bg-main); border: 1px solid var(--border-color); border-radius: 6px; color: var(--text-main); padding: 1rem; resize: vertical; min-height: 150px; margin-bottom: 1rem; }
textarea:focus { outline: none; border-color: var(--accent-green); }

.file-dropzone { border: 2px dashed var(--border-color); border-radius: 8px; padding: 1.5rem; text-align: center; background: rgba(15, 23, 42, 0.2); margin-bottom: 1rem; cursor: pointer; }

/* Buttons & Inputs */
.btn { width: 100%; padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s ease; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em; }
.btn-primary { background-color: var(--accent-green); color: var(--bg-main); }
.btn-primary:hover { opacity: 0.9; }
.btn-fb { background-color: var(--accent-blue); color: #fff; margin-top: 0.75rem; }
.btn-ig { background-color: var(--accent-purple); color: #fff; margin-top: 0.75rem; }
.btn-disconnect { background-color: rgba(239, 68, 68, 0.2); border: 1px solid var(--danger-red); color: #f87171; margin-top: 0.75rem; }
.btn-disconnect:hover { background-color: var(--danger-red); color: var(--bg-main); }
.btn-logout { background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); width: auto; }
.btn-disabled { background-color: var(--border-color) !important; color: var(--text-muted) !important; cursor: not-allowed; }

.input-group { text-align: left; margin-bottom: 1.25rem; }
.input-group label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem; }
input[type="email"], input[type="password"] { width: 100%; background-color: var(--bg-main); border: 1px solid var(--border-color); border-radius: 6px; color: var(--text-main); padding: 0.75rem 1rem; }
input:focus { outline: none; border-color: var(--accent-green); }

/* Feedback & Warnings */
.pipeline-warning { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 6px; padding: 0.75rem 1rem; font-size: 0.85rem; color: #fbbf24; margin-top: 1rem; display: flex; gap: 0.5rem; }
.text-green { color: var(--accent-green) !important; }
.text-red { color: #f87171 !important; }

.draft-container { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
.draft-card { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 8px; padding: 1.25rem; cursor: pointer; }
.draft-card:hover { border-color: var(--accent-green); }
.draft-card header { background: none; border: none; padding: 0 0 0.5rem 0; font-size: 0.8rem; color: var(--accent-green); font-weight: 700; text-transform: uppercase; }

.hero-content h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 1.25rem; }
.hero-content h1 span { color: var(--accent-green); }
.hero-content p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; }
.feature-list { list-style: none; padding: 0; margin-bottom: 2rem; }
.feature-list li { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; font-weight: 600; }
.feature-list li::before { content: '✓'; color: var(--accent-green); font-weight: bold; background: rgba(16, 185, 129, 0.1); width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }

.login-card { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 2.5rem 2rem; box-shadow: 0 10px 25px rgba(0,0,0,0.5); position: sticky; top: 100px; }

/* --- Landing Page & Grid Layout --- */
.landing-wrapper { width: 100%; max-width: 1500px !important; margin: 0 auto; padding: 4rem 2rem; }
.landing-grid { display: grid; grid-template-columns: 1fr 400px; gap: 5rem; align-items: start; }

.left-column { display: flex; flex-direction: column; gap: 4rem; }

.hero-content h1 { font-size: 2.75rem; font-weight: 700; line-height: 1.2; margin-bottom: 1.25rem; }
.hero-content h1 span { color: var(--accent-green); }
.hero-content p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 90%; }

.feature-list { list-style: none; padding: 0; }
.feature-list li { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; font-weight: 600; }
.feature-list li::before { content: '✓'; color: var(--accent-green); font-weight: bold; background: rgba(16, 185, 129, 0.1); width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }

.login-card { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 2.5rem 2rem; box-shadow: 0 10px 25px rgba(0,0,0,0.5); position: sticky; top: 100px; }

/* Pricing Section */
.pricing-section { padding-top: 3rem; border-top: 1px solid var(--border-color); text-align: left; }
.pricing-section h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.pricing-section > p { color: var(--text-muted); }

.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2.5rem; }
.pricing-tier { background: rgba(15, 23, 42, 0.4); border: 1px solid var(--border-color); border-radius: 12px; padding: 2.5rem; display: flex; flex-direction: column; transition: transform 0.2s ease; }
.pricing-tier:hover { transform: translateY(-5px); border-color: var(--accent-green); }
.pricing-tier.pro { background: var(--bg-card); border: 2px solid var(--accent-green); position: relative; }
.tier-badge { position: absolute; top: -12px; right: 20px; background: var(--accent-green); color: var(--bg-main); font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.75rem; border-radius: 12px; text-transform: uppercase; }
.tier-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.tier-price { font-size: 2.5rem; font-weight: 700; margin-bottom: 1.5rem; color: var(--text-main); }
.tier-price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.tier-features { list-style: none; margin-bottom: 2rem; flex-grow: 1; }
.tier-features li { color: var(--text-muted); margin-bottom: 0.75rem; font-size: 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 0.75rem; }
.tier-features li:last-child { border-bottom: none; }

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .landing-grid { grid-template-columns: 1fr; }
    .login-card { position: static; grid-row: 1; margin-bottom: 1rem; }
}

@media (max-width: 600px) {
    .pricing-grid { grid-template-columns: 1fr; }
}

/* --- Site Footer --- */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 1.5rem 2rem;
    margin-top: 5rem;
    background-color: rgba(15, 23, 42, 0.4);
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1024px; /* Updated from 1300px */
    margin: 0 auto 2rem auto;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    color: var(--text-main);
}

.footer-brand span { color: var(--accent-green); }

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-green);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    max-width: 1024px; /* Updated from 1300px */
    margin: 0 auto;
}

/* Mobile Responsiveness for the Footer */
@media (max-width: 600px) {
    .footer-content { 
        flex-direction: column; 
        text-align: center; 
    }
    .footer-links { 
        justify-content: center; 
        width: 100%; 
        flex-wrap: wrap; 
    }
}
