/* ============================================
   SaveMediaNow - Premium Video Downloader
   Modern, SEO-Optimized Stylesheet
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --tiktok: #000000;
    --instagram: #E4405F;
    --instagram-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --facebook: #1877F2;
    --youtube: #FF0000;
    --twitter: #000000;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.6; color: var(--gray-700); background: var(--gray-50); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { flex: 1; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* Header */
.main-header { background: var(--gradient-primary); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-lg); }
.main-header .navbar { padding: 0; }
.navbar-brand { padding: 12px 0; }
.logo-wrapper { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 48px; height: 48px; background: rgba(255,255,255,0.2); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: white; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 1.5rem; font-weight: 800; color: white; line-height: 1.2; letter-spacing: -0.5px; }
.logo-highlight { color: #fbbf24; }
.logo-tagline { font-size: 0.7rem; color: rgba(255,255,255,0.8); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.navbar-nav { gap: 4px; }
.nav-link { color: rgba(255,255,255,0.9) !important; font-weight: 500; font-size: 0.95rem; padding: 10px 16px !important; border-radius: var(--radius); display: flex; align-items: center; gap: 8px; transition: var(--transition); }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.15); color: white !important; transform: translateY(-1px); }
.nav-link i { font-size: 1rem; }
.navbar-toggler { border: none; padding: 8px; background: rgba(255,255,255,0.1); border-radius: var(--radius); }
.navbar-toggler:focus { box-shadow: none; }
.toggler-icon { display: flex; flex-direction: column; gap: 5px; width: 24px; }
.toggler-icon span { display: block; height: 2px; background: white; border-radius: 2px; transition: var(--transition); }
.navbar-collapse { padding: 15px 0; }
@media (max-width: 991px) { .navbar-collapse { background: rgba(0,0,0,0.2); border-radius: var(--radius-md); padding: 15px; margin-top: 10px; backdrop-filter: blur(10px); } .nav-link { padding: 12px 16px !important; } }

