/* Video Downloader CSS - DevSuite Styling */
:root {
    --vd-primary: #ef4444;
    --vd-primary-hover: #dc2626;
    --vd-accent: #f43f5e;
    --vd-gradient: linear-gradient(135deg, #f43f5e, #e11d48);
    --vd-glow: rgba(244, 63, 94, 0.35);
}

/* Page Layout Wrapper with Sidebars */
.page-layout-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    max-width: 1560px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.main-content-column {
    flex-grow: 1;
    max-width: 960px;
    width: 100%;
    min-width: 0;
}

/* Side Ad Banners (Left & Right Skyscrapers) */
.side-ad-banner {
    width: 180px;
    flex-shrink: 0;
    display: none;
}

@media (min-width: 1300px) {
    .side-ad-banner {
        display: block;
    }
}

.side-ad-sticky {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: var(--bg-card, rgba(30, 41, 59, 0.4));
    border: 1px dashed var(--border, rgba(255, 255, 255, 0.12));
    border-radius: var(--radius-md, 14px);
    backdrop-filter: blur(12px);
    text-align: center;
    min-height: 630px;
}

[data-theme="light"] .side-ad-sticky {
    background: #ffffff;
    border: 1px dashed rgba(15, 23, 42, 0.12);
}

.ad-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary, #64748b);
    margin-bottom: 8px;
}

/* Hero Section */
.downloader-hero {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 2.5rem auto;
    padding: 2.5rem 1.5rem;
    background: var(--bg-card, rgba(30, 41, 59, 0.5));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-lg, 20px);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .downloader-hero {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
}

.downloader-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .downloader-hero h1 {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.downloader-hero p.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary, #94a3b8);
    max-width: 680px;
    margin: 0 auto 1.8rem auto;
    line-height: 1.6;
}

/* Supported Platform Badges */
.platform-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    color: var(--text-primary, #f8fafc);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.platform-badge:hover {
    transform: translateY(-2px);
    border-color: var(--vd-accent);
}

[data-theme="light"] .platform-badge {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #334155;
}

.platform-badge svg {
    width: 18px;
    height: 18px;
}

