/* Custom CSS - Premium SaaS Styling */
:root {
    --primary-color: #fe2c55;
    --primary-hover: #e0294c;
    --secondary-color: #25f4ee;
    --text-main: #111827;
    --text-muted: #6b7280;
    --bg-main: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --success-bg: #ecfdf5;
    --success-border: #10b981;
    --error-bg: #fef2f2;
    --error-border: #ef4444;
    --font-family: 'Inter', system-ui, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.block-spaced { padding: 80px 0; }
.alt-bg { background-color: var(--bg-card); }

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.main-nav ul { list-style: none; display: flex; gap: 30px; }
.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 16px;
    transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--primary-color); }

/* Main Content */
.site-main { flex: 1; overflow-x: hidden; }

/* Hero Section */
.hero-section {
    position: relative;
    padding: 60px 0 60px;
    text-align: center;
    overflow: hidden;
}

.hero-bg-gradient {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, rgba(254,44,85,0.08) 0%, rgba(37,244,238,0.04) 50%, rgba(249,250,251,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
    color: var(--text-main);
    letter-spacing: -1px;
}

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

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Downloader Card */
.downloader-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 10px;
    box-shadow: var(--shadow-lg);
    max-width: 750px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

#video-url {
    flex: 1;
    padding: 24px 24px 24px 55px;
    font-size: 18px;
    border: none;
    background-color: var(--bg-main);
    border-radius: var(--radius);
    outline: none;
    transition: background-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    color: var(--text-main);
}

#video-url:focus {
    background-color: #ffffff;
    box-shadow: inset 0 0 0 2px var(--primary-color);
}

#video-url::placeholder { color: #9ca3af; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    text-decoration: none;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(254, 44, 85, 0.2); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary { background-color: var(--bg-main); color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { background-color: #e5e7eb; }

.btn-large { padding: 0 40px; font-size: 18px; }
.btn-block { width: 100%; padding: 16px; font-size: 16px; }

.spinner { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Results */
.result-container {
    padding: 30px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.hidden { display: none !important; }

.result-error {
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-border);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
}

.result-success {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    text-align: left;
}

.result-thumb { flex: 0 0 200px; }
.result-thumb img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); object-fit: cover; aspect-ratio: 9/16; }

