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

:root {
    --bg-dark: #0a0b0e;
    --bg-card: #12131a;
    --bg-input: #1a1c24;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* TikTok Inspired Gradients & Accents */
    --accent-cyan: #00f2fe;
    --accent-magenta: #fe0979;
    --gradient-primary: linear-gradient(135deg, var(--accent-magenta) 0%, #9013fe 50%, var(--accent-cyan) 100%);
    --gradient-hover: linear-gradient(135deg, #ff1e8d 0%, #a23aff 50%, #1bf5ff 100%);
    --gradient-dark: linear-gradient(180deg, #12131a 0%, #0a0b0e 100%);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 242, 254, 0.15);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, .font-outfit {
    font-family: 'Outfit', sans-serif;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #252836;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header / Navigation */
header {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(10, 11, 14, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Double shadow/glow effect to mimic TikTok cyan/magenta shift */
.logo-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--accent-cyan);
    border-radius: 8px;
    z-index: -1;
    transform: translate(-1px, -1px);
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--accent-magenta);
    border-radius: 8px;
    z-index: -2;
    transform: translate(1px, 1px);
}

.logo-icon svg {
    fill: #000;
    width: 18px;
    height: 18px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}

/* Glowing background bubbles */
.hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, transparent 70%);
    top: -100px;
    left: 10%;
    z-index: -1;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(254, 9, 121, 0.15) 0%, transparent 70%);
    bottom: 0;
    right: 10%;
    z-index: -1;
    pointer-events: none;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-title span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Download Form */
.download-form-container {
    max-width: 720px;
    margin: 0 auto;
    background: rgba(18, 19, 26, 0.6);
    border: 1px solid var(--border-color);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.download-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.input-group {
    display: flex;
    gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 6px;
    transition: var(--transition-smooth);
    position: relative;
}

.input-group:focus-within {
    border-color: rgba(0, 242, 254, 0.5);
    box-shadow: 0 0 15px var(--border-glow);
}

.input-group svg.input-icon {
    width: 24px;
    height: 24px;
    fill: var(--text-muted);
    margin-left: 16px;
    align-self: center;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px;
    padding: 12px 8px;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 8px;
}

.input-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.input-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.input-btn.clear-btn {
    padding: 6px;
    border-radius: 50%;
    display: none; /* Shown dynamically in JS */
}

.download-btn {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(254, 9, 121, 0.3);
}

.download-btn:hover {
    background: var(--gradient-hover);
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.4);
    transform: translateY(-1px);
}

.download-btn:active {
    transform: translateY(1px);
}

/* Quick instructions below input */
.quick-instructions {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

.quick-instructions span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-instructions span strong {
    color: var(--accent-cyan);
    font-family: 'Outfit', sans-serif;
}

/* Spinner / Loading State */
.loading-container {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--accent-cyan);
    border-right: 3px solid var(--accent-magenta);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Error Alert */
.error-container {
    display: none;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    max-width: 720px;
    margin: 24px auto 0;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.4s ease-out;
}

.error-container svg {
    width: 24px;
    height: 24px;
    fill: #ef4444;
    flex-shrink: 0;
}

.error-message {
    color: #fca5a5;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

/* Result Card */
.result-section {
    display: none;
    max-width: 800px;
    margin: 40px auto 60px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    position: relative;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, rgba(0,242,254,0.1), rgba(254,9,121,0.1));
    border-radius: var(--border-radius-lg);
    z-index: -1;
}

/* Thumbnail wrapper */
.result-thumbnail-wrapper {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    aspect-ratio: 9/16;
    background: #000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
}

.result-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.3);
}

.play-icon-wrapper svg {
    fill: #fff;
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

/* Metadata */
.result-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.author-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    padding: 2px;
}

.author-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-card);
}

.author-meta {
    display: flex;
    flex-direction: column;
}

.author-nickname {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
}

.author-handle {
    font-size: 13px;
    color: var(--text-secondary);
}