/* Search Bar Box */
.url-input-container {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: var(--bg-primary, #0f172a);
    border: 2px solid var(--border, rgba(255, 255, 255, 0.15));
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.url-input-container:focus-within {
    border-color: var(--vd-accent);
    box-shadow: 0 0 25px var(--vd-glow);
}

[data-theme="light"] .url-input-container {
    background: #ffffff;
    border: 2px solid rgba(15, 23, 42, 0.15);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
}

.url-input-container svg.search-icon {
    width: 22px;
    height: 22px;
    color: var(--text-secondary, #94a3b8);
    flex-shrink: 0;
    margin-right: 12px;
}

.url-input-field {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.05rem;
    color: var(--text-primary, #f8fafc);
    font-family: inherit;
}

[data-theme="light"] .url-input-field {
    color: #0f172a;
}

.url-input-field::placeholder {
    color: var(--text-secondary, #64748b);
}

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

.btn-paste {
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.1));
    border: none;
    color: var(--text-primary, #f8fafc);
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-paste:hover {
    background: var(--bg-card, rgba(255, 255, 255, 0.2));
}

[data-theme="light"] .btn-paste {
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
}

.btn-convert {
    background: var(--vd-gradient);
    border: none;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--vd-glow);
}

.btn-convert:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
}

/* Anti-Bot Security CAPTCHA Box */
.captcha-box {
    margin: 1.2rem auto 0 auto;
    max-width: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-primary, #0f172a);
    border: 1.5px solid var(--border, rgba(255, 255, 255, 0.12));
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: border-color 0.3s ease, transform 0.2s ease;
}

[data-theme="light"] .captcha-box {
    background: #ffffff;
    border: 1.5px solid rgba(15, 23, 42, 0.12);
}

.captcha-box.shake-error {
    animation: captchaShake 0.4s ease;
    border-color: #ef4444 !important;
}

@keyframes captchaShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.captcha-canvas-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

#captchaCanvas {
    border-radius: 8px;
    background: #1e293b;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.btn-refresh-captcha {
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-refresh-captcha:hover {
    color: var(--vd-accent);
    transform: rotate(90deg);
}

.captcha-input {
    width: 140px;
    padding: 8px 14px;
    border-radius: 50px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
    color: var(--text-primary, #f8fafc);
    text-align: center;
    font-weight: 700;
    font-family: monospace;
    font-size: 1.05rem;
    letter-spacing: 0.1em;
    outline: none;
}

[data-theme="light"] .captcha-input {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.15);
    color: #0f172a;
}

.captcha-input:focus {
    border-color: var(--vd-accent);
}

/* Spinner */
.loading-box {
    display: none;
    text-align: center;
    padding: 2.5rem 1rem;
}

.spinner-circle {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border, rgba(255, 255, 255, 0.1));
    border-top-color: var(--vd-accent);
    border-radius: 50%;
    animation: vdSpin 0.9s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes vdSpin {
    to { transform: rotate(360deg); }
}

/* Result Card */
.video-result-card {
    display: none;
    max-width: 900px;
    margin: 2rem auto;
    background: var(--bg-card, rgba(30, 41, 59, 0.6));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-lg, 20px);
    overflow: hidden;
    backdrop-filter: blur(16px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .video-result-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
}

.result-header {
    display: flex;
    gap: 20px;
    padding: 1.8rem;
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

@media (max-width: 640px) {
    .result-header {
        flex-direction: column;
    }
}

.result-thumb-wrapper {
    position: relative;
    width: 240px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #000000;
}

@media (max-width: 640px) {
    .result-thumb-wrapper {
        width: 100%;
    }
}

.result-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.result-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
    margin-bottom: 8px;
    line-height: 1.4;
}

[data-theme="light"] .result-title {
    color: #0f172a;
}

.result-uploader {
    font-size: 0.9rem;
    color: var(--text-secondary, #94a3b8);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Format Tabs */
.format-tabs-header {
    display: flex;
    background: var(--bg-tertiary, rgba(15, 23, 42, 0.5));
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

[data-theme="light"] .format-tabs-header {
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.tab-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--vd-accent);
    border-bottom-color: var(--vd-accent);
    background: var(--bg-card, rgba(255, 255, 255, 0.03));
}

/* Format Table */
.format-table-wrapper {
    padding: 1rem 1.8rem 1.8rem 1.8rem;
    overflow-x: auto;
}

.format-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.format-table th {
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #94a3b8);
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.format-table td {
    padding: 14px 16px;
    font-size: 0.95rem;
    color: var(--text-primary, #f8fafc);
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.05));
    vertical-align: middle;
}

[data-theme="light"] .format-table td {
    color: #1e293b;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.quality-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
}

.btn-download-stream {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--vd-gradient);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-download-stream:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--vd-glow);
}

/* Feature Grid & FAQ Section */
.info-section {
    max-width: 900px;
    margin: 3rem auto 2rem auto;
}

.info-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--bg-card, rgba(30, 41, 59, 0.4));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-md, 14px);
    padding: 1.5rem;
    text-align: center;
}

[data-theme="light"] .feature-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.feature-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 1rem auto;
    color: var(--vd-accent);
}

.feature-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary, #f8fafc);
}

[data-theme="light"] .feature-card h3 {
    color: #0f172a;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.5;
}

.faq-section h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary, #f8fafc);
}

[data-theme="light"] .faq-section h2 {
    color: #0f172a;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card, rgba(30, 41, 59, 0.4));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-md, 12px);
    padding: 1.2rem 1.5rem;
}

[data-theme="light"] .faq-item {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.faq-question {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
    margin-bottom: 8px;
}

[data-theme="light"] .faq-question {
    color: #0f172a;
}

.faq-answer {
    font-size: 0.92rem;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
}