/* Hero Section */
.hero-section { background: var(--gradient-hero); padding: 60px 0 100px; text-align: center; position: relative; overflow: hidden; }
.hero-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.hero-section::after { content: ''; position: absolute; bottom: -50px; left: 0; right: 0; height: 100px; background: var(--gray-50); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.hero-content { position: relative; z-index: 2; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.2); padding: 8px 20px; border-radius: var(--radius-full); font-size: 0.875rem; font-weight: 600; color: white; margin-bottom: 20px; backdrop-filter: blur(10px); }
.hero-badge i { color: #fbbf24; }
.hero-title { font-size: 3rem; font-weight: 800; color: white; margin-bottom: 20px; line-height: 1.2; letter-spacing: -1px; }
.hero-title .highlight { background: linear-gradient(135deg, #fbbf24, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 1.25rem; color: rgba(255,255,255,0.9); max-width: 700px; margin: 0 auto 30px; line-height: 1.7; }
.platform-icons { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-top: 30px; }
.platform-icon-item { width: 60px; height: 60px; background: rgba(255,255,255,0.15); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; color: white; transition: var(--transition); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); text-decoration: none; }
.platform-icon-item:hover { transform: translateY(-5px) scale(1.05); background: rgba(255,255,255,0.25); color: white; box-shadow: var(--shadow-xl); }

/* Download Section */
.download-section { padding: 0 0 60px; margin-top: -50px; position: relative; z-index: 10; }
.download-card { background: white; border-radius: var(--radius-xl); box-shadow: var(--shadow-2xl); padding: 40px; max-width: 900px; margin: 0 auto; }
.platform-tabs { display: flex; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; justify-content: center; }
.platform-tab { padding: 12px 24px; border-radius: var(--radius-full); border: 2px solid var(--gray-200); background: white; color: var(--gray-600); font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; transition: var(--transition); text-decoration: none; }
.platform-tab:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.platform-tab.active { background: var(--gradient-primary); border-color: transparent; color: white; box-shadow: var(--shadow-lg); }
.platform-tab.active:hover { color: white; }
.platform-tab.active.tiktok { background: var(--tiktok); }
.platform-tab.active.instagram { background: var(--instagram-gradient); }
.platform-tab.active.facebook { background: var(--facebook); }
.platform-tab.active.youtube { background: var(--youtube); }
.platform-tab.active.twitter { background: var(--twitter); }
.download-form { margin-bottom: 20px; }
.input-wrapper { display: flex; gap: 12px; margin-bottom: 15px; }
.input-group-custom { flex: 1; position: relative; }
.input-group-custom .input-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 1.25rem; z-index: 5; }
.input-group-custom input { width: 100%; padding: 18px 20px 18px 55px; border: 2px solid var(--gray-200); border-radius: var(--radius-lg); font-size: 1rem; font-weight: 500; color: var(--gray-700); transition: var(--transition); background: var(--gray-50); }
.input-group-custom input:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); }
.input-group-custom input::placeholder { color: var(--gray-400); }
.btn-download { background: var(--gradient-primary); border: none; color: white; padding: 18px 35px; font-size: 1rem; font-weight: 700; border-radius: var(--radius-lg); display: flex; align-items: center; gap: 10px; transition: var(--transition); white-space: nowrap; cursor: pointer; }
.btn-download:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl), var(--shadow-glow); }
.btn-download:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-download i { font-size: 1.1rem; }
.btn-download.tiktok { background: var(--tiktok); }
.btn-download.instagram { background: var(--instagram-gradient); }
.btn-download.facebook { background: var(--facebook); }
.btn-download.youtube { background: var(--youtube); }
.btn-download.twitter { background: var(--twitter); }
.download-info { text-align: center; font-size: 0.875rem; color: var(--gray-500); }
.download-info i { color: var(--success); margin-right: 5px; }
.loading-wrapper { display: none; text-align: center; padding: 40px; }
.loading-wrapper.active { display: block; }
.spinner { width: 50px; height: 50px; border: 4px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--gray-600); font-weight: 500; }
.error-message { display: none; background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius-md); padding: 16px 20px; margin-top: 20px; color: #dc2626; font-weight: 500; }
.error-message.active { display: flex; align-items: center; gap: 10px; }
.error-message i { font-size: 1.25rem; }
.result-wrapper { display: none; margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--gray-200); }
.result-wrapper.active { display: block; }
.result-header { display: flex; align-items: center; gap: 10px; color: var(--success); font-weight: 600; margin-bottom: 20px; }
.result-content { display: grid; grid-template-columns: 280px 1fr; gap: 30px; }
@media (max-width: 768px) { .result-content { grid-template-columns: 1fr; } }
.video-thumbnail { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.video-thumbnail img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.video-duration { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.8); color: white; padding: 4px 10px; border-radius: var(--radius); font-size: 0.8rem; font-weight: 600; }
.video-info h4 { font-size: 1.1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 20px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.download-options { display: flex; flex-direction: column; gap: 10px; }
.download-option { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--gray-50); border: 2px solid var(--gray-200); border-radius: var(--radius-md); transition: var(--transition); text-decoration: none; color: var(--gray-700); }
.download-option:hover { border-color: var(--primary); background: #f0f0ff; transform: translateX(5px); }
.download-option .quality-info { display: flex; align-items: center; gap: 12px; }
.download-option .quality-icon { width: 40px; height: 40px; background: var(--primary); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: white; }
.download-option .quality-icon.audio { background: var(--secondary); }
.download-option .quality-label { font-weight: 600; color: var(--gray-800); }
.download-option .quality-size { font-size: 0.85rem; color: var(--gray-500); }
.download-option .download-icon { color: var(--primary); font-size: 1.25rem; }

/* Features Section */
.features-section { padding: 80px 0; background: white; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-title { font-size: 2.5rem; font-weight: 800; color: var(--gray-900); margin-bottom: 15px; letter-spacing: -1px; }
.section-title .highlight { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-subtitle { font-size: 1.125rem; color: var(--gray-600); max-width: 600px; margin: 0 auto; }
.feature-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-xl); padding: 35px 30px; text-align: center; transition: var(--transition); height: 100%; }
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); border-color: var(--primary); }
.feature-icon { width: 80px; height: 80px; background: var(--gradient-primary); border-radius: var(--radius-xl); display: flex; align-items: center; justify-content: center; margin: 0 auto 25px; font-size: 2rem; color: white; box-shadow: var(--shadow-lg); }
.feature-card h4 { font-size: 1.25rem; font-weight: 700; color: var(--gray-900); margin-bottom: 15px; }
.feature-card p { color: var(--gray-600); line-height: 1.7; margin-bottom: 0; }