.video-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-option-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.download-option-btn svg {
    width: 18px;
    height: 18px;
}

/* Button variants */
.btn-no-watermark {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(254, 9, 121, 0.2);
}

.btn-no-watermark:hover {
    background: var(--gradient-hover);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn-watermark {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid rgba(255,255,255,0.15);
}

.btn-watermark:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--accent-cyan);
}

.btn-audio {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-audio:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

/* Ad Placement Zones */
.ad-zone {
    max-width: 720px;
    margin: 48px auto;
    background: rgba(18, 19, 26, 0.4);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: var(--border-radius-md);
    padding: 16px;
    text-align: center;
    position: relative;
}

.ad-label {
    position: absolute;
    top: -8px;
    left: 16px;
    background: var(--bg-dark);
    padding: 0 8px;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-placeholder {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Guide Section */
.guide-section {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 48px;
    font-size: 15px;
}

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

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 32px;
    text-align: center;
    position: relative;
    transition: var(--transition-smooth);
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: rgba(254, 9, 121, 0.3);
    box-shadow: 0 10px 25px rgba(254, 9, 121, 0.05);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0 auto 20px;
}

.step-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* FAQ Section */
.faq-section {
    padding: 60px 0 80px;
    border-top: 1px solid var(--border-color);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-question {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    user-select: none;
}

.faq-question:hover {
    color: var(--accent-cyan);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 14px;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
}

.faq-item.active {
    border-color: rgba(0, 242, 254, 0.3);
}

.faq-item.active .faq-answer {
    max-height: 500px; /* arbitrary large value */
    padding-bottom: 20px;
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0), padding 0.3s ease;
}

.faq-toggle-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    transition: var(--transition-smooth);
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
    fill: var(--accent-cyan);
}

/* Footer Section */
footer {
    background: #07080b;
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    color: var(--text-secondary);
    font-size: 13px;
}

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

.footer-brand h4 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand h4 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p {
    font-size: 13px;
    line-height: 1.5;
    max-width: 320px;
}

.footer-col h5 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-col ul a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social-link {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.footer-social-link:hover {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .result-card {
        grid-template-columns: 200px 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 16px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-tagline {
        font-size: 16px;
    }
    
    .input-group {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 12px;
    }
    
    .input-group:focus-within {
        box-shadow: none;
    }
    
    .input-group-inner {
        display: flex;
        align-items: center;
        background: var(--bg-input);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-md);
        padding: 6px;
        width: 100%;
        transition: var(--transition-smooth);
    }
    
    .input-group-inner:focus-within {
        border-color: rgba(0, 242, 254, 0.5);
        box-shadow: 0 0 15px var(--border-glow);
    }
    
    .download-btn {
        width: 100%;
        justify-content: center;
        padding: 16px;
    }
    
    .result-card {
        grid-template-columns: 1fr;
    }
    
    .result-thumbnail-wrapper {
        max-width: 240px;
        margin: 0 auto;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* Additional SEO Component Styles */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}
.breadcrumb a:hover {
    color: var(--accent-cyan);
}
.breadcrumb-separator {
    color: var(--text-muted);
}
.breadcrumb-current {
    color: var(--accent-cyan);
    font-weight: 500;
}

/* Related Tools Grid */
.tools-section {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 28px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    background: rgba(0, 242, 254, 0.1);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tool-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}
.tool-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.tool-link-badge {
    margin-top: auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Article / Content Page Styles */
.content-section {
    padding: 60px 0;
}
.content-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px;
}
.content-container h1 {
    font-size: 32px;
    margin-bottom: 24px;
    color: var(--text-primary);
}
.content-container h2 {
    font-size: 24px;
    margin: 32px 0 16px;
    color: var(--text-primary);
}
.content-container p, .content-container ul, .content-container ol {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}
.content-container ul, .content-container ol {
    padding-left: 24px;
}
.content-container li {
    margin-bottom: 8px;
}

