/* --- 1. GLOBAL RESET & VARS --- */
:root {
    --primary: #4F46E5;
    --primary-grad: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --dark: #1e293b;
    --text: #475569;
    --bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden; /* Prevents horizontal scroll on mobile */
}

a { text-decoration: none; color: inherit; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* --- 2. HEADER --- */
header { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 99; }
.main-nav { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--dark); letter-spacing: -1px; }
.logo span { color: #8b5cf6; }
.nav-links a { margin-left: 20px; font-weight: 500; font-size: 0.9rem; color: var(--dark); }

/* --- 3. HERO & FORM (Mobile Optimized) --- */
.hero-section {
    padding: 60px 0 40px;
    background: linear-gradient(to bottom, #ffffff 0%, #f1f5f9 100%);
}

h1 { font-size: 2.5rem; color: var(--dark); margin-bottom: 10px; line-height: 1.2; }
.subtitle { font-size: 1.1rem; color: var(--text); margin-bottom: 40px; }

/* The Form Container */
#download-form {
    background: var(--white);
    padding: 10px;
    border-radius: 50px; /* Pill shape */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    max-width: 800px;
    margin: 0 auto 20px;
    border: 2px solid var(--border);
    transition: border-color 0.3s;
}

#download-form:focus-within { border-color: #8b5cf6; }

.input-container { flex: 1; display: flex; align-items: center; padding-left: 15px; }
.icon-wrap { color: #94a3b8; display: flex; align-items: center; }

/* YOUR ID: url-input */
#url-input {
    width: 100%; border: none; padding: 15px; font-size: 1rem;
    outline: none; background: transparent; color: var(--dark);
}

/* YOUR ID: paste-btn */
#paste-btn {
    background: #eff6ff; color: var(--primary); border: none;
    padding: 8px 15px; border-radius: 20px; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; margin-right: 10px; white-space: nowrap;
}

/* YOUR ID: download-btn */
#download-btn {
    background: var(--primary-grad); color: var(--white);
    border: none; padding: 16px 40px; border-radius: 40px;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: transform 0.2s;
}
#download-btn:hover { transform: translateY(-2px); }

/* --- 4. RESULTS & LOADER --- */
.loader-container { display: none; margin: 20px auto; }
.loader {
    border: 4px solid #f3f3f3; border-top: 4px solid #8b5cf6;
    border-radius: 50%; width: 40px; height: 40px;
    animation: spin 1s linear infinite; margin: 0 auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

#result {
    display: none; background: var(--white); padding: 20px;
    border-radius: var(--radius); margin-top: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 500px; margin-left: auto; margin-right: auto;
}
#thumbnail { width: 100%; border-radius: 8px; margin-bottom: 15px; }
.dl-button {
    display: block; width: 100%; padding: 12px; text-align: center;
    background: var(--primary); color: white; border-radius: 8px; font-weight: 600;
}
#error-message { color: #ef4444; margin-top: 10px; font-weight: 500; }

/* --- 5. AD RESPONSIVENESS (CRITICAL FIX) --- */
.ad-slot-responsive {
    width: 100%;
    min-height: 100px; /* Prevents layout shift */
    background: #f1f5f9; /* Placeholder color */
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden; /* Prevents overflow on mobile */
    border: 1px dashed #cbd5e1;
}

/* --- 6. SEO CONTENT STYLING --- */
.content-section { padding: 50px 0; }
.bg-white { background: var(--white); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; margin-bottom: 50px;
}
.feature-card {
    background: var(--white); padding: 30px; border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); border: 1px solid var(--border);
}
.feature-card h3 { margin-bottom: 10px; color: var(--dark); }

