/* Modern SaaS Design System - Ultra Premium Light Mode */

:root {
    /* Base Variables */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    
    /* Accents */
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --focus-ring: rgba(37, 99, 235, 0.2);
    
    /* Services */
    --yt-color: #ef4444;
    --fb-color: #1877f2;
    --tt-color: #0f172a;
    
    /* Layout */
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --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);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

a { text-decoration: none; }

/* Abstract Background Pattern */
.bg-pattern {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.4;
}

/* Header */
header.top-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: #f1f5f9;
}

.nav-link.active {
    color: var(--accent-blue);
    background-color: #eff6ff;
    font-weight: 600;
}

/* Main Layout */
main {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    box-sizing: border-box;
}

.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }

/* Typography */
.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Unified Search Input Group */
.search-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-full);
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-container:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px var(--focus-ring), var(--shadow-md);
}

.search-container input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    background: transparent;
    outline: none;
    font-family: inherit;
}

.search-container input::placeholder {
    color: #94a3b8;
}

.search-container button {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.search-container button:hover {
    background: var(--accent-blue-hover);
}
.search-container button:active {
    transform: scale(0.98);
}

/* Service specifics for main buttons */
.search-container.yt button { background: var(--yt-color); }
.search-container.yt button:hover { background: #dc2626; }
.search-container.yt:focus-within { border-color: var(--yt-color); box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2); }

.search-container.fb button { background: var(--fb-color); }
.search-container.fb button:hover { background: #1d4ed8; }
.search-container.fb:focus-within { border-color: var(--fb-color); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2); }

.search-container.tt button { background: var(--tt-color); }
.search-container.tt button:hover { background: #1e293b; }
.search-container.tt:focus-within { border-color: var(--tt-color); box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1); }

/* Download Buttons generated dynamically */
.btn-download-primary, .btn-download-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    border: 1px solid transparent;
}

.btn-download-primary {
    background-color: var(--accent-blue);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-download-primary:hover {
    background-color: var(--accent-blue-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-download-secondary {
    background-color: #fff;
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-download-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Service Colors for Download buttons */
.yt .btn-download-primary { background-color: var(--yt-color); }
.yt .btn-download-primary:hover { background-color: #dc2626; }
.fb .btn-download-primary { background-color: var(--fb-color); }
.fb .btn-download-primary:hover { background-color: #1d4ed8; }
.tt .btn-download-primary { background-color: var(--tt-color); }
.tt .btn-download-primary:hover { background-color: #1e293b; }

/* Cards & Containers */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-footer svg { transition: transform 0.2s; }
.card:hover .card-footer svg { transform: translateX(4px); }

/* Results Grid / Display */
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.result-area {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.thumbnail-container {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    background: #f1f5f9;
}

.thumbnail-container img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    display: block;
}

.result-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.result-subtitle {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Ad Slot */
.ad-slot {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    min-height: 100px;
    width: 100%;
    max-width: 728px;
    margin: 2rem auto;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.ad-slot::after { content: "Advertisement Space"; }

/* Loader */
.loader-container {
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

.loader.yt { border-top-color: var(--yt-color); }
.loader.fb { border-top-color: var(--fb-color); }
.loader.tt { border-top-color: var(--tt-color); }

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

.loader-text {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

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

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast svg {
    flex-shrink: 0;
}
.toast-success { border-left: 4px solid #10b981; }
.toast-error { border-left: 4px solid #ef4444; }

/* SEO Content & FAQ Styles */
.mt-12 { margin-top: 3rem; }
.mt-8 { margin-top: 2rem; }

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.prose {
    color: var(--text-secondary);
    line-height: 1.6;
}

.prose h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.prose ol {
    margin: 0;
    padding-left: 1.25rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.faq-section {
    padding: 2rem;
}

.faq-item {
    border: 1px outline transparent;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item.group-open {
    padding-bottom: 1rem;
}

.faq-question {
    font-weight: 600;
    color: var(--text-primary);
    padding: 1.25rem 0;
    cursor: pointer;
    list-style: none; /* remove default arrow */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: var(--accent-blue);
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.group-open .toggle-icon {
    transform: rotate(180deg);
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.6;
    padding-bottom: 1rem;
    padding-right: 2rem;
}
.faq-answer p {
    margin: 0;
}

/* Related Tools Styles */
.flex-cards {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.related-card {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
}

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

.related-card.fb-bg { background-color: var(--fb-color); }
.related-card.tt-bg { background-color: var(--tt-color); }
.related-card.yt-bg { background-color: var(--yt-color); }

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    width: fit-content;
}

.breadcrumb a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent-blue);
}

.breadcrumb span {
    color: #cbd5e1;
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 600;
}

/* Footer */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 3rem 1.5rem 1.5rem;
    color: var(--text-secondary);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
}
