/* 
   f4facebook Design System v2.0
   Modern SaaS Utility Aesthetic
*/

:root {
    /* Color Palette - Vibrant & Premium */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-input: rgba(15, 23, 42, 0.6);
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --error: #ef4444;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --blur: blur(12px);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --container-width: 1100px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.1) 0%, transparent 40%);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.secondary-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Navigation Overhaul */
.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.brand span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: var(--transition);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section Refined */
.hero {
    padding: 100px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 24px;
    letter-spacing: -0.05em;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 48px;
}

/* Platform Toggle Wrapper */
.platform-container {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

.platform-toggle {
    display: inline-flex;
    background: var(--bg-input);
    padding: 6px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    margin-bottom: 24px;
    position: relative;
    box-shadow: var(--shadow-md);
}

.platform-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.platform-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

/* Input Card Redesign */
.input-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    box-shadow: var(--shadow-lg);
    margin-bottom: 48px;
    text-align: left;
}

.input-group {
    display: flex;
    gap: 12px;
    position: relative;
}

.input-container {
    flex: 1;
    position: relative;
}

.input-container input {
    width: 100%;
    height: 64px;
    padding: 0 24px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 1.1rem;
    transition: var(--transition);
}

.input-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.btn-generate {
    height: 64px;
    padding: 0 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

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

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

/* Trust / Safety Bar */
.trust-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.trust-item svg {
    color: var(--success);
    width: 18px;
    height: 18px;
}

/* Results Display */
.results-area {
    margin-top: 32px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card-inner {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    background: rgba(255, 255, 255, 0.03);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.thumb-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    background: #000;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-info h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.download-btn-v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.download-btn-v2:hover {
    background: var(--success);
    border-color: var(--success);
    transform: translateY(-2px);
}

.download-btn-v2.primary {
    background: var(--success);
    border-color: var(--success);
}

/* Compliance Panel */
.compliance-panel {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 48px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.compliance-panel .icon {
    color: var(--error);
    font-size: 1.5rem;
}

.compliance-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Feature/Content Sections */
.section {
    padding: 80px 0;
}

.section-alt {
    background: rgba(255, 255, 255, 0.01);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

/* How It Works Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

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

.step-icon {
    width: 64px;
    height: 64px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 800;
}

/* FAQ Accordion Styled */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-question {
    padding: 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.faq-answer {
    padding: 0 24px 24px;
    color: var(--text-secondary);
    display: none;
}

.faq-card.active .faq-answer {
    display: block;
}

.faq-card.active .faq-question {
    color: var(--primary);
}

/* Internal Links SEO Block */
.guide-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.guide-card {
    display: block;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
}

.guide-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.guide-card h4 {
    color: #fff;
    margin-bottom: 8px;
    font-size: 1rem;
}

.guide-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Footer Section */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
    background: #0b1121;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-disclaimer {
    max-width: 800px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.footer-links-v2 {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links-v2 a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links-v2 a:hover {
    color: #fff;
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Helper Utilities */
.hidden {
    display: none !important;
}

.error-msg {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner-ring {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Common Utilities to Remove Inline Styles */
.flex-column {
    display: flex;
    flex-direction: column;
}

.gap-sm {
    gap: 8px;
}

.gap-md {
    gap: 16px;
}

.gap-lg {
    gap: 24px;
}

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

.mb-24 {
    margin-bottom: 24px;
}

.max-800 {
    max-width: 800px;
    margin: 0 auto;
}

.pt-80 {
    padding-top: 80px;
}

.text-sm {
    font-size: 0.875rem;
}

.opacity-70 {
    opacity: 0.7;
}

.no-underline {
    text-decoration: none;
}

.mt-40 {
    margin-top: 40px;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .navbar {
        height: 70px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #0f172a;
        padding: 100px 32px;
        flex-direction: column;
        gap: 24px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        z-index: 1050;
        border-left: 1px solid var(--border);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        color: #fff;
    }

    .hero {
        padding: 60px 0;
    }

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

    .input-card {
        padding: 24px;
    }

    .input-group {
        flex-direction: column;
    }

    .btn-generate {
        width: 100%;
    }

    .result-card-inner {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .trust-bar {
        gap: 20px;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1040;
    animation: fadeIn 0.3s ease;
}

.menu-overlay.active {
    display: block;
}