.result-actions { flex: 1; display: flex; flex-direction: column; gap: 15px; }
.result-title { font-size: 20px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result-ready { color: var(--success-border); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.result-ready::before {
    content: "✓"; background: var(--success-border); color: white; border-radius: 50%;
    width: 18px; height: 18px; display: inline-flex; justify-content: center; align-items: center; font-size: 12px;
}

/* AdSense Containers */
.ad-container {
    background-color: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 14px;
    margin: 30px auto;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.ad-container::before {
    content: "Advertisement";
    position: absolute;
    top: 5px;
    left: 10px;
    font-size: 10px;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-banner-top { width: 100%; max-width: 970px; min-height: 90px; margin-top: 10px; }
.ad-banner-middle { width: 100%; max-width: 728px; min-height: 90px; }
.ad-banner-content { width: 100%; max-width: 728px; min-height: 250px; }
.ad-banner-bottom { width: 100%; max-width: 970px; min-height: 250px; }

/* History List */
.history-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    max-width: 750px;
    margin: 30px auto;
}

.history-title { font-size: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; font-weight: 700;}
.history-list { display: flex; flex-direction: column; gap: 15px; }
.history-item { display: flex; align-items: center; gap: 15px; background: var(--bg-main); padding: 10px; border-radius: 8px; border: 1px solid transparent; transition: border-color 0.2s;}
.history-item:hover { border-color: var(--border-color); }
.history-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }
.history-info { flex: 1; min-width: 0; }
.history-title-text { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-main); }
.history-date { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.btn-small { padding: 6px 12px; font-size: 13px; text-decoration: none;}

/* Engagement Tools */
.engagement-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--border-color); }
.btn-action { flex: 1; min-width: 100px; border: 1px solid var(--border-color); background: var(--bg-main); padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-main); transition: background 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px;}
.btn-action:hover { background: #e5e7eb; }
.whatsapp-color { color: #25D366; }
.facebook-color { color: #1877F2; }
.twitter-color { color: #1DA1F2; }

/* Tools CTA */
.cta-tools-section .cta-box {
    background: linear-gradient(145deg, #ffffff, #f9fafb);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 50px 30px;
    box-shadow: var(--shadow-sm);
    max-width: 900px;
    margin: 0 auto;
}
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 20px; }
.tool-card { background: var(--bg-main); padding: 25px; border-radius: var(--radius); border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; position: relative; opacity: 0.7; transition: opacity 0.2s, transform 0.2s;}
.tool-card:hover { opacity: 1; transform: translateY(-3px);}
.tool-icon { font-size: 30px; margin-bottom: 10px; }
.tool-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 15px; }
.badge { background: #e5e7eb; color: var(--text-muted); padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }

/* Sections Global */
.section-header { text-align: center; margin-bottom: 50px; }
.section-title { font-size: 36px; font-weight: 800; margin-bottom: 15px; letter-spacing: -0.5px;}
.section-desc { font-size: 18px; color: var(--text-muted); }

/* Steps Grid & Features Grid remain identical to before */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.step-card { background: var(--bg-card); padding: 40px 30px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); transition: transform 0.3s ease; }
.step-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.step-icon { font-size: 40px; margin-bottom: 20px; }
.step-content h3 { font-size: 20px; font-weight: 700; margin-bottom: 15px; }
.step-content p { color: var(--text-muted); font-size: 15px; }

.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 30px; }
.feature-item { display: flex; flex-direction: column; }
.feature-icon { font-size: 32px; margin-bottom: 15px; background: #fff0f2; width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.feature-item h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.feature-item p { color: var(--text-muted); font-size: 16px; }

/* FAQ Accordion */
.faq-accordion { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); margin-bottom: 15px; overflow: hidden; transition: border-color 0.3s ease, box-shadow 0.3s; }
.faq-question { padding: 24px 25px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; background: var(--bg-card); }
.faq-question h3 { font-size: 18px; font-weight: 600; }
.faq-toggle { font-size: 24px; font-weight: 300; color: var(--text-muted); transition: transform 0.3s ease; }
.faq-answer { padding: 0 25px; max-height: 0; overflow: hidden; color: var(--text-muted); transition: max-height 0.3s ease, padding 0.3s ease; }
.faq-item.active { border-color: var(--primary-color); box-shadow: var(--shadow-sm); }
.faq-item.active .faq-answer { padding: 0 25px 25px; max-height: 300px; }
.faq-item.active .faq-toggle { color: var(--primary-color); transform: rotate(45deg); }

/* Animations */
.fade-in { opacity: 0; transition: opacity 0.8s ease-out; }
.fade-in.visible { opacity: 1; }
.slide-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.slide-up.visible { opacity: 1; transform: translateY(0); }

/* Footer */
.site-footer { background-color: var(--bg-card); border-top: 1px solid var(--border-color); padding: 40px 0 60px; text-align: center; margin-top: auto; }
.footer-links { margin-bottom: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 30px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 15px; }
.footer-links a:hover { color: var(--primary-color); }
.footer-copyright { color: var(--text-muted); font-size: 14px; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .result-success { flex-direction: column; text-align: center; }
    .result-thumb { flex: 0 0 auto; width: 220px; margin: 0 auto;}
    .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 36px; }
    .input-group { flex-direction: column; }
    #video-url { border-radius: var(--radius); padding: 20px 20px 20px 50px; }
    .btn-large { padding: 20px; border-radius: var(--radius); }
    .steps-grid { grid-template-columns: 1fr; }
    .block-spaced { padding: 60px 0; }
    .section-title { font-size: 28px; }
    .faq-question h3 { font-size: 16px; padding-right: 15px;}
    .ad-banner-top { min-height: 50px; }
    .ad-banner-content, .ad-banner-bottom { min-height: 250px; }
}
