/* TikSaver Pro - Main Stylesheet */
:root {
    --primary: #ff0050;
    --primary-light: #ff3370;
    --primary-dark: #cc0040;
    --gradient: linear-gradient(135deg, #ff0050, #ff6090);
    --bg-dark: #0a0a0f;
    --bg-card: #111827;
    --bg-card-hover: #1a2035;
    --bg-input: #1f2937;
    --border: #2d3748;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.4);
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg-dark); color: var(--text); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(10,10,15,0.85); backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 36px; }
.logo-text { font-size: 22px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link { padding: 8px 16px; color: var(--text-muted); font-weight: 500; font-size: 15px; border-radius: var(--radius-sm); transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255,255,255,0.05); }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: var(--transition); border-radius: 2px; }

/* Language Dropdown */
.lang-dropdown { position: relative; }
.lang-btn { background: rgba(255,255,255,0.06); border: 1px solid var(--border); padding: 6px 14px; border-radius: var(--radius-sm); color: var(--text); cursor: pointer; font-size: 14px; font-weight: 500; transition: var(--transition); }
.lang-btn:hover { background: rgba(255,255,255,0.1); }
.lang-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; min-width: 200px; box-shadow: var(--shadow-lg); z-index: 100; max-height: 300px; overflow-y: auto; }
.lang-menu.show { display: block; }
.lang-option { display: block; padding: 8px 14px; color: var(--text-muted); font-size: 14px; border-radius: 8px; transition: var(--transition); }
.lang-option:hover, .lang-option.active { background: rgba(255,0,80,0.1); color: var(--primary); }

/* Hero Section */
.hero { padding: 80px 0 60px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(ellipse at center, rgba(255,0,80,0.08) 0%, transparent 70%); pointer-events: none; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.2; margin-bottom: 16px; background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 18px; color: var(--text-muted); max-width: 600px; margin: 0 auto 40px; }

/* Download Box */
.download-box { max-width: 700px; margin: 0 auto; position: relative; }
.download-input-wrap { display: flex; gap: 0; background: var(--bg-input); border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.download-input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255,0,80,0.15); }
.download-input-wrap input { flex: 1; padding: 18px 20px; background: transparent; border: none; color: var(--text); font-size: 16px; outline: none; font-family: var(--font); }
.download-input-wrap input::placeholder { color: var(--text-dim); }
.download-btn { padding: 18px 32px; background: var(--gradient); color: #fff; border: none; font-weight: 700; font-size: 16px; cursor: pointer; transition: var(--transition); white-space: nowrap; font-family: var(--font); }
.download-btn:hover { opacity: 0.9; }
.download-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Tool Tabs */
.tool-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 30px; flex-wrap: wrap; }
.tool-tab { padding: 10px 24px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 50px; color: var(--text-muted); font-weight: 600; font-size: 14px; cursor: pointer; transition: var(--transition); }
.tool-tab:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.tool-tab.active { background: var(--gradient); color: #fff; border-color: transparent; }

/* Result Box */
.result-box { display: none; margin-top: 30px; padding: 30px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); text-align: left; animation: fadeUp 0.4s ease; }
.result-box.show { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.result-thumb { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.result-thumb img { width: 140px; height: 200px; object-fit: cover; border-radius: var(--radius-sm); }
.result-info h3 { font-size: 16px; margin-bottom: 8px; }
.result-info p { font-size: 14px; color: var(--text-muted); }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.result-actions a, .result-actions button { padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; cursor: pointer; transition: var(--transition); border: none; font-family: var(--font); text-align: center; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--gradient); color: #fff; }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,0,80,0.3); }
.btn-secondary { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--border) !important; }
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Loading */
.loading { display: none; text-align: center; padding: 30px; }
.loading.show { display: block; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 15px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: rgba(255,255,255,0.02); }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; text-align: center; margin-bottom: 16px; }
.section-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 50px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Feature Grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.feature { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; transition: var(--transition); }
.feature:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 12px 30px rgba(255,0,80,0.1); }
.feature .icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 24px; }
.feature h3 { font-size: 18px; margin-bottom: 10px; }
.feature p { color: var(--text-muted); font-size: 15px; }

