/*
Theme Name: ReelSaver
Description: Facebook & Instagram Reels Downloader
Version: 1.0
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0f;
    color: #fff;
    line-height: 1.7;
}

a { color: #00d4ff; text-decoration: none; }
a:hover { color: #ff6b35; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 0;
    background: rgba(10,10,15,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 1000;
}

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

.logo {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span { background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav { display: flex; gap: 30px; }
.nav a { color: #a0a0b0; font-weight: 500; transition: color 0.3s; }
.nav a:hover { color: #fff; }

.menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; }

/* Ad Containers */
.ad-container {
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 30px auto;
    text-align: center;
    max-width: 728px;
}

.ad-label { font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(102,126,234,0.1);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 50px;
    font-size: 14px;
    color: #667eea;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: clamp(36px, 7vw, 64px);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero h1 span {
    background: linear-gradient(135deg, #667eea, #764ba2, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: #a0a0b0;
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Platform Tabs */
.platform-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.platform-tab {
    padding: 12px 30px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    color: #a0a0b0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.platform-tab:hover { border-color: rgba(255,255,255,0.2); color: #fff; }

.platform-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    color: #fff;
}

.platform-tab.instagram.active { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.platform-tab.facebook.active { background: linear-gradient(135deg, #1877f2, #0053b3); }

/* Downloader */
.downloader {
    background: linear-gradient(135deg, #1a1a24 0%, #12121a 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 40px;
    max-width: 750px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.input-row { display: flex; gap: 12px; margin-bottom: 20px; }

.url-input {
    flex: 1;
    padding: 18px 24px;
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    transition: border-color 0.3s;
}

.url-input:focus { outline: none; border-color: #667eea; }
.url-input::placeholder { color: #666; }

.paste-btn {
    padding: 18px 24px;
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #a0a0b0;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s;
}

.paste-btn:hover { background: #667eea; border-color: #667eea; color: #fff; }

.download-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(102,126,234,0.4); }
.download-btn:disabled { opacity: 0.7; cursor: wait; transform: none; }

/* Result */
#result { margin-top: 30px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); display: none; }
#result.show { display: block; }

/* Video Preview */
.video-preview { margin: 20px 0; text-align: center; }
.video-preview video { width: 100%; max-width: 500px; border-radius: 12px; background: #000; max-height: 400px; }
.video-preview img { width: 100%; max-width: 500px; border-radius: 12px; }
.video-title { color: #aaa; font-size: 14px; margin-top: 10px; padding: 0 20px; line-height: 1.5; }

.dl-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

.dl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px;
    text-align: center;
    border-radius: 12px;
    font-weight: 600;
    color: #fff;
    transition: transform 0.3s;
    border: none;
    cursor: pointer;
}

.dl-btn:hover { transform: translateY(-3px); }
.dl-btn.primary { background: linear-gradient(135deg, #667eea, #764ba2); }
.dl-btn.secondary { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); }
.dl-btn span { font-size: 12px; font-weight: 400; opacity: 0.8; margin-top: 5px; }

.status { padding: 15px 20px; border-radius: 10px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.status.error { background: rgba(255,59,48,0.15); border: 1px solid rgba(255,59,48,0.3); color: #ff6b6b; }
.status.success { background: rgba(52,199,89,0.15); border: 1px solid rgba(52,199,89,0.3); color: #5dd879; }

/* Stats */
.stats { display: flex; justify-content: center; gap: 60px; margin-top: 60px; padding-top: 60px; border-top: 1px solid rgba(255,255,255,0.05); }
.stat { text-align: center; }
.stat-num { font-size: 42px; font-weight: 800; background: linear-gradient(135deg, #667eea, #ff6b35); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { color: #666; font-size: 14px; margin-top: 5px; }

/* Features */
.features { padding: 100px 0; }

.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: clamp(28px, 4vw, 42px); font-weight: 700; margin-bottom: 15px; }
.section-title span { color: #667eea; }
.section-subtitle { color: #666; font-size: 18px; max-width: 600px; margin: 0 auto; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }

.feature {
    background: linear-gradient(135deg, #1a1a24 0%, #12121a 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 35px;
    transition: all 0.3s;
}

.feature:hover { transform: translateY(-5px); border-color: rgba(102,126,234,0.3); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.feature h3 { font-size: 20px; margin-bottom: 12px; }
.feature p { color: #888; font-size: 15px; line-height: 1.6; }

/* Steps */
.steps { padding: 100px 0; background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%); }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; position: relative; }
.steps-grid::before { content: ''; position: absolute; top: 35px; left: 20%; right: 20%; height: 2px; background: linear-gradient(90deg, #667eea, #764ba2, #ff6b35); opacity: 0.3; }

.step { text-align: center; position: relative; }
.step-num { width: 70px; height: 70px; margin: 0 auto 25px; background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; position: relative; z-index: 1; }
.step h3 { font-size: 22px; margin-bottom: 12px; }
.step p { color: #888; font-size: 15px; }

/* Supported Platforms */
.supported { padding: 80px 0; text-align: center; }
.supported-title { font-size: 18px; color: #666; margin-bottom: 30px; }
.supported-icons { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; }
.supported-icon { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #888; }
.supported-icon span { font-size: 42px; }
.supported-icon.instagram span { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.supported-icon.facebook span { color: #1877f2; }

/* FAQ */
.faq { padding: 100px 0; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1000px; margin: 0 auto; }

.faq-item { background: linear-gradient(135deg, #1a1a24 0%, #12121a 100%); border: 1px solid rgba(255,255,255,0.05); border-radius: 15px; overflow: hidden; }

.faq-q { width: 100%; padding: 22px 25px; background: none; border: none; color: #fff; font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.3s; }
.faq-q:hover { background: rgba(255,255,255,0.02); }

.faq-icon { color: #667eea; font-size: 22px; transition: transform 0.3s; }
.faq-item.active .faq-icon { transform: rotate(45deg); }

.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s; }
.faq-item.active .faq-a { max-height: 200px; }
.faq-a p { padding: 0 25px 22px; color: #888; line-height: 1.7; }

/* Blog Section */
.blog-section { padding: 100px 0; background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.blog-card { background: linear-gradient(135deg, #1a1a24 0%, #12121a 100%); border: 1px solid rgba(255,255,255,0.05); border-radius: 20px; overflow: hidden; transition: all 0.3s; }
.blog-card:hover { transform: translateY(-5px); border-color: rgba(102,126,234,0.3); }

.blog-thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, #667eea, #764ba2); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; }

.blog-content { padding: 25px; }
.blog-cat { display: inline-block; padding: 5px 12px; background: rgba(102,126,234,0.1); border-radius: 20px; font-size: 12px; font-weight: 600; color: #667eea; margin-bottom: 15px; }
.blog-card h3 { font-size: 18px; margin-bottom: 12px; line-height: 1.4; }
.blog-card h3 a { color: #fff; }
.blog-card h3 a:hover { color: #667eea; }
.blog-excerpt { color: #888; font-size: 14px; margin-bottom: 15px; line-height: 1.6; }
.blog-meta { color: #666; font-size: 13px; }

/* SEO Content */
.seo-content { padding: 80px 0; }
.seo-box { background: linear-gradient(135deg, #1a1a24 0%, #12121a 100%); border: 1px solid rgba(255,255,255,0.05); border-radius: 20px; padding: 50px; max-width: 900px; margin: 0 auto; }
.seo-box h2 { font-size: 26px; margin-bottom: 20px; }
.seo-box h3 { font-size: 20px; margin: 30px 0 15px; color: #ddd; }
.seo-box p { color: #888; margin-bottom: 15px; font-size: 16px; }
.seo-box ul { color: #888; margin: 15px 0; padding-left: 25px; }
.seo-box li { margin-bottom: 10px; }

/* Footer */
.footer { background: #0d0d12; border-top: 1px solid rgba(255,255,255,0.05); padding: 80px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer-brand p { color: #666; margin-top: 20px; font-size: 14px; line-height: 1.7; }

.footer-col h4 { font-size: 16px; margin-bottom: 25px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #888; font-size: 14px; transition: color 0.3s; }
.footer-links a:hover { color: #667eea; }

.footer-social { display: flex; gap: 15px; margin-top: 25px; }
.footer-social a { width: 40px; height: 40px; background: rgba(255,255,255,0.05); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: all 0.3s; }
.footer-social a:hover { background: #667eea; color: #fff; }

.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05); color: #555; font-size: 14px; }

/* Page Styles */
.page-header { padding: 150px 0 60px; text-align: center; background: linear-gradient(180deg, rgba(102,126,234,0.05) 0%, transparent 100%); }
.page-title { font-size: clamp(32px, 5vw, 48px); font-weight: 700; }

.breadcrumbs { padding: 100px 0 0; font-size: 14px; color: #666; }
.breadcrumbs a { color: #888; }
.breadcrumbs span { margin: 0 10px; }

.content-section { padding: 60px 0 100px; }
.content-box { background: linear-gradient(135deg, #1a1a24 0%, #12121a 100%); border: 1px solid rgba(255,255,255,0.05); border-radius: 20px; padding: 50px; max-width: 850px; margin: 0 auto; }
.content-box h2 { font-size: 24px; margin: 40px 0 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.content-box h2:first-child { margin-top: 0; }
.content-box h3 { font-size: 20px; margin: 30px 0 15px; color: #ddd; }
.content-box p { color: #999; margin-bottom: 15px; font-size: 16px; line-height: 1.8; }
.content-box ul, .content-box ol { color: #999; margin: 20px 0; padding-left: 25px; }
.content-box li { margin-bottom: 12px; line-height: 1.7; }
.content-box a { color: #667eea; }

/* Archive */
.archive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 50px; }
.pagination a, .pagination span { padding: 12px 18px; background: #1a1a24; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: #fff; }
.pagination .current { background: #667eea; border-color: #667eea; }

/* Single Post */
.single-header { padding: 150px 0 40px; text-align: center; }
.single-meta { color: #888; font-size: 14px; margin-top: 20px; }
.single-content { max-width: 750px; margin: 0 auto; }
.single-content p { color: #bbb; font-size: 17px; line-height: 1.9; margin-bottom: 25px; }
.single-content h2 { font-size: 28px; margin: 50px 0 25px; }

/* CTA */
.cta-section { padding: 100px 0; text-align: center; background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%); }
.cta-section h2 { font-size: 36px; margin-bottom: 20px; }
.cta-section p { color: #888; font-size: 18px; margin-bottom: 30px; }
.cta-btn { display: inline-flex; align-items: center; gap: 10px; padding: 18px 40px; background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 12px; color: #fff; font-size: 18px; font-weight: 600; transition: all 0.3s; }
.cta-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(102,126,234,0.4); color: #fff; }

/* Contact Form */
.contact-form { margin: 30px 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #ddd; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 15px 18px; background: rgba(0,0,0,0.3); border: 2px solid rgba(255,255,255,0.1); border-radius: 10px; color: #fff; font-size: 16px; font-family: inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #667eea; }
.form-group select option { background: #1a1a24; }
.submit-btn { width: 100%; padding: 18px; background: linear-gradient(135deg, #667eea, #764ba2); border: none; border-radius: 10px; color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; transition: all 0.3s; }
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(102,126,234,0.4); }
.contact-success { padding: 20px; background: rgba(52,199,89,0.15); border: 1px solid rgba(52,199,89,0.3); border-radius: 10px; color: #5dd879; margin-bottom: 20px; }
.contact-error { padding: 20px; background: rgba(255,59,48,0.15); border: 1px solid rgba(255,59,48,0.3); border-radius: 10px; color: #ff6b6b; margin-bottom: 20px; }

/* Mobile */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #0d0d12; flex-direction: column; padding: 20px; }
    .nav.active { display: flex; }
    .hero { padding: 130px 0 60px; }
    .hero h1 { font-size: 32px; }
    .downloader { padding: 25px; }
    .input-row { flex-direction: column; }
    .platform-tabs { flex-direction: column; align-items: center; }
    .stats { flex-direction: column; gap: 30px; }
    .features-grid, .steps-grid, .blog-grid { grid-template-columns: 1fr; }
    .steps-grid::before { display: none; }
    .faq-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-social { justify-content: center; }
    .archive-grid { grid-template-columns: 1fr; }
    .content-box, .seo-box { padding: 30px; }
    .form-row { grid-template-columns: 1fr; }
}