.text-block { background: var(--white); padding: 40px; border-radius: var(--radius); }
h2 { font-size: 1.8rem; margin-bottom: 20px; color: var(--dark); }
.steps-list { padding-left: 20px; margin-top: 20px; }
.steps-list li { margin-bottom: 15px; padding-left: 10px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item:last-child { border: none; }
.faq-item h3 { font-size: 1.1rem; margin-bottom: 10px; }

/* --- 7. FOOTER --- */
footer { background: var(--white); padding: 40px 0; border-top: 1px solid var(--border); text-align: center; margin-top: auto;}
.disclaimer { font-size: 0.8rem; color: #94a3b8; margin: 15px 0; }
.footer-links a { margin: 0 10px; font-size: 0.9rem; color: var(--primary); }

/* --- 8. MOBILE VIEW ADJUSTMENTS (The Fix) --- */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    .hero-section { padding: 40px 0; }
    
    #download-form {
        flex-direction: column;
        border-radius: 20px;
        padding: 15px;
    }
    
    .input-container { width: 100%; padding-left: 0; margin-bottom: 15px; border-bottom: 1px solid #f1f5f9; }
    #download-btn { width: 100%; border-radius: 12px; padding: 14px; }
    #paste-btn { display: none; /* Hide paste button on very small screens to save space */ }
    
    .nav-links { display: none; /* Hide top links on mobile to simplify */ }
    .main-nav { justify-content: center; }
    
    .content-section { padding: 30px 0; }
    .text-block { padding: 20px; }
}
/* --- 1. GLOBAL RESET & VARS --- */
:root {
    --primary: #4F46E5;
    --primary-grad: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --dark: #1e293b;
    --text: #475569;
    --bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
a:hover { color: var(--primary); }

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* --- 2. HEADER --- */
header { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 99; }
.main-nav { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--dark); letter-spacing: -1px; }
.logo span { color: #8b5cf6; }
.nav-links a { margin-left: 20px; font-weight: 500; font-size: 0.9rem; color: var(--dark); }

/* --- 3. HERO SECTION (Used in Index & Privacy) --- */
.hero-section, .page-header {
    padding: 60px 0 40px;
    background: linear-gradient(to bottom, #ffffff 0%, #f1f5f9 100%);
}
.page-header h1 { font-size: 2.5rem; color: var(--dark); margin-bottom: 5px; }
.page-header .subtitle { margin-bottom: 0; }

/* --- 4. FORM STYLES (Index Page) --- */
#download-form {
    background: var(--white); padding: 10px; border-radius: 50px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex; align-items: center; max-width: 800px; margin: 0 auto 20px;
    border: 2px solid var(--border); transition: border-color 0.3s;
}
#download-form:focus-within { border-color: #8b5cf6; }
.input-container { flex: 1; display: flex; align-items: center; padding-left: 15px; }
.icon-wrap { color: #94a3b8; display: flex; align-items: center; }
#url-input { width: 100%; border: none; padding: 15px; font-size: 1rem; outline: none; background: transparent; color: var(--dark); }
#paste-btn {
    background: #eff6ff; color: var(--primary); border: none;
    padding: 8px 15px; border-radius: 20px; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; margin-right: 10px;
}
#download-btn {
    background: var(--primary-grad); color: var(--white); border: none;
    padding: 16px 40px; border-radius: 40px; font-size: 1rem; font-weight: 700;
    cursor: pointer; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: transform 0.2s;
}
#download-btn:hover { transform: translateY(-2px); }

/* --- 5. RESULTS & LOADER --- */
.loader-container { display: none; margin: 20px auto; }
.loader {
    border: 4px solid #f3f3f3; border-top: 4px solid #8b5cf6;
    border-radius: 50%; width: 40px; height: 40px;
    animation: spin 1s linear infinite; margin: 0 auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#result {
    display: none; background: var(--white); padding: 20px;
    border-radius: var(--radius); margin-top: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 500px; margin-left: auto; margin-right: auto;
}
#thumbnail { width: 100%; border-radius: 8px; margin-bottom: 15px; }
.dl-button {
    display: block; width: 100%; padding: 12px; text-align: center;
    background: var(--primary); color: white; border-radius: 8px; font-weight: 600;
}
#error-message { color: #ef4444; margin-top: 10px; font-weight: 500; }

/* --- 6. AD SLOTS --- */
.ad-slot-responsive {
    width: 100%; min-height: 100px; background: #f1f5f9;
    margin: 30px 0; display: flex; justify-content: center; align-items: center;
    border-radius: 8px; overflow: hidden; border: 1px dashed #cbd5e1;
}

/* --- 7. CONTENT & POLICY PAGES (Typography) --- */
.content-section { padding: 40px 0; }
.text-block {
    background: var(--white); padding: 40px; border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); border: 1px solid var(--border);
}

/* Feature Grid (Home) */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-bottom: 50px; }
.feature-card { background: var(--white); padding: 30px; border-radius: var(--radius); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); border: 1px solid var(--border); }
.feature-card h3 { margin-bottom: 10px; color: var(--dark); }

