/* ╔══════════════════════════════════════════════════════╗
   ║  StreamVault — Full-Page Dark ViralTools Theme      ║
   ╚══════════════════════════════════════════════════════╝ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-deep:       #06040f;
    --bg-mid:        #0d0a1e;
    --bg-card:       rgba(255,255,255,0.04);
    --border:        rgba(255,255,255,0.08);
    --border-hover:  rgba(255,255,255,0.18);
    --text-primary:  #f0ecff;
    --text-secondary: rgba(240,236,255,0.55);
    --purple-500:    #8b5cf6;
    --purple-400:    #a78bfa;
    --purple-300:    #c4b5fd;
    --pink-500:      #ec4899;
    --accent:        #a78bfa;
    --accent-glow:   rgba(139,92,246,0.35);
    --yt-red:        #ff0000;
    --radius:        20px;
    --transition:    all 0.3s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Gradient text helper ── */
.gradient-text {
    background: linear-gradient(135deg, var(--purple-400), var(--pink-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Section containers ── */
.hero-container,
.result-container,
.section-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-dark { padding: 100px 0; background: var(--bg-mid); }
.section-mid  { padding: 100px 0; background: var(--bg-deep); }

/* ── Section header ── */
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--purple-400);
    background: rgba(139,92,246,0.1);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid rgba(139,92,246,0.25);
    margin-bottom: 16px;
}
.section-tag i { font-size: 0.7rem; }

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}
.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.hero {
    position: relative;
    padding: 100px 0 80px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
}

.hero__bg {
    position: absolute; inset: 0; pointer-events: none;
}
.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbPulse 8s ease-in-out infinite alternate;
}
.hero__orb--1 {
    width: 550px; height: 550px;
    top: -180px; left: -120px;
    background: radial-gradient(circle, rgba(255,0,0,0.15), transparent 70%);
}
.hero__orb--2 {
    width: 450px; height: 450px;
    top: -80px; right: -80px;
    background: radial-gradient(circle, rgba(124,58,237,0.2), transparent 70%);
    animation-delay: -3s;
}
@keyframes orbPulse {
    0%   { transform: scale(1) translate(0,0); }
    100% { transform: scale(1.12) translate(15px,-15px); }
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fca5a5;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    padding: 7px 18px;
    border-radius: 50px;
    margin-bottom: 28px;
    animation: fadeUp 0.6s ease forwards;
}
.hero__badge i { color: var(--yt-red); }

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -2px;
    margin-bottom: 20px;
    animation: fadeUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 40px;
    animation: fadeUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Search Container (in hero) ── */
.search-container {
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    animation: fadeUp 0.6s ease 0.3s forwards;
    opacity: 0;
    transition: var(--transition);
}
.search-container:hover { border-color: rgba(139,92,246,0.3); }

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px;
    transition: var(--transition);
}
.input-group:focus-within {
    border-color: var(--purple-500);
    box-shadow: 0 0 0 4px rgba(139,92,246,0.1);
}

.input-icon {
    padding: 0 8px 0 14px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

input[type="text"] {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
}
input[type="text"]::placeholder { color: var(--text-secondary); }

button#download-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    box-shadow: 0 4px 16px rgba(220,38,38,0.3);
    flex-shrink: 0;
}
button#download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(220,38,38,0.5);
}
button#download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.supported-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.supported-links span {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}
.supported-links i { color: #4ade80; font-size: 0.7rem; }

.error-msg {
    margin-top: 16px;
    color: #f87171;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    text-align: center;
}

/* ── Loader ── */
.loader {
    display: none;
    width: 22px; height: 22px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════
   RESULT SECTION
══════════════════════════════════ */
.result-section {
    display: none;
    padding: 60px 0 40px;
    background: var(--bg-deep);
    animation: slideUp 0.5s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.video-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
}
.video-card:hover { border-color: var(--border-hover); }

.thumbnail-wrapper {
    width: 260px;
    flex-shrink: 0;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}
.thumbnail-wrapper img {
    width: 100%;
    display: block;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 16px;
}
.play-overlay i {
    font-size: 2.5rem;
    color: rgba(255,255,255,0.9);
    background: rgba(220,38,38,0.85);
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    padding-left: 4px;
}
.thumbnail-wrapper:hover .play-overlay { opacity: 1; }

.video-info { flex: 1; }
.video-info h2 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 700;
}
.video-info p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.video-info p i { font-size: 0.75rem; color: var(--purple-400); }

/* ── Formats Table ── */
.formats-container {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    transition: var(--transition);
}
.formats-container:hover { border-color: var(--border-hover); }

.formats-header {
    padding: 20px 24px 0;
}
.formats-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.formats-header h3 i { color: var(--purple-400); font-size: 0.9rem; }

table { width: 100%; border-collapse: collapse; }
th {
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}
td {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
tr:last-child td { border-bottom: none; }
tr:hover { background: rgba(255,255,255,0.02); }

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge-video { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }
.badge-audio { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.2); }
.badge-best  { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(220,38,38,0.2), rgba(239,68,68,0.1));
    border: 1px solid rgba(239,68,68,0.25);
    color: #fca5a5;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
}
.dl-btn:hover {
    background: linear-gradient(135deg, rgba(220,38,38,0.35), rgba(239,68,68,0.2));
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(220,38,38,0.2);
    color: #fff;
}

