*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
    --primary:#5b36d3;
    --primary-dark:#4527b8;
    --gradient:linear-gradient(135deg,#667eea 0%,#764ba2 100%);
    --text:#1a1a1a;
    --text-light:#6b7280;
    --bg:#ffffff;
    --bg-light:#f9fafb;
    --success:#10b981;
    --error:#ef4444;
    --border:#e5e7eb;
    --shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);
}
html{scroll-behavior:smooth}
body{font-family:'Inter',system-ui,-apple-system,sans-serif;line-height:1.6;color:var(--text);background:var(--bg);overflow-x:hidden}
img{max-width:100%;height:auto;display:block}
a{text-decoration:none;color:inherit}
button{font-family:inherit;cursor:pointer}
.container{max-width:1200px;margin:0 auto;padding:0 20px}

/* Top Header */
.top-header{background:linear-gradient(90deg,#1e3a8a 0%,#3b82f6 100%);color:#fff;padding:8px 0;font-size:13px;text-align:center}
.top-header a{color:#fff;text-decoration:underline;margin:0 5px}

/* Main Header */
header{background:#fff;box-shadow:var(--shadow);position:sticky;top:0;z-index:999}
nav{display:flex;align-items:center;justify-content:space-between;padding:12px 0;gap:20px}
.logo{display:flex;align-items:center;gap:10px;font-size:22px;font-weight:800;color:var(--primary)}
.logo img{width:42px;height:42px;object-fit:contain}
.nav-links{display:flex;gap:25px;align-items:center;font-size:14px;font-weight:500}
.nav-links a:hover{color:var(--primary)}
.cta-btn{background:var(--primary);color:#fff;padding:8px 20px;border-radius:6px;font-weight:600;transition:.3s}
.cta-btn:hover{background:var(--primary-dark);transform:translateY(-2px)}
.mobile-menu{display:none;font-size:24px;cursor:pointer}

/* Hero Section */
.hero{background:var(--gradient);color:#fff;padding:60px 20px 80px;text-align:center;position:relative;overflow:hidden}
.hero::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");opacity:.3}
.hero-content{position:relative;z-index:1;max-width:800px;margin:0 auto}
h1{font-size:clamp(28px,5vw,48px);font-weight:800;margin-bottom:15px;line-height:1.2}
.hero p{font-size:clamp(15px,3vw,19px);margin-bottom:35px;opacity:.95}

/* Input Section */
.input-wrapper{background:#fff;border-radius:12px;padding:8px;box-shadow:var(--shadow-lg);max-width:700px;margin:0 auto;position:relative}
.input-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.input-container{flex:1;min-width:300px;position:relative;display:flex;align-items:center;background:var(--bg-light);border-radius:8px;border:2px solid transparent;transition:.3s}
.input-container:focus-within{border-color:var(--primary);background:#fff}
.platform-icon{position:absolute;left:12px;font-size:20px;color:#9ca3af;pointer-events:none;transition:.3s}
#videoUrl{width:100%;padding:14px 45px 14px 45px;border:none;background:transparent;font-size:15px;outline:none;color:var(--text)}
#videoUrl::placeholder{color:#9ca3af}
.clear-btn{position:absolute;right:12px;color:#9ca3af;font-size:18px;cursor:pointer;display:none;transition:.3s;padding:5px}
.clear-btn:hover{color:var(--error)}
.paste-btn{background:var(--bg-light);color:var(--primary);padding:12px 20px;border:2px solid var(--primary);border-radius:8px;font-weight:600;font-size:14px;display:flex;align-items:center;gap:6px;transition:.3s}
.paste-btn:hover{background:var(--primary);color:#fff}
.download-btn{background:var(--primary);color:#fff;padding:12px 28px;border:none;border-radius:8px;font-weight:700;font-size:15px;display:flex;align-items:center;gap:8px;transition:.3s;box-shadow:0 4px 14px rgba(91,54,211,.4)}
.download-btn:hover:not(:disabled){background:var(--primary-dark);transform:translateY(-2px);box-shadow:0 6px 20px rgba(91,54,211,.5)}
.download-btn:disabled{opacity:.6;cursor:not-allowed}
.spinner{animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* Status & Result */
.status{margin-top:15px;font-size:14px;font-weight:600;min-height:20px}
.status.error{color:var(--error)}
.status.success{color:var(--success)}
#resultArea{display:none;margin-top:25px;animation:slideUp .4s ease}
@keyframes slideUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
.result-card{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);border-radius:16px;padding:30px;box-shadow:var(--shadow-lg);color:#fff;position:relative;overflow:hidden}
.result-card::before{content:'';position:absolute;top:-50%;right:-50%;width:200%;height:200%;background:radial-gradient(circle,rgba(255,255,255,.1) 0%,transparent 70%);animation:pulse 3s ease-in-out infinite}
@keyframes pulse{0%,100%{transform:scale(1);opacity:.3}50%{transform:scale(1.1);opacity:.5}}
.result-header{display:flex;gap:20px;margin-bottom:20px;align-items:center}
.video-preview{width:140px;height:140px;border-radius:12px;object-fit:cover;background:rgba(255,255,255,.1);border:3px solid rgba(255,255,255,.3);box-shadow:0 8px 20px rgba(0,0,0,.2)}
.video-info{flex:1}
.video-info h3{font-size:18px;margin-bottom:8px;color:#fff;font-weight:700;text-shadow:0 2px 4px rgba(0,0,0,.1)}
.video-info p{font-size:14px;color:rgba(255,255,255,.9);margin-bottom:10px}
.quality-badges{display:flex;gap:8px;flex-wrap:wrap}
.badge{background:rgba(255,255,255,.2);color:#fff;padding:6px 14px;border-radius:20px;font-size:12px;font-weight:600;backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.3)}
.badge.hd{background:rgba(16,185,129,.3);color:#fff;border-color:rgba(16,185,129,.5)}
.result-actions{display:flex;gap:12px;margin-top:20px}
.action-btn{flex:1;padding:14px;border-radius:10px;font-weight:700;font-size:15px;display:flex;align-items:center;justify-content:center;gap:10px;transition:.3s;position:relative;z-index:1}
.primary-action{background:#fff;color:var(--primary);border:none;box-shadow:0 4px 15px rgba(255,255,255,.3)}
.primary-action:hover{transform:translateY(-3px);box-shadow:0 6px 20px rgba(255,255,255,.4)}
.secondary-action{background:rgba(255,255,255,.1);color:#fff;border:2px solid rgba(255,255,255,.3);backdrop-filter:blur(10px)}
.secondary-action:hover{background:rgba(255,255,255,.2);border-color:#fff;transform:translateY(-2px)}

/* Platform Icons */
.platforms{display:flex;justify-content:center;gap:20px;margin-top:25px;flex-wrap:wrap}
.platform-badge{font-size:26px;color:rgba(255,255,255,.7);transition:.3s;cursor:pointer}
.platform-badge:hover{color:#fff;transform:scale(1.15)}

/* Features Section */
.features{padding:80px 20px;background:var(--bg-light)}
.section-header{text-align:center;margin-bottom:50px}
.section-header h2{font-size:clamp(26px,4vw,36px);font-weight:800;margin-bottom:12px;color:var(--text)}
.section-header p{color:var(--text-light);max-width:600px;margin:0 auto}
.features-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:30px}
.feature{background:#fff;padding:30px;border-radius:12px;box-shadow:var(--shadow);text-align:center;transition:.3s}
.feature:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg)}
.feature-icon{width:60px;height:60px;margin:0 auto 20px;background:linear-gradient(135deg,var(--primary),#9c27b0);border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:28px;color:#fff}
.feature h3{font-size:18px;margin-bottom:10px;color:var(--text)}
.feature p{font-size:14px;color:var(--text-light);line-height:1.6}

/* How To Section */
.howto{padding:80px 20px;background:#fff}
.steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:30px;margin-top:40px}
.step{background:var(--bg-light);padding:30px;border-radius:12px;position:relative;transition:.3s}
.step:hover{transform:translateY(-5px);box-shadow:var(--shadow)}
.step-number{width:50px;height:50px;background:var(--gradient);color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;margin-bottom:20px}
.step h3{font-size:20px;margin-bottom:10px;color:var(--text)}
.step p{font-size:14px;color:var(--text-light);line-height:1.6}

/* FAQ Section */
.faq{padding:80px 20px;background:var(--bg-light)}
.faq-container{display:grid;grid-template-columns:1fr 1.5fr;gap:40px;max-width:1000px;margin:40px auto 0;align-items:flex-start}
.faq-questions{display:flex;flex-direction:column;gap:10px}
.faq-question-item{padding:18px 20px;cursor:pointer;display:flex;align-items:center;gap:15px;font-weight:600;transition:.3s;border-radius:10px;border:2px solid transparent}
.faq-question-item:hover{background:#fff;border-color:var(--border)}
.faq-question-item.active{background:var(--primary);color:#fff;border-color:var(--primary);box-shadow:var(--shadow)}
.faq-question-item i{font-size:18px;width:20px;text-align:center;color:var(--primary)}
.faq-question-item.active i{color:#fff}
.faq-answers{background:#fff;border-radius:12px;padding:40px;box-shadow:var(--shadow-lg)}
.faq-answer-content{display:none;animation:fadeIn .4s ease}
.faq-answer-content.active{display:block}
.faq-answer-content h4{font-size:20px;margin-bottom:15px;color:var(--primary);font-weight:700}
.faq-answer-content p{color:var(--text-light);line-height:1.7}
@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}

@media(max-width:768px){
    .faq-container{grid-template-columns:1fr}
    .faq-answers{margin-top:20px}
}

/* Footer */
footer{background:#0f172a;color:#94a3b8;padding:60px 20px 20px}
.footer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:40px;margin-bottom:40px}
.footer-col h4{color:#fff;font-size:16px;font-weight:700;margin-bottom:20px}
.footer-col ul{list-style:none}
.footer-col ul li{margin-bottom:12px}
.footer-col ul li a{color:#94a3b8;font-size:14px;transition:.3s}
.footer-col ul li a:hover{color:#fff}
.footer-about p{font-size:14px;line-height:1.6;margin-bottom:15px}
.social-links{display:flex;gap:10px;margin-top:15px}
.social-links a{width:38px;height:38px;background:rgba(255,255,255,.1);border-radius:8px;display:flex;align-items:center;justify-content:center;color:#fff;transition:.3s}
.social-links a:hover{background:var(--primary);transform:translateY(-3px)}
.footer-bottom{border-top:1px solid rgba(255,255,255,.1);padding-top:25px;text-align:center;font-size:13px}
.footer-bottom p{margin-bottom:10px}
.footer-links{display:flex;justify-content:center;gap:20px;flex-wrap:wrap;margin-top:10px}
.footer-links a{color:#94a3b8;transition:.3s}
.footer-links a:hover{color:#fff}

/* Responsive */
@media(max-width:768px){
    .nav-links,.cta-btn{display:none}
    .mobile-menu{display:block}
    .input-group{flex-direction:column}
    .input-container{min-width:100%;width:100%}
    .paste-btn,.download-btn{width:100%}
    .result-header{flex-direction:column}
    .video-preview{width:100%;height:200px}
    .result-actions{flex-direction:column}
    .footer-grid{grid-template-columns:1fr}
}

/* Accessibility */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
*:focus-visible{outline:2px solid var(--primary);outline-offset:2px}

/* Performance Loading */
.lazy{opacity:0;transition:opacity .3s}
.lazy.loaded{opacity:1}
.modal{display:none;position:fixed;z-index:9999;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.7);backdrop-filter:blur(5px);animation:fadeIn .3s}
.modal-content{background:#fff;margin:5% auto;padding:0;width:90%;max-width:700px;border-radius:16px;box-shadow:var(--shadow-lg);animation:slideDown .3s;max-height:85vh;overflow-y:auto}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes slideDown{from{transform:translateY(-50px);opacity:0}to{transform:translateY(0);opacity:1}}
.modal-header{background:var(--gradient);color:#fff;padding:25px 30px;border-radius:16px 16px 0 0;position:relative}
.modal-header h2{margin:0;font-size:24px;font-weight:700}
.modal-close{position:absolute;right:20px;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.2);width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:.3s;border:none;color:#fff;font-size:20px}
.modal-close:hover{background:rgba(255,255,255,.3);transform:translateY(-50%) rotate(90deg)}
.modal-body{padding:30px;line-height:1.8;color:var(--text)}
.modal-body h3{color:var(--primary);margin-top:20px;margin-bottom:10px;font-size:18px}
.modal-body p{margin-bottom:15px;color:var(--text-light)}
.modal-body ul{margin-left:20px;margin-bottom:15px}
.modal-body ul li{margin-bottom:8px;color:var(--text-light)}