/* Policy Content Specifics (Privacy/Terms) */
.policy-content h3, .text-block h2 {
    color: var(--dark); margin-top: 30px; margin-bottom: 15px; font-size: 1.5rem;
}
.policy-content h3:first-child { margin-top: 0; }
.policy-content p { margin-bottom: 15px; color: var(--text); }
.policy-content ul { padding-left: 20px; margin-bottom: 20px; }
.policy-content li { margin-bottom: 10px; }
.policy-content a { color: var(--primary); font-weight: 500; }

/* FAQ Styles */
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item:last-child { border: none; }
.faq-item h3 { font-size: 1.1rem; margin-bottom: 10px; color: var(--dark); }

/* --- 8. FOOTER --- */
footer { background: var(--white); padding: 40px 0; border-top: 1px solid var(--border); text-align: center; margin-top: auto; }
.disclaimer { font-size: 0.8rem; color: #94a3b8; margin: 15px 0; }
.footer-links a { margin: 0 10px; font-size: 0.9rem; color: var(--primary); }

/* --- 9. MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .page-header h1 { font-size: 2rem; }
    #download-form { flex-direction: column; border-radius: 20px; padding: 15px; }
    .input-container { width: 100%; padding-left: 0; margin-bottom: 15px; border-bottom: 1px solid #f1f5f9; }
    #download-btn { width: 100%; border-radius: 12px; padding: 14px; }
    #paste-btn { display: none; }
    .nav-links { display: none; }
    .main-nav { justify-content: center; }
    .text-block { padding: 25px; }
}
/* --- 1. GLOBAL RESET & VARS --- */
:root {
    --primary: #4F46E5;
    --primary-grad: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --dark: #1e293b;
    --text: #475569;
    --bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
a:hover { color: var(--primary); }

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* --- 2. HEADER --- */
header { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 99; }
.main-nav { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--dark); letter-spacing: -1px; }
.logo span { color: #8b5cf6; }
.nav-links a { margin-left: 20px; font-weight: 500; font-size: 0.9rem; color: var(--dark); }

/* --- 3. PAGE HEADERS (Hero) --- */
.hero-section, .page-header {
    padding: 60px 0 40px;
    background: linear-gradient(to bottom, #ffffff 0%, #f1f5f9 100%);
}
.page-header h1 { font-size: 2.5rem; color: var(--dark); margin-bottom: 5px; }
.page-header .subtitle { margin-bottom: 0; font-size: 1.1rem; color: var(--text); }

/* --- 4. FORM STYLES (Home Page) --- */
#download-form {
    background: var(--white); padding: 10px; border-radius: 50px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex; align-items: center; max-width: 800px; margin: 0 auto 20px;
    border: 2px solid var(--border); transition: border-color 0.3s;
}
#download-form:focus-within { border-color: #8b5cf6; }
.input-container { flex: 1; display: flex; align-items: center; padding-left: 15px; }
.icon-wrap { color: #94a3b8; display: flex; align-items: center; }
#url-input { width: 100%; border: none; padding: 15px; font-size: 1rem; outline: none; background: transparent; color: var(--dark); }
#paste-btn {
    background: #eff6ff; color: var(--primary); border: none;
    padding: 8px 15px; border-radius: 20px; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; margin-right: 10px;
}
#download-btn {
    background: var(--primary-grad); color: var(--white); border: none;
    padding: 16px 40px; border-radius: 40px; font-size: 1rem; font-weight: 700;
    cursor: pointer; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: transform 0.2s;
}
#download-btn:hover { transform: translateY(-2px); }

/* --- 5. RESULTS & LOADER --- */
.loader-container { display: none; margin: 20px auto; }
.loader {
    border: 4px solid #f3f3f3; border-top: 4px solid #8b5cf6;
    border-radius: 50%; width: 40px; height: 40px;
    animation: spin 1s linear infinite; margin: 0 auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#result {
    display: none; background: var(--white); padding: 20px;
    border-radius: var(--radius); margin-top: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 500px; margin-left: auto; margin-right: auto;
}
#thumbnail { width: 100%; border-radius: 8px; margin-bottom: 15px; }
.dl-button {
    display: block; width: 100%; padding: 12px; text-align: center;
    background: var(--primary); color: white; border-radius: 8px; font-weight: 600;
}
#error-message { color: #ef4444; margin-top: 10px; font-weight: 500; }

/* --- 6. AD SLOTS --- */
.ad-slot-responsive {
    width: 100%; min-height: 100px; background: #f1f5f9;
    margin: 30px 0; display: flex; justify-content: center; align-items: center;
    border-radius: 8px; overflow: hidden; border: 1px dashed #cbd5e1;
}

/* --- 7. CONTENT BLOCKS (Privacy & Contact) --- */
.content-section { padding: 40px 0; }
.text-block {
    background: var(--white); padding: 40px; border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); border: 1px solid var(--border);
}