/* How It Works */
.how-it-works { padding: 80px 0; background: linear-gradient(180deg, var(--gray-50) 0%, white 100%); }
.steps-wrapper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; position: relative; }
@media (max-width: 991px) { .steps-wrapper { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .steps-wrapper { grid-template-columns: 1fr; } }
.step-card { text-align: center; padding: 30px 20px; position: relative; }
.step-number { width: 60px; height: 60px; background: var(--gradient-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; color: white; margin: 0 auto 20px; box-shadow: var(--shadow-lg); position: relative; z-index: 2; }
.step-card h5 { font-size: 1.125rem; font-weight: 700; color: var(--gray-900); margin-bottom: 10px; }
.step-card p { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 0; }

/* FAQ Section */
.faq-section { padding: 80px 0; background: white; }
.accordion-item { border: 1px solid var(--gray-200); border-radius: var(--radius-lg) !important; margin-bottom: 15px; overflow: hidden; }
.accordion-button { font-weight: 600; color: var(--gray-800); padding: 20px 25px; background: var(--gray-50); }
.accordion-button:not(.collapsed) { background: var(--primary); color: white; box-shadow: none; }
.accordion-button:focus { box-shadow: none; }
.accordion-body { padding: 25px; color: var(--gray-600); line-height: 1.8; }

/* Footer */
.main-footer { background: var(--gradient-dark); color: white; }
.footer-top { padding: 60px 0 40px; }
.footer-brand { margin-bottom: 20px; }
.footer-logo { display: inline-flex; align-items: center; gap: 12px; color: white; text-decoration: none; margin-bottom: 20px; }
.footer-logo .logo-icon { width: 45px; height: 45px; background: var(--primary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.footer-logo span { font-size: 1.5rem; font-weight: 800; }
.footer-logo .highlight { color: #fbbf24; }
.footer-desc { color: var(--gray-400); font-size: 0.95rem; line-height: 1.8; margin-bottom: 20px; }
.social-links { display: flex; gap: 10px; }
.social-link { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: white; transition: var(--transition); }
.social-link:hover { background: var(--primary); transform: translateY(-3px); color: white; }
.footer-widget h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: white; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--gray-400); font-size: 0.9rem; display: flex; align-items: center; gap: 8px; transition: var(--transition); }
.footer-links a:hover { color: white; padding-left: 5px; }
.footer-links a i { font-size: 0.75rem; color: var(--primary-light); }
.footer-contact { list-style: none; padding: 0; margin: 0 0 15px; }
.footer-contact li { color: var(--gray-400); font-size: 0.9rem; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-contact i { color: var(--primary-light); }
.trust-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.trust-badges .badge { background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: var(--radius); font-size: 0.75rem; font-weight: 600; }
.trust-badges .badge i { margin-right: 5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 25px 0; }
.copyright, .made-with { color: var(--gray-500); font-size: 0.875rem; margin: 0; }

/* Back to Top */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background: var(--gradient-primary); border: none; border-radius: 50%; color: white; font-size: 1.25rem; cursor: pointer; opacity: 0; visibility: hidden; transition: var(--transition); box-shadow: var(--shadow-lg); z-index: 999; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }

/* Responsive */
@media (max-width: 991px) { .hero-title { font-size: 2.25rem; } .hero-subtitle { font-size: 1.1rem; } .download-card { padding: 30px 25px; } .section-title { font-size: 2rem; } }
@media (max-width: 768px) { .hero-section { padding: 40px 0 80px; } .hero-title { font-size: 1.875rem; } .hero-subtitle { font-size: 1rem; } .input-wrapper { flex-direction: column; } .btn-download { width: 100%; justify-content: center; } .platform-tab { padding: 10px 16px; font-size: 0.85rem; } .logo-text { display: none; } .features-section, .how-it-works, .faq-section { padding: 50px 0; } }

/* Utilities */
.text-gradient { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Page Content */
.page-header { background: var(--gradient-primary); padding: 40px 0; text-align: center; color: white; }
.page-header h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 10px; }
.page-header p { font-size: 1.1rem; opacity: 0.9; }
.content-section { padding: 60px 0; }
.content-card { background: white; border-radius: var(--radius-xl); padding: 40px; box-shadow: var(--shadow-lg); }
.content-card h2, .content-card h3, .content-card h4, .content-card h5 { color: var(--gray-900); margin-top: 30px; margin-bottom: 15px; }
.content-card h2:first-child, .content-card h3:first-child { margin-top: 0; }
.content-card p { color: var(--gray-600); line-height: 1.8; margin-bottom: 15px; }
.content-card ul, .content-card ol { color: var(--gray-600); padding-left: 20px; margin-bottom: 15px; }
.content-card li { margin-bottom: 8px; line-height: 1.7; }