/* How It Works */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; counter-reset: steps; }
.step-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; text-align: center; position: relative; counter-increment: steps; }
.step-card::before { content: counter(steps); position: absolute; top: -16px; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--gradient); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.step-card h3 { font-size: 18px; margin: 12px 0 10px; }
.step-card p { color: var(--text-muted); font-size: 14px; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-item h3 { padding: 20px 24px; cursor: pointer; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; transition: var(--transition); }
.faq-item h3:hover { color: var(--primary); }
.faq-item h3::after { content: '+'; font-size: 20px; color: var(--text-dim); transition: var(--transition); }
.faq-item.open h3::after { content: '−'; color: var(--primary); }
.faq-item p { padding: 0 24px 20px; color: var(--text-muted); font-size: 15px; display: none; }
.faq-item.open p { display: block; }

/* SEO Content */
.seo-content { max-width: 800px; margin: 0 auto; }
.seo-content h2, .seo-content h3 { margin: 24px 0 12px; }
.seo-content p { color: var(--text-muted); margin-bottom: 16px; font-size: 15px; line-height: 1.8; }
.seo-content img { border-radius: var(--radius); margin: 20px 0; }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 28px; }
.blog-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.blog-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-card .blog-body { padding: 24px; }
.blog-card .blog-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 13px; color: var(--text-dim); }
.blog-card .blog-meta .category { color: var(--primary); font-weight: 600; }
.blog-card h2 { font-size: 18px; margin-bottom: 10px; line-height: 1.4; }
.blog-card h2 a { color: var(--text); }
.blog-card h2 a:hover { color: var(--primary); }
.blog-card .excerpt { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* Blog Single */
.blog-single { max-width: 800px; margin: 0 auto; padding: 40px 0; }
.blog-single .featured-img { width: 100%; height: 400px; object-fit: cover; border-radius: var(--radius); margin-bottom: 30px; }
.blog-single h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.3; margin-bottom: 16px; }
.blog-single .meta { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; color: var(--text-dim); font-size: 14px; flex-wrap: wrap; }
.blog-single .content { font-size: 17px; line-height: 1.9; color: var(--text-muted); }
.blog-single .content h2, .blog-single .content h3 { color: var(--text); margin: 30px 0 14px; }
.blog-single .content p { margin-bottom: 18px; }
.blog-single .content img { border-radius: var(--radius-sm); margin: 20px 0; }
.blog-single .content a { color: var(--primary); text-decoration: underline; }
.blog-single .content ul, .blog-single .content ol { padding-left: 24px; margin-bottom: 18px; }
.blog-single .content li { margin-bottom: 8px; }

/* Author Box */
.author-box { display: flex; gap: 20px; padding: 30px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin: 40px 0; }
.author-box .avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-input); }
.author-box .author-info h3 { font-size: 18px; margin-bottom: 4px; }
.author-box .author-info p { color: var(--text-muted); font-size: 14px; margin-bottom: 10px; }
.author-box .author-links { display: flex; gap: 12px; }
.author-box .author-links a { color: var(--text-dim); font-size: 13px; }
.author-box .author-links a:hover { color: var(--primary); }

/* Share Buttons */
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin: 30px 0; }
.share-btn { padding: 10px 20px; border-radius: var(--radius-sm); color: #fff; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; transition: var(--transition); }
.share-btn:hover { color: #fff; opacity: 0.85; transform: translateY(-2px); }
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #000; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.pinterest { background: #e60023; }

/* Page Content */
.page-content { max-width: 800px; margin: 0 auto; padding: 50px 0; }
.page-content h1 { font-size: 2.2rem; margin-bottom: 30px; }
.page-content .content { font-size: 16px; line-height: 1.9; color: var(--text-muted); }
.page-content .content h2, .page-content .content h3 { color: var(--text); margin: 24px 0 12px; }
.page-content .content p { margin-bottom: 16px; }

/* Footer */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 60px 0 30px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h3 { font-size: 20px; margin-bottom: 16px; }
.footer-col h4 { font-size: 16px; margin-bottom: 14px; color: var(--text); }
.footer-col p { color: var(--text-muted); font-size: 14px; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--text-muted); font-size: 14px; }
.footer-col ul li a:hover { color: var(--primary); }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: var(--transition); }
.social-links a:hover { background: var(--primary); color: #fff; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { color: var(--text-dim); font-size: 13px; }
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--primary); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 50px; }
.pagination a, .pagination span { padding: 10px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.pagination a { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--gradient); color: #fff; }

/* Error Message */
.error-msg { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; padding: 14px 20px; border-radius: var(--radius-sm); text-align: center; margin-top: 16px; font-size: 14px; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; position: fixed; top: 72px; left: 0; right: 0; background: var(--bg-dark); border-bottom: 1px solid var(--border); flex-direction: column; padding: 20px; gap: 4px; z-index: 999; }
    .nav-links.show { display: flex; }
    .hamburger { display: block; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .blog-grid { grid-template-columns: 1fr; }
    .download-input-wrap { flex-direction: column; }
    .download-btn { border-radius: 0; }
    .result-thumb { flex-direction: column; }
    .result-thumb img { width: 100%; height: auto; }
    .author-box { flex-direction: column; text-align: center; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

/* RTL Support */
[dir="rtl"] { direction: rtl; text-align: right; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .footer-grid { direction: rtl; }

/* Utility */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