/* Feature Grid (Home) */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-bottom: 50px; }
.feature-card { background: var(--white); padding: 30px; border-radius: var(--radius); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); border: 1px solid var(--border); }
.feature-card h3 { margin-bottom: 10px; color: var(--dark); }

/* Typography for Content */
.text-block h2, .text-block h3 { color: var(--dark); margin-top: 30px; margin-bottom: 15px; }
.text-block p { margin-bottom: 15px; color: var(--text); }
.text-block ul { padding-left: 20px; margin-bottom: 20px; }
.text-block li { margin-bottom: 10px; }
.text-block a:not(.contact-btn) { color: var(--primary); font-weight: 500; }

/* Contact Page Specifics */
.contact-intro { margin-bottom: 40px; }
.cta-box { margin-top: 25px; }
.contact-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--primary-grad); color: white !important;
    padding: 12px 30px; border-radius: 50px; font-weight: 600;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3); transition: transform 0.2s;
}
.contact-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(79, 70, 229, 0.4); }
.divider { border: 0; height: 1px; background: var(--border); margin: 30px 0; }

/* FAQ Styles */
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item:last-child { border: none; }
.faq-item h3 { font-size: 1.1rem; margin-bottom: 10px; color: var(--dark); }

/* --- 8. FOOTER --- */
footer { background: var(--white); padding: 40px 0; border-top: 1px solid var(--border); text-align: center; margin-top: auto; }
.disclaimer { font-size: 0.8rem; color: #94a3b8; margin: 15px 0; }
.footer-links a { margin: 0 10px; font-size: 0.9rem; color: var(--primary); }

/* --- 9. MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .page-header h1 { font-size: 2rem; }
    #download-form { flex-direction: column; border-radius: 20px; padding: 15px; }
    .input-container { width: 100%; padding-left: 0; margin-bottom: 15px; border-bottom: 1px solid #f1f5f9; }
    #download-btn { width: 100%; border-radius: 12px; padding: 14px; }
    #paste-btn { display: none; }
    .nav-links { display: none; }
    .main-nav { justify-content: center; }
    .text-block { padding: 25px; }
}
/* Language Dropdown Styles */
.lang-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--dark);
    font-family: inherit;
}

.lang-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--white);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
    border: 1px solid var(--border);
}

.lang-content a {
    color: var(--dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    margin: 0 !important; /* Override nav margin */
}

.lang-content a:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.lang-dropdown:hover .lang-content {
    display: block;
}
/* =========================================
   BLOG SECTION STYLES (Modern & Clean)
   ========================================= */

/* --- Blog List Page (blog.html) --- */
/* =========================================
   ✨ MODERN BLOG GRID DESIGN
   ========================================= */

/* 1. The Container (Grid Layout) */
.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Auto Responsive Columns */
    gap: 30px;
    margin-top: 40px;
    padding-bottom: 50px;
}

/* 2. The Blog Card */
.blog-item {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* 3. Gradient Top Border (The "Maze ka" Effect) */
.blog-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-grad);
    transform: scaleX(0); /* Hidden initially */
    transform-origin: left;
    transition: transform 0.4s ease;
}

/* 4. Hover Effects */
.blog-item:hover {
    transform: translateY(-8px); /* Lift up */
    box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.15);
    border-color: transparent;
}

.blog-item:hover::before {
    transform: scaleX(1); /* Show gradient border on hover */
}

/* 5. Typography */
.blog-item h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 12px;
    font-weight: 700;
}

.blog-item h3 a {
    color: var(--dark);
    text-decoration: none;
    background: linear-gradient(to right, #4F46E5 0%, #a855f7 100%);
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s;
}

.blog-item:hover h3 a {
    color: var(--primary);
    background-size: 100% 2px; /* Underline animation */
}

.blog-item p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes date to bottom */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 6. Date Badge */
.blog-item small {
    display: inline-block;
    background-color: #f1f5f9;
    color: #64748b;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    width: fit-content;
    transition: all 0.3s;
}

.blog-item:hover small {
    background-color: #eef2ff;
    color: var(--primary);
}

/* Mobile Fix */
@media (max-width: 768px) {
    .blog-list {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
}