/* ══════════════════════════════════
   HOW IT WORKS — STEPS
══════════════════════════════════ */
.steps-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.step-card {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
}
.step-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.step-num {
    font-size: 2.8rem;
    font-weight: 900;
    color: rgba(255,0,0,0.08);
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -2px;
}

.step-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(220,38,38,0.15), rgba(239,68,68,0.08));
    border: 1px solid rgba(239,68,68,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    color: #f87171;
    margin: 0 auto 16px;
}

.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.step-card p  { font-size: 0.85rem; color: var(--text-secondary); }

.step-connector {
    color: rgba(255,255,255,0.12);
    font-size: 1.2rem;
    padding: 0 14px;
    flex-shrink: 0;
}

/* ══════════════════════════════════
   SUPPORTED FORMATS
══════════════════════════════════ */
.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.format-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}
.format-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.format-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px; height: 60px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 18px;
}
.format-icon--mp4  { background: linear-gradient(135deg, #dc2626, #ef4444); box-shadow: 0 4px 16px rgba(220,38,38,0.3); }
.format-icon--mp3  { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 4px 16px rgba(16,185,129,0.3); }
.format-icon--webm { background: linear-gradient(135deg, #7c3aed, #c026d3); box-shadow: 0 4px 16px rgba(124,58,237,0.3); }

.format-card h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.format-card p  { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 18px; }

.format-quality {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.quality-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.quality-badge--hot {
    background: rgba(239,68,68,0.1);
    color: #fca5a5;
    border-color: rgba(239,68,68,0.25);
}

/* ══════════════════════════════════
   FEATURES
══════════════════════════════════ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 28px;
    border-radius: var(--radius);
    transition: var(--transition);
}
.feature-item:hover {
    border-color: rgba(220,38,38,0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(220,38,38,0.08);
}

.feature-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(220,38,38,0.12), rgba(239,68,68,0.06));
    border: 1px solid rgba(239,68,68,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    color: #f87171;
    margin-bottom: 18px;
}

.feature-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-item p  { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* ══════════════════════════════════
   FAQ
══════════════════════════════════ */
.faq-container {
    max-width: 760px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: var(--transition);
}
.faq-item:hover { border-color: var(--border-hover); }

.faq-question {
    padding: 18px 22px;
    background: var(--bg-card);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
    font-size: 0.95rem;
}
.faq-question:hover { background: rgba(255,255,255,0.05); }
.faq-question i { transition: transform 0.3s; font-size: 0.8rem; color: var(--text-secondary); }

.faq-answer {
    padding: 0 22px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.02);
    font-size: 0.9rem;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    padding: 18px 22px;
    max-height: 200px;
    border-top: 1px solid var(--border);
}
.faq-item.active .faq-question i { transform: rotate(180deg); }

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
.site-footer {
    padding: 70px 0 40px;
    background: var(--bg-mid);
    border-top: 1px solid var(--border);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.footer-logo i { margin-right: 8px; color: var(--yt-red); }

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 340px;
    line-height: 1.7;
}

.footer-links h5 {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 18px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: rgba(240,236,255,0.6);
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--purple-400); }
.footer-links a i { font-size: 0.8rem; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 28px;
    text-align: center;
    font-size: 0.83rem;
    color: var(--text-secondary);
}
.footer-bottom .disclaimer { margin-top: 6px; font-size: 0.75rem; opacity: 0.6; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero { padding: 70px 0 60px; }
    .hero__title { letter-spacing: -1px; }
    .input-group { flex-direction: column; border-radius: 14px; padding: 12px; }
    input[type="text"] { text-align: center; }
    button#download-btn { width: 100%; padding: 14px; }
    .video-card { flex-direction: column; }
    .thumbnail-wrapper { width: 100%; }
    .step-connector { display: none; }
    .steps-grid { gap: 16px; }
    .step-card { min-width: 100%; max-width: 100%; }
    .footer-top { grid-template-columns: 1fr; gap: 32px; }
    .supported-links { gap: 10px; }
}
