/* ================================================================
   MINI BOOTSTRAP REPLACEMENT v1 (sirf actually-used classes)
   Ye section file ke TOP par hai - pehle Bootstrap CDN isi order
   mein load hota tha, isliye cascade behavior 100% same rahega.
   Icons ab inline SVG hain: svg.fa = FA-parity baseline/sizing.
   ================================================================ */

/* ---- Reboot (used elements only) ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: .5rem; font-weight: 500; line-height: 1.2; }
h1 { font-size: calc(1.375rem + 1.5vw); }
h2 { font-size: calc(1.325rem + .9vw); }
h3 { font-size: calc(1.3rem + .6vw); }
h4 { font-size: calc(1.275rem + .3vw); }
h5 { font-size: 1.25rem; }
@media (min-width: 1200px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.5rem; }
}
p { margin-top: 0; margin-bottom: 1rem; }
ul { margin-top: 0; margin-bottom: 1rem; padding-left: 2rem; }
a { color: #0d6efd; text-decoration: underline; }
a:hover { color: #0a58ca; }
b, strong { font-weight: bolder; }
small, .small { font-size: .875em; }
img, svg { vertical-align: middle; }
button { border-radius: 0; }
button:focus:not(:focus-visible) { outline: 0; }
input, button, select, textarea { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; }
button, select { text-transform: none; }

/* ---- Inline SVG icons (Font Awesome parity: size 1em, color inherit) ---- */
svg.fa { display: inline-block; line-height: 0; vertical-align: -0.125em; fill: currentColor; }

/* ---- Layout & utilities ---- */
.container {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
    margin-right: auto;
    margin-left: auto;
}
@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }
.position-relative { position: relative !important; }
.text-center { text-align: center !important; }
.text-primary { color: #0d6efd !important; }
.text-muted { color: #6c757d !important; }
.fw-bold { font-weight: 700 !important; }
.lead { font-size: 1.25rem; font-weight: 300; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.me-2 { margin-right: .5rem !important; }
.ms-auto { margin-left: auto !important; }
.d-inline-block { display: inline-block !important; }
.align-text-top { vertical-align: text-top !important; }

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: .375rem .75rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: .375rem;
    background-color: transparent;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.btn-sm { padding: .25rem .5rem; font-size: .875rem; border-radius: .25rem; }
/* v1.0.8 LOCK 2: .dropdown-toggle::after caret REMOVED (double-arrow fix) - HTML ka .dropdown-arrow span hi single arrow hai */

/* ---- Forms ---- */
.form-control {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: .375rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}
.form-control::placeholder { color: #6c757d; opacity: 1; }
.input-group { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; width: 100%; }
.input-group > .form-control { position: relative; flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group-prepend { display: flex; }

/* ---- Image thumbnail base ---- */
.img-thumbnail { padding: .25rem; background-color: #fff; border: 1px solid #dee2e6; border-radius: .25rem; }

/* ---- Navbar component ---- */
.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-top: .5rem;
    padding-bottom: .5rem;
}
.navbar-brand {
    padding-top: .3125rem;
    padding-bottom: .3125rem;
    margin-right: 1rem;
    font-size: 1.25rem;
    text-decoration: none;
    white-space: nowrap;
    color: #212529;
}
.navbar-brand:hover, .navbar-brand:focus { text-decoration: none; color: #212529; }
.navbar-collapse { flex-basis: 100%; flex-grow: 1; align-items: center; }
.navbar-nav { display: flex; flex-direction: column; padding-left: 0; margin-bottom: 0; list-style: none; }
.navbar-nav .nav-link { padding-right: 0; padding-left: 0; }
.nav-link {
    display: block;
    padding: .5rem 1rem;
    color: #0d6efd;
    text-decoration: none;
    transition: color .15s ease-in-out, background-color .15s ease-in-out;
}
.nav-link:hover, .nav-link:focus { color: #0a58ca; }
.navbar-toggler {
    padding: .25rem .75rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: .375rem;
    cursor: pointer;
}
.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    line-height: 0;
}
.collapse:not(.show) { display: none; }
.collapsing { height: 0; overflow: hidden; transition: height .35s ease; }
@media (prefers-reduced-motion: reduce) { .collapsing { transition: none; } }
.bg-body-tertiary { background-color: #f8f9fa !important; }
@media (min-width: 992px) {
    .navbar-expand-lg { flex-wrap: nowrap; justify-content: flex-start; }
    .navbar-expand-lg .navbar-nav { flex-direction: row; }
    .navbar-expand-lg .navbar-nav .nav-link { padding-right: .5rem; padding-left: .5rem; }
    .navbar-expand-lg .navbar-collapse { display: flex !important; flex-basis: auto; }
    .navbar-expand-lg .navbar-toggler { display: none; }
}

/* ==================== YOUTUBE THUMBNAIL DOWNLOADER - CLEAN CSS ==================== */
/* Organized, Optimized, Duplicate-Free */

/* ==================== 1. GLOBAL & RESET ==================== */
.atq {
    background-color: #f9f9f9;
    padding-top: 1px;
}

/* ==================== 2. NAVIGATION ==================== */
.nav-bar {
    box-shadow: rgba(60, 64, 67, 0.3) 0 1px 2px 0, 
                rgba(60, 64, 67, 0.15) 0 2px 6px 2px;
}

.navbar-nav .nav-link {
    color: #2d3748;
    font-weight: 500;
    transition: color 0.2s;
}

/* v1.0.8 LOCK 8: Home/nav link #667eea -> brand red (legacy selector, naya header isko use nahi karta) */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #d10000;
}

.navbar-nav .nav-link.active {
    font-weight: 600;
}

/* Mobile Brand */
.mobile-logo {
    position: absolute;
    left: 0;
    font-size: 28px;
    color: #ff0000;
}

.mobile-name {
    display: flex;
    flex-direction: column;
    text-align: center;
    width: 100%;
    line-height: 1.1;
}

.name-line-1,
.name-line-2 {
    font-size: 16px;
    font-weight: 800;
    color: #2d3748;
}

.name-line-2 {
    margin-top: 1px;
}

.desktop-brand {
    display: none;
}

/* ==================== 3. MAIN CONTAINER ==================== */
.cont-1 {
    margin-top: 60px;
    max-width: 980px;
      background: 0% 0% / 100% no-repeat rgb(240, 249, 254);
    box-shadow: rgba(50, 50, 93, 0.25) 0 -6px 12px -2px, 
                rgba(0, 0, 0, 0.3) 0 -3px 7px -3px;
    border-radius: 10px;
    padding: 30px;
}

/* ==================== 4. TYPOGRAPHY ==================== */
.first-h1 h1 {
    color: #2d3748;
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-heading {
    color: #c10841;
    font-weight: 700;
    font-size: 26px;
    text-align: center;
    line-height: 36.4px;
    margin-bottom: 30px;
}

.feature-paragraph,
.answer,
.yt-faq-answer {
    font-size: 16px;
    line-height: 25.6px;
    color: #4a5568;
    text-align: justify;
}

/* ==================== 5. FORM CONTROLS ==================== */
.video-url {
    height: 60px;
    padding-right: 50px !important;
    border-radius: 0.75rem;
    border: 1px solid #ced4da;
}

.input-group-prepend {
    position: relative;
    flex: 1;
}

.paste-btn-inside {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: transparent;
    border: none;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.paste-btn-inside:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
}

.clear-icon {
    color: #dc3545;
}

.paste-btn-inside:hover .clear-icon {
    color: #bd2130;
}

/* ==================== 6. BUTTONS ==================== */
/* Main Get Thumbnail Button - v1.0.8 LOCK 8: orange CTA -> brand red (header Install App ke sath unified) */
.get-thumbnail-btn {
    background: linear-gradient(135deg, #ff0000, #d10000);
    color: white;
    font-weight: bold;
    padding: 12px 30px;
    border-radius: 0.75rem;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    min-height: 50px;
    font-size: 16px;
    cursor: pointer;
}

.get-thumbnail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.38);
    background: linear-gradient(135deg, #ff1a1a, #e00000);
}

/* Quality Selector Buttons */
#qualitySelector {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

#qualitySelector button {
    min-width: 120px;
    padding: 8px 15px;
    margin: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    border: 1px solid transparent;
}

#qualitySelector .btn-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

#qualitySelector .btn-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

#qualitySelector .btn-info:hover {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 202, 240, 0.3);
}

/* Active Button State */
#qualitySelector button.active {
    position: relative;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#qualitySelector button.active::after {
    content: "✓";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #28a745;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button States */
#qualitySelector button.available {
    opacity: 1;
}

/* v1.0.8 LOCK 3: line-through REMOVED (strikehrough 'broken' lagta tha; opacity+cursor kaafi hai) */
#qualitySelector button.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

#qualitySelector button.unavailable:hover {
    transform: none;
    box-shadow: none;
}

/* ==================== 7. THUMBNAIL PREVIEW ==================== */
/* v1.1.3 WIDTH ALIGN (owner rule + screenshots red/blue lines):
   result card (#thumbnailContainer) ke outer edges ab main glow
   card (.cont-1) ke outer edges se EXACT barabar - negative margin
   cont-1 ke 30px side padding cancel karta hai. Sab devices.
   Zero JS, zero speed cost, engine untouched. */
#thumbnailContainer {
    display: none;
    position: relative;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin-left: -30px;
    margin-right: -30px;
}

#thumbnailContainer.auto-detected {
    border-color: #3b82f6;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4),
                0 0 50px rgba(59, 130, 246, 0.2);
    transform: translateY(-5px);
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.thumbnail-view {
    position: relative;
    margin: 20px 0;
}

#thumbnailImage {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    transition: all 0.3s ease;
    image-rendering: crisp-edges;
}

/* Size Classes */
#thumbnailImage.size-original {
    max-width: 100%;
}

#thumbnailImage.size-medium {
    max-width: 50%;
}

#thumbnailImage.size-small {
    max-width: 25%;
}

/* HD Badge */
.hd-badge {
    position: absolute;
    top: -12px;
    right: -12px;
    background: linear-gradient(135deg, #ff0000, #ff6b6b);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    /* v1.0.8 LOCK 4: infinite -> 3 iterations (battery/CPU save, badge 6s baad settle) */
    animation: badgePulse 2s ease 3;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ==================== 8. ACTION BUTTONS ==================== */
.action-buttons {
    display: flex;
    gap: clamp(15px, 4vw, 20px);
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

/* Primary Download Button */
.btn-primary {
    background: linear-gradient(135deg, #FF0000 0%, #D10000 100%);
    color: white;
    border: none;
    padding: clamp(16px, 4vw, 18px) clamp(28px, 6vw, 36px);
    border-radius: 12px;
    font-size: clamp(14px, 3.5vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.2);
    flex: 1;
    min-width: min(300px, 100%);
    max-width: 400px;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 0, 0, 0.3);
    background: linear-gradient(135deg, #D10000 0%, #B00000 100%);
}

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

/* Secondary Preview Button */
.btn-secondary {
    background: #ffffff;
    color: #333;
    border: 2px solid #e0e0e0;
    padding: clamp(16px, 4vw, 18px) clamp(28px, 6vw, 36px);
    border-radius: 12px;
    font-size: clamp(14px, 3.5vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    flex: 1;
    min-width: min(300px, 100%);
    max-width: 400px;
    justify-content: center;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    border-color: #FF0000;
    color: #FF0000;
    box-shadow: 0 10px 25px rgba(255, 0, 0, 0.15);
}

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

/* Button Icons */
.btn-icon {
    font-size: clamp(16px, 4vw, 18px);
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
    animation: bounce 0.6s ease infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

.btn-secondary:hover .btn-icon {
    transform: scale(1.1);
}

/* Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-secondary.btn-loading::after {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #FF0000;
}

/* Success State */
.btn-success {
    background: #10B981 !important;
    border-color: #10B981 !important;
    color: white !important;
    animation: success 0.3s ease;
}

@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ==================== 9. SIZE DROPDOWN ==================== */
.size-dropdown-container {
    position: relative;
    display: inline-block;
    z-index: 100;
}

#sizeDropdownBtn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 160px;
    padding: 8px 16px;
    border: 2px solid #28a745;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    font-weight: 500;
    color: #28a745;
    cursor: pointer;
}

#sizeDropdownBtn:hover {
    background: #28a745;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.size-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    width: 260px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.size-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
}

.dropdown-items {
    padding: 8px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    text-align: left;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 4px;
}

.dropdown-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.dropdown-item.active {
    background: rgba(13, 110, 253, 0.1);
    border-left: 3px solid #0d6efd;
}

.dropdown-item .item-content {
    flex: 1;
}

.dropdown-item .item-title {
    display: block;
    font-weight: 600;
    color: #2d3748;
    font-size: 15px;
}

.dropdown-item .item-subtitle {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.dropdown-item .item-dimensions {
    display: block;
    font-size: 11px;
    color: #28a745;
    font-weight: 500;
    margin-top: 2px;
}

.dropdown-item .item-check {
    color: #28a745;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dropdown-item.active .item-check {
    opacity: 1;
}

.dropdown-footer {
    padding: 12px 16px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    text-align: center;
}

/* ==================== 10. FEATURES SECTION ==================== */
.feature-container {
    margin: 40px auto;
    max-width: 980px;
    margin-top: 50px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
    font-family: Arial, sans-serif;
    padding: 0;
}

.feature {
    border-radius: 10px;
    font-size: 16px;
    font-family: sans-serif;
    line-height: 1.6;
    color: #293a46;
    padding: 20px;
    background: #f8f9fa;
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature .icon {
    font-size: 40px;
    margin-bottom: 10px;
    color: #ff3366;
}

.feature h3 {
    color: #c10841;
    font-size: 22px;
    font-weight: 700;
    line-height: 30.8px;
    margin-top: 8px;
    margin-bottom: 10px;
}

.feature p {
    font-size: 16px;
    color: #4a5568;
    text-align: center;
    margin: 0;
}

/* ==================== 11. FAQ SECTIONS ==================== */
.faq-section {
    margin: 80px auto;
    max-width: 980px;
    margin-top: 50px;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.question {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

/* Professional FAQ */
.yt-faq-section {
    max-width: 980px;
    margin: -90px auto 0;
    padding: 60px 20px;
}

.yt-faq-main-title {
    text-align: center;
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 50px;
    font-weight: 700;
}

.yt-faq-wrapper {
    width: 100%;
}

.yt-faq-item {
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.yt-faq-question {
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    display: flex;
    align-items: center;
    background: rgba(238, 242, 243, 0.6);
    transition: background-color 0.3s ease;
}

.yt-faq-question:hover {
    background: rgba(238, 242, 243, 0.9);
}

.yt-faq-icon {
    font-size: 20px;
    font-weight: bold;
    margin-right: 15px;
    /* v1.0.8: #667eea (blue) -> brand red #d10000 - poori site ka ek hi accent family */
    color: #d10000;
    min-width: 20px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.yt-faq-answer {
    font-size: 16px;
    line-height: 25.6px;
    color: #4a5568;
    text-align: justify;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.yt-faq-content {
    padding: 0 20px 20px 55px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.yt-faq-item.active .yt-faq-answer {
    max-height: 500px;
}

.yt-faq-item.active .yt-faq-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}

.yt-faq-item.active .yt-faq-icon {
    transform: rotate(45deg);
}

/* ==================== 12. POPUP NOTIFICATION ==================== */
.side-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-left: 5px solid #007bff;
    z-index: 10000;
    max-width: 350px;
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.side-popup.active {
    transform: translateX(0);
}

.side-popup.success { 
    border-left-color: #28a745;
    background: linear-gradient(135deg, #f8fff9, #ffffff);
}
.side-popup.error { 
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #fff8f8, #ffffff);
}
.side-popup.warning { 
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fffdf8, #ffffff);
}
.side-popup.info { 
    border-left-color: #17a2b8;
    background: linear-gradient(135deg, #f8fdff, #ffffff);
}

.popup-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.side-popup.success .popup-icon { color: #28a745; }
.side-popup.error .popup-icon { color: #dc3545; }
.side-popup.warning .popup-icon { color: #ffc107; }
.side-popup.info .popup-icon { color: #17a2b8; }

.popup-content {
    flex: 1;
}

.popup-content .popup-title {
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 16px;
}

.popup-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.popup-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.popup-close:hover {
    background: #f8f9fa;
    color: #666;
}

/* ==================== 13. SCROLL TO TOP ==================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff0000, #ff6b6b);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

/* ==================== 14. ANIMATIONS & UTILITIES ==================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top: 2px solid #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 5px;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* ==================== 15. MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
    /* Navigation */
    .navbar-brand {
        display: flex;
        align-items: center;
        width: 100%;
        position: relative;
    }

    .mobile-logo,
    .mobile-name {
        display: block;
    }
    
    .desktop-brand {
        display: none;
    }
    
    .navbar-toggler {
        position: absolute;
        right: 0;
    }

    /* Main Container */
    .cont-1 {
        width: 94%;
        margin: 15px auto;
        padding: 20px 15px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    /* v1.1.3 WIDTH ALIGN (owner rule): mobile par cont-1 padding 15px hai,
       to result card ke negative margins bhi -15px = edges barabar */
    #thumbnailContainer {
        margin-left: -15px;
        margin-right: -15px;
    }
    
    .cont-1 .hero-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .cont-1 .hero-sub {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .cont-1 .video-url {
        height: 45px;
        font-size: 14px;
    }

    /* Search Bar */
    .search-bar-container .input-group {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .search-bar-container .video-url {
        height: 50px;
        font-size: 16px;
        padding: 12px 50px 12px 20px;
    }
    
    .search-bar-container .paste-btn-inside {
        right: 8px;
        width: 35px;
        height: 35px;
    }
    
    .search-bar-container .get-thumbnail-btn {
        width: 100%;
        margin-top: 5px;
         border-radius: 0.75rem;
    }

    /* Thumbnail */
    #thumbnailImage {
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
    }
    
    #thumbnailImage.size-small {
        width: 25%;
        max-width: 25%;
        margin: 0 auto;
    }
    
    #thumbnailImage.size-medium {
        width: 50%;
        max-width: 50%;
        margin: 0 auto;
    }
    
    .hd-badge {
        top: -10px;
        right: -10px;
        padding: 6px 12px;
        font-size: 10px;
    }

    /* FAQ */
    .yt-faq-section {
        padding: 40px 15px;
        margin-top: 0;
    }
    
    .yt-faq-main-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .yt-faq-question {
        padding: 15px;
        font-size: 16px;
    }
    
    .yt-faq-answer {
        font-size: 15px;
        line-height: 24px;
    }
    
    .yt-faq-content {
        padding: 0 15px 15px 45px;
    }

    /* Popup */
    .side-popup {
        max-width: 300px;
        right: 10px;
        top: 10px;
    }

    /* Scroll to Top */
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    /* Action Buttons */
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 100%;
    }

    /* Size Dropdown Mobile */
    .size-dropdown-menu {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        width: 90%;
        max-width: 300px;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .size-dropdown-menu.show {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ==================== 16. DESKTOP STYLES ==================== */
@media (min-width: 769px) {
    .mobile-logo,
    .mobile-name {
        display: none;
    }
    
    .desktop-brand {
        display: flex;
        align-items: center;
    }

    #thumbnailImage {
        max-width: 1280px;
    }
    
    #thumbnailImage.size-small {
        max-width: 25%;
    }
    
    #thumbnailImage.size-medium {
        max-width: 50%;
    }
}

/* ==================== 17. ACCESSIBILITY & PERFORMANCE ==================== */
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .btn-primary,
    .btn-secondary,
    .btn-icon,
    .btn-loading::after,
    .btn-success,
    #qualitySelector button,
    #sizeDropdownBtn,
    .side-popup,
    .scroll-to-top,
    .feature, /* v1.0.8: missing comma FIX (pehle ye descendant-selector ban raha tha) */
    .dropdown-item,
    .yt-faq-item,
    .hd-badge { /* v1.0.8 LOCK 4: badge pulse reduced-motion users ke liye bhi off */
        transition: none !important;
        animation: none !important;
    }
    
    .btn-primary:hover,
    .btn-secondary:hover,
    .dropdown-item:hover {
        transform: none !important;
    }
}

/* Print styles */
@media print {
    .nav-bar,
    .action-buttons,
    .side-popup,
    .scroll-to-top,
    .size-dropdown-container {
        display: none !important;
    }
}

/* ==================== END OF CLEANED CSS ==================== */
/* ============== ADD THIS AT THE END OF YOUR CSS FILE ============== */

/* Mobile-only thumbnail width fix - UPDATED */
@media only screen and (max-width: 768px) {
    #thumbnailImage {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        border-radius: 8px !important;
        display: block !important;
        margin: 0 auto !important;
    }
    
    /* Small size ke liye alag */
    #thumbnailImage.size-small {
        width: 25% !important;
        max-width: 25% !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    /* Medium size ke liye alag */
    #thumbnailImage.size-medium {
        width: 50% !important;
        max-width: 50% !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }
}

/* Desktop style maintain */
@media only screen and (min-width: 769px) {
    #thumbnailImage {
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }
}
@media only screen and (max-width: 768px) {
    #thumbnailImage {
        width: calc(100% + 60px) !important;
        margin-left: -30px !important;
        margin-right: -30px !important;
        max-width: none !important;
        height: auto !important; /* Important */
        object-fit: contain !important; /* Quality maintain */
        border-radius: 8px !important;
        display: block !important;
    }
}



/* ==================== SMART RESIZE STYLES ==================== */

/* Size Classes for Display */
#thumbnailImage.size-original {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
}

#thumbnailImage.size-medium {
    max-width: 50% !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
}

#thumbnailImage.size-small {
    max-width: 25% !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
}

/* Mobile Optimization for Smart Resize */
@media only screen and (max-width: 768px) {
    #thumbnailImage.size-medium {
        max-width: 80% !important; /* Mobile pe thoda bada */
    }
    
    #thumbnailImage.size-small {
        max-width: 60% !important; /* Mobile pe readable */
    }
}

/* Smart Download Options */
.smart-options {
    display: none;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

.smart-option-btn {
    margin: 5px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.smart-option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.smart-option-btn.active {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
}

/* Quality Badge */
.quality-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 10;
}

/* Loading State for Smart Processing */
.smart-loading {
    position: relative;
    min-height: 100px;
}

.smart-loading::after {
    content: 'Processing with smart algorithms...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-style: italic;
}


/* Mobile Button Layout */
@media (max-width: 768px) {
    #qualitySelector {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 8px !important;
        padding: 10px 5px !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    #qualitySelector::-webkit-scrollbar {
        display: none !important;
    }
    
    #qualitySelector button {
        min-width: 120px !important;
        white-space: nowrap !important;
        margin: 0 !important;
        padding: 12px 15px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
        transition: all 0.2s ease !important;
    }
    
    /* Button States */
    #qualitySelector button.available {
        background: linear-gradient(135deg, #28a745, #20c997) !important;
        color: white !important;
        border: none !important;
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
    }
    
    #qualitySelector button.unavailable {
        background: #e9ecef !important;
        color: #6c757d !important;
        border: 1px solid #dee2e6 !important;
        opacity: 0.8 !important;
        cursor: not-allowed !important;
    }
    
    /* #qualitySelector button.loading {
        position: relative !important;
        overflow: hidden !important;
        background: #f8f9fa !important;
        border: 2px solid #007bff !important;
    }
    
    #qualitySelector button.loading::after {
        content: '' !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 3px !important;
        background: linear-gradient(90deg, 
            transparent, 
            #007bff, 
            transparent) !important;
        animation: loadingShimmer 1.5s infinite !important;
    }
    
    @keyframes loadingShimmer {
        0% { transform: translateX(-100%); }
        100% { transform: translateX(100%); }
    } */
    
    #qualitySelector button.active {
        background: linear-gradient(135deg, #007bff, #0056b3) !important;
        color: white !important;
        transform: scale(1.05) !important;
        box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4) !important;
    }
    
    #qualitySelector button:hover:not(.unavailable):not(:disabled) {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
    }
}

/* Desktop Button Styles */
#qualitySelector {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
    margin: 20px 0 !important;
    flex-wrap: wrap !important;
}

#qualitySelector button {
    padding: 12px 25px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: 2px solid #007bff !important;
    background: white !important;
    color: #007bff !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-width: 140px !important;
    text-align: center !important;
}

#qualitySelector button.available {
    background: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
}

#qualitySelector button.unavailable {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: #6c757d !important;
    color: white !important;
    border-color: #6c757d !important;
}

#qualitySelector button.active {
    background: #007bff !important;
    color: white !important;
    border-color: #0056b3 !important;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5) !important;
}

/* ================================================================
   PREMIUM UI POLISH v1 (PURE CSS - ZERO JS, ZERO SPEED COST)
   Sirf visual layer: gradients, shadows, GPU hover-lift.
   Layout / engine / image sizing kuch nahi chhera.
   NOTE: Ye block full-bleed winner se PEHLE hai - image rules
   hamesha final cascade winner rahengi.
   ================================================================ */

/* ---- Page background & Navbar ---- */
body {
    background: linear-gradient(180deg, #fbfcfd 0%, #f4f6f9 100%) !important;
}
.nav-bar {
    box-shadow: 0 2px 14px rgba(45, 55, 72, 0.08) !important;
}

/* ---- URL Input ---- */
.video-url.khan {
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(45, 55, 72, 0.05) !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}
.video-url.khan:focus {
    border-color: #FF0000 !important;
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.10) !important;
}

/* Paste/Clear mini icon button - v1.0.8 FIX: hover scale REMOVED (scale, translateY(-50%)
   centering ko replace kar deta tha -> hover par icon neeche gir kar jump karta tha.
   Ab button apni jagah par fix rehta hai, sirf color/background feedback deta hai) */
#pasteButton {
    color: #a0aec0 !important;
    border-radius: 50% !important;
    transition: color 0.18s ease, background 0.18s ease !important;
}
#pasteButton:hover {
    color: #D10000 !important;
    background: rgba(209, 0, 0, 0.08) !important;
}

/* ---- Get Thumbnail (⚡) button ---- */
/* v1.0.8 LOCK 8: rendered CTA gradient bhi brand red (same family as .install-app-btn) */
.btn.get-thumbnail-btn {
    background: linear-gradient(135deg, #ff0000 0%, #d10000 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(209, 0, 0, 0.32) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
}
.btn.get-thumbnail-btn:hover {
    background: linear-gradient(135deg, #ff1a1a 0%, #e00000 100%) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 9px 24px rgba(209, 0, 0, 0.42) !important;
    filter: brightness(1.03) !important;
}
.btn.get-thumbnail-btn:active {
    transform: translateY(0) scale(0.97) !important;
}

/* ---- Quality pills (HD / SD / HQ) ---- */
#qualitySelector button {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    color: #2d3748 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 10px 18px !important;
    box-shadow: 0 2px 6px rgba(45, 55, 72, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease !important;
    cursor: pointer !important;
}
#qualitySelector button:hover {
    transform: translateY(-2px) !important;
    color: #D10000 !important;
    border-color: #fbb6b6 !important;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%) !important;
    box-shadow: 0 8px 20px rgba(209, 0, 0, 0.14) !important;
}
#qualitySelector button:active {
    transform: translateY(0) scale(0.97) !important;
}

/* Available = quality ready (green - existing language, ab desktop par bhi) */
#qualitySelector button.available {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.30) !important;
}
#qualitySelector button.available:hover {
    transform: translateY(-2px) !important;
    color: #fff !important;
    box-shadow: 0 9px 22px rgba(40, 167, 69, 0.40) !important;
    filter: brightness(1.04) !important;
}

/* Unavailable = quality exist nahi karti */
#qualitySelector button.unavailable {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0) !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    /* v1.0.8 LOCK 3 (dusra block): line-through yahan se bhi hata diya */
    box-shadow: none !important;
    transform: none !important;
}
#qualitySelector button.unavailable:hover {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

/* Active/selected = brand red + existing ✓ badge */
#qualitySelector button.active {
    background: linear-gradient(135deg, #FF0000 0%, #C40000 100%) !important;
    color: #fff !important;
    border-color: #C40000 !important;
    box-shadow: 0 6px 18px rgba(209, 0, 0, 0.35) !important;
}
#qualitySelector button.active:hover {
    color: #fff !important;
    box-shadow: 0 9px 24px rgba(209, 0, 0, 0.42) !important;
}

/* Keyboard focus rings (accessibility) */
#qualitySelector button:focus-visible,
#sizeDropdownBtn:focus-visible,
.btn.get-thumbnail-btn:focus-visible,
.action-buttons .btn-primary:focus-visible,
.action-buttons .btn-secondary:focus-visible {
    /* v1.0.8 LOCK 7: unified focus-ring token (light/dark auto) */
    outline: 3px solid var(--focus-ring, rgba(255, 0, 0, 0.30)) !important;
    outline-offset: 2px !important;
}

/* ---- Size dropdown (emerald premium) ---- */
#sizeDropdownBtn {
    background: linear-gradient(135deg, #ffffff, #f8fafc) !important;
    border: 2px solid #28a745 !important;
    border-radius: 12px !important;
    color: #1e9e50 !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.12) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease !important;
}
#sizeDropdownBtn:hover {
    background: linear-gradient(135deg, #28a745, #1ea55f) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 7px 18px rgba(40, 167, 69, 0.30) !important;
}
.size-dropdown-menu {
    border-radius: 14px !important;
    border: 1px solid #edf2f7 !important;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08) !important;
    overflow: hidden !important;
}
.size-dropdown-menu .dropdown-item {
    transition: background 0.15s ease !important;
    border-left: 3px solid transparent !important;
}
.size-dropdown-menu .dropdown-item:hover {
    background: #fff5f5 !important;
    border-left-color: #FF0000 !important;
}
.size-dropdown-menu .dropdown-item.active {
    background: linear-gradient(135deg, #fff5f5, #ffe9e9) !important;
    border-left-color: #D10000 !important;
}

/* ---- Action buttons (Download red / Preview white premium) ---- */
.action-buttons .btn-primary {
    background: linear-gradient(135deg, #FF0000 0%, #D10000 55%, #B00000 100%) !important;
    box-shadow: 0 6px 20px rgba(209, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
}
.action-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #ff1a1a 0%, #C40000 55%, #a30000 100%) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 28px rgba(209, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    filter: brightness(1.03) !important;
}
/* success green state hamesha jeetega (download complete) */
.action-buttons .btn-primary.btn-success {
    background: linear-gradient(135deg, #10B981, #059669) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35) !important;
}
.action-buttons .btn-secondary {
    background: linear-gradient(135deg, #ffffff, #f8fafc) !important;
    color: #2d3748 !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: 0 3px 10px rgba(45, 55, 72, 0.07) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease !important;
}
.action-buttons .btn-secondary:hover {
    color: #D10000 !important;
    border-color: #FF0000 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 24px rgba(209, 0, 0, 0.14) !important;
}

/* ---- Feature cards (soft lift) ---- */
.feature {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.feature:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 14px 30px rgba(45, 55, 72, 0.10) !important;
}

/* ---- HD badge ---- */
.hd-badge {
    background: linear-gradient(135deg, #FF0000, #B00000) !important;
    box-shadow: 0 4px 14px rgba(176, 0, 0, 0.40) !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
}

/* ================================================================
   PWA INSTALL BANNER (floating card - bottom center)
   ================================================================ */
#pwaInstallBanner {
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(150%);
    z-index: 10550;
    width: min(420px, calc(100vw - 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.22, 1.2, 0.36, 1), opacity 0.3s ease;
    will-change: transform, opacity;
}
#pwaInstallBanner.pwa-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.pwa-banner-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.22), 0 2px 8px rgba(15, 23, 42, 0.08);
}
.pwa-app-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    box-shadow: 0 3px 8px rgba(209, 0, 0, 0.25);
    flex-shrink: 0;
}
.pwa-banner-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pwa-banner-text strong {
    font-size: 14.5px;
    color: #1a202c;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pwa-banner-text span {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.35;
}
.pwa-install-btn {
    background: linear-gradient(135deg, #FF0000, #C40000);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 16px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(209, 0, 0, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
    font-family: inherit;
}
.pwa-install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(209, 0, 0, 0.45);
}
.pwa-install-btn:active {
    transform: scale(0.96);
}
.pwa-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease;
}
.pwa-close-btn:hover {
    color: #475569;
    background: rgba(100, 116, 139, 0.12);
}
@media only screen and (max-width: 480px) {
    .pwa-banner-text strong { font-size: 13.5px; }
    .pwa-banner-text span { font-size: 11.5px; }
    .pwa-install-btn { padding: 9px 13px; font-size: 12.5px; }
}

/* ================================================================
   IMAGE FULL-BLEED FIX (FINAL - CASCADE WINNER)
   Image ab card ki border tak full width hogi (jahan lines lagai thin).
   ROOT CAUSE FIX: pehle #thumbnailImage.size-original (higher specificity)
   breakout width ko block kar raha tha - isliye image chhoti reh jati thi.
   Ye rules file ke end mein hain, isliye HAR purane rule ko jeet jayenge.
   Aspect ratio 100% preserved - image ki 1 pixel bhi kharab nahi hogi.
   ================================================================ */

/* ---------- DESKTOP (769px+): v1.1.3 width-align ke baad #thumbnailContainer ka -30px margin
   .cont-1 ke 30px padding ko cancel karta hai => sirf 15px(container padding) + 2px(border)
   = 17px side escape - image card ki border tak EXACT flush (purana 47px over-escape hata,
   warna image card se 30px bahar nikal jati - v1.1.4 image-left-shift fix) ---------- */
@media only screen and (min-width: 769px) {
    #thumbnailImage,
    #thumbnailImage.size-original {
        width: calc(100% + 34px) !important;
        max-width: none !important;
        height: auto !important;
        display: block !important;
        margin: 10px -17px !important;
        object-fit: contain !important;
        image-rendering: auto !important; /* smooth high-quality scaling */
    }

    /* Medium / Small intentional chhoti sizes - centered, no breakout */
    #thumbnailImage.size-medium {
        width: auto !important;
        max-width: 50% !important;
        margin: 10px auto !important;
    }

    #thumbnailImage.size-small {
        width: auto !important;
        max-width: 25% !important;
        margin: 10px auto !important;
    }

    /* FULL HD badge ab bari image ke top-right corner par chipka rahe */
    .hd-badge {
        top: -12px;
        right: -17px;
    }
}

/* ---------- MOBILE (max-width 768px): FULL SCREEN WIDTH (competitor style) ----------
   Image ab poori SCREEN ki border tak jayegi - sirf 14px gap har side par
   (thumbnaildownloader.com jaisa). Formula viewport-independent hai:
   width = 100vw - 28px | escape = container padding(15px) + border(2px) - screen gap(14px)
   = 3vw + 3px (cont-1 ka 15px padding #thumbnailContainer ke -15px margin se cancel -
   purana 3vw+18px ab 15px zyada escape karta tha = image LEFT shift - v1.1.4 fix) */
@media only screen and (max-width: 768px) {
    #thumbnailImage,
    #thumbnailImage.size-original {
        width: calc(100vw - 28px) !important;
        max-width: none !important;
        height: auto !important;
        display: block !important;
        margin: 10px calc(-3vw - 3px) !important;
        object-fit: contain !important;
        image-rendering: auto !important;
        border-radius: 8px !important;
        /* Bootstrap .img-thumbnail frame (4px padding + 1px border) hataya - photo ab asli edge-to-edge */
        padding: 0 !important;
        border: none !important;
        background: none !important;
    }

    /* Medium / Small intentional chhoti sizes - centered, no breakout */
    #thumbnailImage.size-medium {
        width: auto !important;
        max-width: 80% !important;
        margin: 10px auto !important;
    }

    #thumbnailImage.size-small {
        width: auto !important;
        max-width: 60% !important;
        margin: 10px auto !important;
    }

    /* FULL HD badge bari image ke top-right corner par chipka rahe */
    .hd-badge {
        top: -10px;
        right: calc(-3vw - 3px);
    }
}



/* ================================================================
   PREMIUM COLOR SYSTEM v2 (CSS variables + light/dark + hover fix)
   - Ek consistent system: brand red, accent, surface, text, border, success/danger
   - WCAG AA contrast (body text >= 4.5:1)
   - Animations sirf transform/opacity + prefers-reduced-motion safe
   - NOTE: #thumbnailImage ki full-bleed sizing rules ko CHHEDA NAHI gaya
     (image hover sirf .thumbnail-view wrapper par hai - engine untouched)
   ================================================================ */

:root {
    --brand: #D10000;
    --brand-strong: #B00000;
    --brand-soft: #fff1f1;
    --accent: #ff8a00;
    --success: #10B981;
    --success-strong: #059669;
    --danger: #DC2626;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --surface-card: rgb(240, 249, 254);
    --text: #1a202c;
    --text-body: #4a5568;
    --text-soft: #556677;
    --text-muted: #5d6b7a;
    --border: #e2e8f0;
    --border-strong: #cbd5e0;
    --focus-ring: rgba(209, 0, 0, 0.35);
    --shadow-sm: 0 2px 10px rgba(45, 55, 72, 0.06);
    --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 20px 44px rgba(15, 23, 42, 0.16), 0 6px 14px rgba(15, 23, 42, 0.08);
}

/* ---------- HERO (premium typography - system fonts only) ---------- */
.hero { margin-bottom: 1.75rem; }
.hero-title {
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 0;
}
.hero-title::after {
    content: "";
    display: block;
    width: 84px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand), #ff6b6b);
    margin: 12px auto 0;
}
.hero-sub {
    font-size: clamp(0.95rem, 2.4vw, 1.125rem);
    color: var(--text-soft);
    max-width: 560px;
    margin: 14px auto 0;
    line-height: 1.55;
}
.trust-points {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    justify-content: center;
    padding: 0;
    margin: 18px 0 0;
}
.trust-points li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
    box-shadow: var(--shadow-sm);
}
.trust-check { color: var(--success); font-size: 14px; }

/* ---------- Quality note (h5 replacement, same look) ---------- */
.quality-note {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 0.5rem;
    color: var(--text);
}

/* ---------- Copyrighted heading - WCAG AA fix ---------- */
.Copyrighted-heading p { color: var(--text-soft); }

/* ================================================================
   TASK 1 ROOT-CAUSE FIX: THUMBNAIL CARD HOVER (wapas)
   Root cause: CLEAN CSS rewrite ke baad image-card ka :hover rule
   hi exist nahi karta tha (kisi ne override nahi kiya - rule gayab tha).
   FIX: premium hover (lift + deep shadow) - sirf transform/opacity,
   sirf hover-capable devices par (touch par sticky-hover nahi).
   ================================================================ */
.thumbnail-view { isolation: isolate; }
.thumbnail-view::after {
    content: "";
    position: absolute;
    inset: -10px -17px; /* desktop full-bleed escape ke sath match (v1.1.4: 17px) */
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: -1;
}
@media (hover: hover) and (pointer: fine) {
    .thumbnail-view { transition: transform 0.25s ease; will-change: transform; }
    .thumbnail-view:hover { transform: translateY(-5px); }
    .thumbnail-view:hover::after { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
    .thumbnail-view::after { inset: -10px calc(-3vw - 3px); } /* mobile full-bleed match (v1.1.4) */
}

/* ---------- TOUCH: sticky hover ka masla khatam ---------- */
@media (hover: none) {
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn.get-thumbnail-btn:hover,
    #qualitySelector button:hover,
    #sizeDropdownBtn:hover,
    .feature:hover,
    .dropdown-item:hover,
    .nav-install-btn:hover,
    .btn-share:hover,
    .share-item:hover,
    .thumbnail-view:hover { transform: none !important; }
    .btn-primary:active,
    .btn-secondary:active,
    .btn.get-thumbnail-btn:active,
    #qualitySelector button:active,
    #sizeDropdownBtn:active,
    .btn-share:active { transform: scale(0.97); }
}

/* ---------- FOCUS-VISIBLE: keyboard par sab interactive elements ---------- */
.nav-link:focus-visible,
.navbar-brand:focus-visible,
.navbar-toggler:focus-visible,
.footer-links a:focus-visible,
.popup-close:focus-visible,
.scroll-to-top:focus-visible,
.dropdown-item:focus-visible,
#sizeDropdownBtn:focus-visible,
#pasteButton:focus-visible,
.pwa-install-btn:focus-visible,
.pwa-close-btn:focus-visible,
.nav-install-btn:focus-visible,
.btn-share:focus-visible,
.share-item:focus-visible,
.share-close:focus-visible,
.share-native-btn:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

/* ---------- NAVBAR INSTALL BUTTON (hamesha-available PWA entry) ---------- */
.nav-install-btn {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 3px 10px rgba(209, 0, 0, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav-install-btn[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
    .nav-install-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(209, 0, 0, 0.36);
    }
}
.nav-install-btn:active { transform: scale(0.97); }

/* ---------- SHARE BUTTON (premium, btn-secondary family) ---------- */
.btn-share {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    color: var(--text-body);
    border: 2px solid var(--border);
    padding: clamp(16px, 4vw, 18px) clamp(28px, 6vw, 36px);
    border-radius: 12px;
    font-size: clamp(14px, 3.5vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 3px 10px rgba(45, 55, 72, 0.07);
    flex: 1;
    min-width: min(200px, 100%);
    max-width: 400px;
    justify-content: center;
    font-family: inherit;
}
@media (hover: hover) and (pointer: fine) {
    .btn-share:hover {
        color: var(--brand);
        border-color: var(--brand);
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(209, 0, 0, 0.14);
    }
}
.btn-share:active { transform: translateY(-1px); }
.btn-share .btn-icon { transition: transform 0.3s ease; }
@media (hover: hover) and (pointer: fine) {
    .btn-share:hover .btn-icon { transform: scale(1.1); }
}

/* ================================================================
   SHARE PANEL (lazy js/share.js UI)
   Mobile = bottom sheet | Desktop = popover (JS position)
   ================================================================ */
.share-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 11000;
}
.share-panel {
    position: fixed;
    z-index: 11001;
    width: min(340px, calc(100vw - 24px));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.97);
    transition: opacity 0.22s ease, transform 0.22s ease;
}
#sharePanelRoot.open .share-backdrop { opacity: 1; pointer-events: auto; }
#sharePanelRoot.open .share-panel { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.share-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.share-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.share-close {
    width: 32px; height: 32px;
    border: none; border-radius: 50%;
    background: transparent; color: var(--text-muted);
    font-size: 20px; line-height: 1; cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.share-close:hover { background: var(--surface-alt); color: var(--text); }

.share-native-btn {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff; border: none; border-radius: 10px;
    padding: 11px 12px; font-size: 13.5px; font-weight: 700;
    cursor: pointer; font-family: inherit;
    box-shadow: 0 4px 12px rgba(209, 0, 0, 0.30);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin-bottom: 12px;
}
.share-native-btn:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(209, 0, 0, 0.40); }
.share-native-btn:active { transform: scale(0.98); }

.share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.share-item {
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    color: var(--text-body);
    text-align: center;
    font-family: inherit;
}
.share-item:hover {
    background: var(--brand-soft);
    color: var(--brand);
    border-color: #f3bcbc;
    transform: translateY(-1px);
}
.share-item:active { transform: scale(0.97); }

.share-copy-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.share-copy-row .share-save {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--success), var(--success-strong));
    color: #fff;
    border: none;
    font-weight: 700;
}
.share-copy-row .share-save:hover {
    background: linear-gradient(135deg, var(--success), var(--success-strong));
    color: #fff;
    border-color: transparent;
    filter: brightness(1.05);
}

.share-note {
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 10px 0 0;
    line-height: 1.45;
    text-align: center;
}

/* Mobile: bottom sheet */
@media (max-width: 640px) {
    .share-panel {
        left: 50%;
        right: auto;
        top: auto;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        width: calc(100vw - 24px);
        transform: translate(-50%, 120%);
    }
    #sharePanelRoot.open .share-panel { transform: translate(-50%, 0); }
    .share-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Toast (sirf transform/opacity) */
.share-toast {
    position: fixed;
    left: 50%;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 8px);
    background: #1a202c;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 11100;
    box-shadow: var(--shadow-md);
}
.share-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Footer column titles (h4 -> p swap, same look) */
.footer-column .footer-col-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 14px;
    position: relative;
    padding-bottom: 8px;
}
.footer-column .footer-col-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #FF0000, #C40000);
}

/* ================================================================
   DARK MODE (prefers-color-scheme - zero runtime cost, pure CSS)
   Buttons (HD/SD/HQ + Download) ke brand colors same rehte hain.
   ================================================================ */
/* ================================================================
   DARK MODE v1.0.7 (auto system + manual toggle)
   - AUTO: system preference, user ke "light" choice ko respect karta hai
   - FORCED: navbar toggle (html[data-theme]) - localStorage persist
   - Buttons (HD/SD/HQ + Download) ke brand colors same rehte hain.
   ================================================================ */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        --surface: #1c242e;
        --surface-alt: #232e3c;
        --surface-card: rgb(26, 32, 41);
        --text: #e8edf4;
        --text-body: #b6c2d0;
        --text-soft: #9aa8bc;
        --text-muted: #9aa8bc;
        --border: #2a3441;
        --border-strong: #3b4757;
        --brand-soft: #2b1a1a;
        --focus-ring: rgba(255, 107, 107, 0.45);
        --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
        --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 20px 44px rgba(0, 0, 0, 0.55), 0 6px 14px rgba(0, 0, 0, 0.35);
    }

    html:not([data-theme="light"]) body { color: #b6c2d0; background: linear-gradient(180deg, #12161d 0%, #0f141b 100%) !important; }

    html:not([data-theme="light"]) a { color: #7aa7ff; }

    html:not([data-theme="light"]) a:hover { color: #9db9ff; }

    html:not([data-theme="light"]) .atq { background-color: transparent; }

    html:not([data-theme="light"]) .cont-1 { background: 0% 0% / 100% no-repeat rgb(26, 32, 41); }

    html:not([data-theme="light"]) .bg-body-tertiary { background-color: #1a2029 !important; }

    html:not([data-theme="light"]) .navbar-brand,
    html:not([data-theme="light"]) .navbar-brand:hover,
    html:not([data-theme="light"]) .navbar-brand:focus { color: #e8edf4; }

    html:not([data-theme="light"]) .name-line-1,
    html:not([data-theme="light"]) .name-line-2 { color: #e8edf4; }

    html:not([data-theme="light"]) .navbar-nav .nav-link { color: #cbd5e0; }

    html:not([data-theme="light"]) .navbar-toggler { border-color: rgba(255, 255, 255, 0.15); }

    html:not([data-theme="light"]) .navbar-toggler-icon svg path { stroke: rgba(226, 232, 240, 0.75); }

    html:not([data-theme="light"]) .hero-title { color: var(--text); }

    html:not([data-theme="light"]) .trust-points li { background: var(--surface); border-color: var(--border); color: var(--text-body); }

    html:not([data-theme="light"]) .quality-note { color: var(--text); }

    html:not([data-theme="light"]) .video-url.khan {
        border-color: var(--border) !important;
        background-color: #141a22 !important;
        color: #e8edf4 !important;
    }

    html:not([data-theme="light"]) .form-control { background-color: #141a22; border-color: var(--border); color: #e8edf4; }

    html:not([data-theme="light"]) .form-control:focus { background-color: #141a22; color: #e8edf4; }

    html:not([data-theme="light"]) .form-control::placeholder { color: #7c8aa0; }

    html:not([data-theme="light"]) #pasteButton { color: #7c8aa0 !important; }

    html:not([data-theme="light"]) #thumbnailImage { border-color: #263041; }

    html:not([data-theme="light"]) .img-thumbnail { background-color: #1c242e; border-color: #263041; }

    html:not([data-theme="light"]) #sizeDropdownBtn {
        background: linear-gradient(135deg, #1c242e, #171e27) !important;
        color: #34d399 !important;
        border-color: #1ea55f !important;
    }

    html:not([data-theme="light"]) .size-dropdown-menu { background: #1c242e; border-color: #263041; }

    html:not([data-theme="light"]) .dropdown-header { background: linear-gradient(135deg, #1c242e, #171e27); color: #e8edf4; border-bottom-color: #263041; }

    html:not([data-theme="light"]) .dropdown-item .item-title { color: #e8edf4; }

    html:not([data-theme="light"]) .dropdown-item .item-subtitle { color: #9aa8bc; }

    html:not([data-theme="light"]) .dropdown-item .item-dimensions { color: #34d399; }

    html:not([data-theme="light"]) .dropdown-item .item-check { color: #34d399; }

    html:not([data-theme="light"]) .dropdown-item:hover { background: #232e3c; }

    html:not([data-theme="light"]) .size-dropdown-menu .dropdown-item:hover { background: #2b2124 !important; }

    html:not([data-theme="light"]) .size-dropdown-menu .dropdown-item.active { background: linear-gradient(135deg, #2b1a1a, #331d1d) !important; }

    html:not([data-theme="light"]) .dropdown-footer { background: #171e27; border-top-color: #263041; }

    html:not([data-theme="light"]) .dropdown-footer .text-muted { color: #9aa8bc !important; }

    html:not([data-theme="light"]) .text-muted { color: #9aa8bc !important; }

    html:not([data-theme="light"]) .feature-heading { color: #ff7b7b; }

    html:not([data-theme="light"]) .feature-paragraph,
    html:not([data-theme="light"]) .answer,
    html:not([data-theme="light"]) .yt-faq-answer { color: #b6c2d0; }

    html:not([data-theme="light"]) .feature { background: #1a2029; color: #c9d4e2; }

    html:not([data-theme="light"]) .feature h3 { color: #ff7b7b; }

    html:not([data-theme="light"]) .feature p { color: #b6c2d0; }

    html:not([data-theme="light"]) .faq-section .question { color: #e2e8f0; }

    html:not([data-theme="light"]) .faq-item { border-bottom-color: #263041; }

    html:not([data-theme="light"]) .yt-faq-main-title { color: #e8edf4; }

    html:not([data-theme="light"]) .yt-faq-item { background: #171e27; border-color: #263041; }

    html:not([data-theme="light"]) .yt-faq-question { background: rgba(38, 48, 65, 0.6); color: #e8edf4; }

    html:not([data-theme="light"]) .yt-faq-question:hover { background: rgba(38, 48, 65, 0.95); }

    html:not([data-theme="light"]) .side-popup { background: #1c242e; }

    html:not([data-theme="light"]) .side-popup.success { background: linear-gradient(135deg, #10231a, #1c242e); }

    html:not([data-theme="light"]) .side-popup.error { background: linear-gradient(135deg, #2b1315, #1c242e); }

    html:not([data-theme="light"]) .side-popup.warning { background: linear-gradient(135deg, #2b2312, #1c242e); }

    html:not([data-theme="light"]) .side-popup.info { background: linear-gradient(135deg, #0f2126, #1c242e); }

    html:not([data-theme="light"]) .popup-content p { color: #a8b6c8; }

    html:not([data-theme="light"]) .popup-close { color: #7c8aa0; }

    html:not([data-theme="light"]) .popup-close:hover { background: #263041; color: #cbd5e0; }

    html:not([data-theme="light"]) .action-buttons .btn-secondary {
        background: linear-gradient(135deg, #1c242e, #171e27) !important;
        color: #e2e8f0 !important;
        border-color: #2a3441 !important;
    }

    html:not([data-theme="light"]) .action-buttons .btn-secondary:hover {
        color: #ff6b6b !important;
        border-color: var(--brand) !important;
    }

    html:not([data-theme="light"]) .btn-share {
        background: linear-gradient(135deg, #1c242e, #171e27);
        color: #e2e8f0;
        border-color: #2a3441;
    }

    html:not([data-theme="light"]) .btn-share:hover { color: #ff6b6b; border-color: var(--brand); }

    html:not([data-theme="light"]) .pwa-banner-card {
        background: rgba(26, 32, 41, 0.96);
        border-color: rgba(38, 48, 65, 0.9);
    }

    html:not([data-theme="light"]) .pwa-banner-text strong { color: #e8edf4; }

    html:not([data-theme="light"]) .pwa-banner-text span { color: #9aa8bc; }

    html:not([data-theme="light"]) .pwa-close-btn { color: #8fa0b5; }

    html:not([data-theme="light"]) .pwa-close-btn:hover { color: #cbd5e0; background: rgba(148, 163, 184, 0.15); }
}

/* ---- FORCED DARK (navbar toggle) ---- */
html[data-theme="dark"] {
        --surface: #1c242e;
        --surface-alt: #232e3c;
        --surface-card: rgb(26, 32, 41);
        --text: #e8edf4;
        --text-body: #b6c2d0;
        --text-soft: #9aa8bc;
        --text-muted: #9aa8bc;
        --border: #2a3441;
        --border-strong: #3b4757;
        --brand-soft: #2b1a1a;
        --focus-ring: rgba(255, 107, 107, 0.45);
        --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
        --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 20px 44px rgba(0, 0, 0, 0.55), 0 6px 14px rgba(0, 0, 0, 0.35);
    }

html[data-theme="dark"] body { color: #b6c2d0; background: linear-gradient(180deg, #12161d 0%, #0f141b 100%) !important; }

html[data-theme="dark"] a { color: #7aa7ff; }

html[data-theme="dark"] a:hover { color: #9db9ff; }

html[data-theme="dark"] .atq { background-color: transparent; }

html[data-theme="dark"] .cont-1 { background: 0% 0% / 100% no-repeat rgb(26, 32, 41); }

html[data-theme="dark"] .bg-body-tertiary { background-color: #1a2029 !important; }

html[data-theme="dark"] .navbar-brand,
    html[data-theme="dark"] .navbar-brand:hover,
    html[data-theme="dark"] .navbar-brand:focus { color: #e8edf4; }

html[data-theme="dark"] .name-line-1,
    html[data-theme="dark"] .name-line-2 { color: #e8edf4; }

html[data-theme="dark"] .navbar-nav .nav-link { color: #cbd5e0; }

html[data-theme="dark"] .navbar-toggler { border-color: rgba(255, 255, 255, 0.15); }

html[data-theme="dark"] .navbar-toggler-icon svg path { stroke: rgba(226, 232, 240, 0.75); }

html[data-theme="dark"] .hero-title { color: var(--text); }

html[data-theme="dark"] .trust-points li { background: var(--surface); border-color: var(--border); color: var(--text-body); }

html[data-theme="dark"] .quality-note { color: var(--text); }

html[data-theme="dark"] .video-url.khan {
        border-color: var(--border) !important;
        background-color: #141a22 !important;
        color: #e8edf4 !important;
    }

html[data-theme="dark"] .form-control { background-color: #141a22; border-color: var(--border); color: #e8edf4; }

html[data-theme="dark"] .form-control:focus { background-color: #141a22; color: #e8edf4; }

html[data-theme="dark"] .form-control::placeholder { color: #7c8aa0; }

html[data-theme="dark"] #pasteButton { color: #7c8aa0 !important; }

html[data-theme="dark"] #thumbnailImage { border-color: #263041; }

html[data-theme="dark"] .img-thumbnail { background-color: #1c242e; border-color: #263041; }

html[data-theme="dark"] #sizeDropdownBtn {
        background: linear-gradient(135deg, #1c242e, #171e27) !important;
        color: #34d399 !important;
        border-color: #1ea55f !important;
    }

html[data-theme="dark"] .size-dropdown-menu { background: #1c242e; border-color: #263041; }

html[data-theme="dark"] .dropdown-header { background: linear-gradient(135deg, #1c242e, #171e27); color: #e8edf4; border-bottom-color: #263041; }

html[data-theme="dark"] .dropdown-item .item-title { color: #e8edf4; }

html[data-theme="dark"] .dropdown-item .item-subtitle { color: #9aa8bc; }

html[data-theme="dark"] .dropdown-item .item-dimensions { color: #34d399; }

html[data-theme="dark"] .dropdown-item .item-check { color: #34d399; }

html[data-theme="dark"] .dropdown-item:hover { background: #232e3c; }

html[data-theme="dark"] .size-dropdown-menu .dropdown-item:hover { background: #2b2124 !important; }

html[data-theme="dark"] .size-dropdown-menu .dropdown-item.active { background: linear-gradient(135deg, #2b1a1a, #331d1d) !important; }

html[data-theme="dark"] .dropdown-footer { background: #171e27; border-top-color: #263041; }

html[data-theme="dark"] .dropdown-footer .text-muted { color: #9aa8bc !important; }

html[data-theme="dark"] .text-muted { color: #9aa8bc !important; }

html[data-theme="dark"] .feature-heading { color: #ff7b7b; }

html[data-theme="dark"] .feature-paragraph,
    html[data-theme="dark"] .answer,
    html[data-theme="dark"] .yt-faq-answer { color: #b6c2d0; }

html[data-theme="dark"] .feature { background: #1a2029; color: #c9d4e2; }

html[data-theme="dark"] .feature h3 { color: #ff7b7b; }

html[data-theme="dark"] .feature p { color: #b6c2d0; }

html[data-theme="dark"] .faq-section .question { color: #e2e8f0; }

html[data-theme="dark"] .faq-item { border-bottom-color: #263041; }

html[data-theme="dark"] .yt-faq-main-title { color: #e8edf4; }

html[data-theme="dark"] .yt-faq-item { background: #171e27; border-color: #263041; }

html[data-theme="dark"] .yt-faq-question { background: rgba(38, 48, 65, 0.6); color: #e8edf4; }

html[data-theme="dark"] .yt-faq-question:hover { background: rgba(38, 48, 65, 0.95); }

html[data-theme="dark"] .side-popup { background: #1c242e; }

html[data-theme="dark"] .side-popup.success { background: linear-gradient(135deg, #10231a, #1c242e); }

html[data-theme="dark"] .side-popup.error { background: linear-gradient(135deg, #2b1315, #1c242e); }

html[data-theme="dark"] .side-popup.warning { background: linear-gradient(135deg, #2b2312, #1c242e); }

html[data-theme="dark"] .side-popup.info { background: linear-gradient(135deg, #0f2126, #1c242e); }

html[data-theme="dark"] .popup-content p { color: #a8b6c8; }

html[data-theme="dark"] .popup-close { color: #7c8aa0; }

html[data-theme="dark"] .popup-close:hover { background: #263041; color: #cbd5e0; }

html[data-theme="dark"] .action-buttons .btn-secondary {
        background: linear-gradient(135deg, #1c242e, #171e27) !important;
        color: #e2e8f0 !important;
        border-color: #2a3441 !important;
    }

html[data-theme="dark"] .action-buttons .btn-secondary:hover {
        color: #ff6b6b !important;
        border-color: var(--brand) !important;
    }

html[data-theme="dark"] .btn-share {
        background: linear-gradient(135deg, #1c242e, #171e27);
        color: #e2e8f0;
        border-color: #2a3441;
    }

html[data-theme="dark"] .btn-share:hover { color: #ff6b6b; border-color: var(--brand); }

html[data-theme="dark"] .pwa-banner-card {
        background: rgba(26, 32, 41, 0.96);
        border-color: rgba(38, 48, 65, 0.9);
    }

html[data-theme="dark"] .pwa-banner-text strong { color: #e8edf4; }

html[data-theme="dark"] .pwa-banner-text span { color: #9aa8bc; }

html[data-theme="dark"] .pwa-close-btn { color: #8fa0b5; }

html[data-theme="dark"] .pwa-close-btn:hover { color: #cbd5e0; background: rgba(148, 163, 184, 0.15); }


/* ================================================================
   REDUCED MOTION (naye elements included)
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    .thumbnail-view,
    .thumbnail-view::after,
    .share-panel,
    .share-backdrop,
    .share-toast,
    .trust-points li,
    .nav-install-btn,
    .btn-share,
    .btn-share .btn-icon,
    .share-item,
    .share-native-btn {
        transition: none !important;
        animation: none !important;
    }
    .thumbnail-view:hover,
    .thumbnail-view:hover::after,
    .btn-share:hover,
    .share-item:hover {
        transform: none !important;
    }
}

/* ================================================================
   v1.0.5 ZERO-WAIT INSTANT PAINT + v1.0.11 UNDERLAY FIX (EOF block - cascade winner)
   1) Skeleton shimmer: jab tak pehla pixel nahi aata (~1 CDN round trip)
   2) Seamless crossfade: mq -> SD -> Full HD upgrade (koi flicker nahi)
   3) prefers-reduced-motion: dono effects off
   v1.0.11 DOUBLE-BOX FIX (root cause): purana shimmer IN-FLOW block tha
   (display:block + margin) aur JS use img ke POORE download (onload) par
   hata tha — jabke browser image ke PEHLE bytes aate hi paint karna shuru
   kar deta hai. Beech ke window mein shimmer box + image box DONO stacked
   dikhte the = "2 box" bug. Ab shimmer ABSOLUTE UNDERLAY hai (image ke
   BILKUL neeche, z-index 0) — pixels aate hi image shimmer ke UPAR paint
   hoti hai, do box KABHI nahi bante. 16:9 reserve rule se layout pehle
   din se stable (CLS img-shift bhi khatam).
   ================================================================ */

/* Shimmer UNDERLAY: desktop (769px+) = image ke BILKUL neeche, same geometry
   (img: margin 10px -17px => top/bottom 10px, left/right -17px - v1.1.4 recalibrated) */
@media only screen and (min-width: 769px) {
    .thumbnail-view.thumb-loading::before {
        content: "";
        position: absolute;
        top: 10px;
        bottom: 10px;
        left: -17px;
        right: -17px;
        z-index: 0;
        border-radius: 8px;
        background: linear-gradient(100deg, #e9ecef 40%, #f8f9fa 50%, #e9ecef 60%);
        background-size: 200% 100%;
        animation: thumbShimmer 1.1s linear infinite;
    }
}

/* Shimmer UNDERLAY: mobile (<=768px) = image ke BILKUL neeche, same geometry
   (img: margin 10px calc(-3vw - 3px) => top/bottom 10px, side bleed same - v1.1.4) */
@media only screen and (max-width: 768px) {
    .thumbnail-view.thumb-loading::before {
        content: "";
        position: absolute;
        top: 10px;
        bottom: 10px;
        left: calc(-3vw - 3px);
        right: calc(-3vw - 3px);
        z-index: 0;
        border-radius: 8px;
        background: linear-gradient(100deg, #e9ecef 40%, #f8f9fa 50%, #e9ecef 60%);
        background-size: 200% 100%;
        animation: thumbShimmer 1.1s linear infinite;
    }
}

/* v1.0.11 16:9 RESERVE (sirf loading ke dauran): img ka box t=0 par hi 16:9
   mil jata hai (aspect-ratio) — headers aane par KOI expansion nahi (CLS
   img-shift khatam). object-fit: contain = SD/HQ (4:3) bina distortion.
   position/z-index = img shimmer ke UPAR paint ho (underlay ke sath pair).
   Class drop par rule apne aap hat jata hai — maxres (16:9) par ZERO shift. */
.thumbnail-view.thumb-loading #thumbnailImage {
    position: relative;
    z-index: 1;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

/* v1.0.11 badge guard: CHECKING.../FULL HD badge hamesha img ke upar rahe
   (img loading ke dauran z-index:1 hai — badge ko z-index:2 dete hain) */
.thumbnail-view.thumb-loading .hd-badge {
    z-index: 2;
}

@keyframes thumbShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Quality upgrade crossfade (mq -> SD -> Full HD seamless swap) */
/* v1.0.10 SPEED FIX: fade OFF — competitor jaisa INSTANT paint. Purana 0.28s
   fade (opacity 0.45 -> 1) image aane ke baad use DUBARA dim karke fade karta
   tha = reveal slow feel hota tha. Ab pixels aate hi full opacity (class
   compatibility ke liye rule rakha hai, animation none). */
#thumbnailImage.thumb-upgrade {
    animation: none;
}
@keyframes thumbFadeIn {
    from { opacity: 0.45; }
    to { opacity: 1; }
}

/* Dark mode shimmer colors */
.dark-mode .thumbnail-view.thumb-loading::before {
    background: linear-gradient(100deg, #262b35 40%, #333b48 50%, #262b35 60%);
}

/* Reduced motion: shimmer + crossfade dono off */
@media (prefers-reduced-motion: reduce) {
    .thumbnail-view.thumb-loading::before {
        animation: none;
    }
    #thumbnailImage.thumb-upgrade {
        animation: none;
    }
}

/* ================================================================
   v1.0.7 PREMIUM UI (header polish + paste-fix + theme toggle)
   NOTE: sirf navbar/hero/input/theme selectors - thumbnail shimmer,
   crossfade aur full-bleed blocks ko touch nahi karta.
   ================================================================ */

/* ---- 1) INPUT WRAP: paste button input ke andar center (kabhi niche nahi girta) ---- */
.input-wrap {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    min-width: 0;
}
.input-wrap .video-url {
    width: 100%;
}
.paste-btn-inside {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: transparent;
    border: none;
    color: var(--text-soft, #666);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}
@media (max-width: 768px) {
    .paste-btn-inside { right: 8px; width: 35px; height: 35px; }
}
@media (hover: hover) and (pointer: fine) {
    .paste-btn-inside:hover { background: rgba(0, 0, 0, 0.06); }
}
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .paste-btn-inside:hover { background: rgba(255, 255, 255, 0.09); }
}
html[data-theme="dark"] .paste-btn-inside:hover { background: rgba(255, 255, 255, 0.09); }

/* ---- 2) PREMIUM NAVBAR (glass + red gradient hairline) ---- */
.nav-bar {
    position: relative;
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid rgba(45, 55, 72, 0.08);
    box-shadow: 0 10px 30px -18px rgba(16, 24, 40, 0.25) !important;
}
html:not([data-theme="dark"]) .nav-bar { background: rgba(255, 255, 255, 0.86) !important; }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]):not([data-theme="dark"]) .nav-bar { background: rgba(26, 32, 41, 0.86) !important; }
}
html[data-theme="dark"] .nav-bar { background: rgba(26, 32, 41, 0.86) !important; }
.nav-bar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(209, 0, 0, 0.45) 35%, rgba(255, 107, 107, 0.65) 50%, rgba(209, 0, 0, 0.45) 65%, transparent 100%);
    pointer-events: none;
}
/* theme button right-side placement (desktop: nav links ke baad, mobile: hamburger ke saath) */
.nav-bar .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.nav-bar .navbar-collapse { order: 2; }
.nav-bar .theme-toggle-btn { order: 3; }
.nav-bar .navbar-toggler { order: 4; }
@media (max-width: 991.98px) {
    .nav-bar .theme-toggle-btn { margin-left: auto; }
    .nav-bar .navbar-toggler { margin-left: 10px; }
}
@media (max-width: 768px) {
    /* toggler absolute right:0 hai (existing) — theme btn uske LEFT par absolute */
    .nav-bar .theme-toggle-btn {
        position: absolute;
        right: 66px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }
    /* brand text buttons ke neeche na aaye — premium 2-line app-style lockup */
    .mobile-name {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        width: auto;
        flex: 1;
        margin-left: 32px;
        margin-right: 116px;
        min-width: 0;
    }
    .name-line-1,
    .name-line-2 {
        font-size: 13px;
        line-height: 1.15;
        white-space: nowrap;
    }
}

/* ---- 3) THEME TOGGLE BUTTON ---- */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 50%;
    background: var(--surface, #ffffff);
    color: var(--text, #1a202c);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.theme-toggle-btn:active { transform: scale(0.94); }
.theme-toggle-btn:focus-visible {
    outline: 3px solid var(--focus-ring, rgba(255, 107, 107, 0.45));
    outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
    .theme-toggle-btn:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
}
/* icon swap: light = moon (dark par jao), dark = sun (light par jao) */
.theme-toggle-btn .ic-sun { display: none; }
.theme-toggle-btn .ic-moon { display: inline-block; }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .theme-toggle-btn .ic-sun { display: inline-block; }
    html:not([data-theme="light"]) .theme-toggle-btn .ic-moon { display: none; }
}
html[data-theme="dark"] .theme-toggle-btn .ic-sun { display: inline-block; }
html[data-theme="dark"] .theme-toggle-btn .ic-moon { display: none; }

/* ---- 4) PREMIUM HERO ---- */
.hero-title {
    background: linear-gradient(180deg, #1a202c 15%, #4a5568 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .hero-title {
        background: linear-gradient(180deg, #f1f5fb 15%, #9fb0c6 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}
html[data-theme="dark"] .hero-title {
    background: linear-gradient(180deg, #f1f5fb 15%, #9fb0c6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
    .trust-points li {
        transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    }
    .trust-points li:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: rgba(209, 0, 0, 0.35);
    }
}

/* ================================================================
   v1.0.8 APPENDIX 1: FOOTER CSS MERGED (purani css/footer.css)
   - ZERO extra request: chaaron HTML pages se footer.css <link> hat gaya
   - Lock 5 (44px tap targets) applied
   - Order preserved: ye rules base style.css ke BAAD chalte hain
   ================================================================ */
/* ================================================================
   PROFESSIONAL FOOTER STYLES (css/footer.css)
   Dark premium footer - red accents, hover lift social icons
   ================================================================ */

.professional-footer {
    background: linear-gradient(180deg, #1a202c 0%, #171923 100%);
    color: #cbd5e0;
    padding: 56px 0 0;
    margin-top: 48px;
}

.footer-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-main-split {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    padding-bottom: 36px;
}

/* ---- Left: Brand & Social ---- */
.footer-brand-side {
    flex: 1 1 300px;
    max-width: 420px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-logo i {
    font-size: 30px;
    color: #FF0000;
}

.logo-text {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.footer-description {
    font-size: 14px;
    line-height: 1.65;
    color: #a0aec0;
    margin: 0 0 18px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e0;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.social-link:hover {
    background: #FF0000;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(255, 0, 0, 0.35);
}

/* ---- Right: Link columns ---- */
.footer-links-side {
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    flex: 2 1 420px;
    justify-content: flex-end;
}

.footer-column {
    min-width: 130px;
}

.footer-column h4,
.footer-column .footer-col-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 14px;
    position: relative;
    padding-bottom: 8px;
}

.footer-column h4::after,
.footer-column .footer-col-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #FF0000, #C40000);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 2px; /* v1.0.8: 10px -> 2px (padding ne gap le liya, total spacing same feel) */
}

/* v1.0.8 LOCK 5: 44px touch targets (pehle link height sirf ~16px thi) */
.footer-links a {
    display: inline-block;
    padding: 12px 0;
    color: #a0aec0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s ease, padding-left 0.15s ease;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 4px;
}

/* ---- Bottom bar ---- */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: center;
}

.copyright {
    font-size: 13px;
    color: #718096;
    text-align: center;
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .professional-footer {
        padding: 40px 0 0;
        margin-top: 32px;
    }
    .footer-main-split {
        flex-direction: column;
        gap: 32px;
    }
    .footer-links-side {
        justify-content: flex-start;
        gap: 28px;
    }
}

/* ---- Disclaimer line (SEO compliance) ---- */
.footer-disclaimer {
    font-size: 12.5px;
    color: #718096;
    text-align: center;
    font-style: italic;
    margin: -18px 0 18px;
}

/* ================================================================
   v1.0.8 APPENDIX 2: NEW PREMIUM HEADER (header-logo-handoff.zip se)
   - header.css verbatim append (cascade-safe: last wins)
   ================================================================ */
/* HEADER CSS (aapki purani Next.js site se nikali hui, plain CSS) */
:root {
  --yt-text: #2d3748;
  --yt-red: #ff0000;
}

/* ==================== NAVIGATION — PREMIUM REDESIGN ==================== */
.ytdl-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
}

/* Animated brand gradient line on the very top */
.ytdl-nav-accent {
  height: 3px;
  background: linear-gradient(90deg, #ff0000, #ff7a00, #667eea, #ff0000);
  background-size: 250% 100%;
  animation: accentFlow 9s linear infinite;
}
@keyframes accentFlow {
  to {
    background-position: 250% 0;
  }
}

.ytdl-nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  min-height: 64px;
}

/* ---- Brand ---- */
.ytdl-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #ff2d2d, #c40000);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow:
    0 6px 14px rgba(255, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.25s ease;
}
.ytdl-brand:hover .brand-badge {
  transform: scale(1.06) rotate(-4deg);
}
.brand-badge svg {
  width: 24px;
  height: 24px;
}

.brand-text {
  display: flex;
  min-width: 0;
}

/* Mobile: stacked two-line name */
.mobile-name {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}
.name-line-1,
.name-line-2 {
  font-size: 15px;
  font-weight: 800;
  color: var(--yt-text);
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.name-line-2 {
  background: linear-gradient(90deg, #ff0000, #ff6b6b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Desktop: single bold name */
.desktop-name {
  display: none;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--yt-text);
  white-space: nowrap;
}
.desktop-name b {
  font-weight: 800;
  background: linear-gradient(90deg, #ff0000, #ff6b6b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Desktop links + install button ---- */
.ytdl-nav-right {
  display: none;
  align-items: center;
  gap: 10px;
}

.ytdl-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ytdl-menu a {
  position: relative;
  padding: 9px 14px;
  border-radius: 10px;
  color: #43506b;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}
.ytdl-menu a:hover {
  color: var(--yt-red);
  background: rgba(255, 0, 0, 0.06);
}
.ytdl-menu a.active {
  color: var(--yt-red);
}
.ytdl-menu a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ff0000, #ff6b6b);
}

/* ---- Install App button (header) ---- */
.install-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff0000, #d10000);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(255, 0, 0, 0.3);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.install-app-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(255, 0, 0, 0.38);
}
.install-app-btn:active {
  transform: translateY(0);
}
/* App already installed → no install buttons anywhere */
html[data-pwa="installed"] .install-app-btn {
  display: none !important;
}

/* ---- Hamburger ---- */
.ytdl-toggler {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  /* v1.0.9 TOUCH: 44px+ target + instant tap (mobile 300ms delay/bounce khatam) */
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ytdl-toggler:hover {
  background: #fff;
}
.ytdl-toggler span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--yt-text);
}

/* ---- Mobile dropdown panel ---- */
.ytdl-mobile-panel {
  display: none;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
  padding: 10px 14px 14px;
  z-index: 1020;
  /* v1.0.9: chhoti/landscape screens par panel screen se bahar na jaye -
     andar scroll hota hai, Install App hamesha reachable rehta hai */
  max-height: calc(100vh - 84px);
  max-height: calc(100dvh - 84px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* v1.0.9: panel ke andar har touch target par instant tap */
.ytdl-mobile-panel a,
.ytdl-mobile-panel button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ytdl-mobile-panel.open {
  display: flex;
  animation: panelDrop 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes panelDrop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.ytdl-mobile-panel a {
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--yt-text);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.ytdl-mobile-panel a:hover,
.ytdl-mobile-panel a.active {
  background: rgba(255, 0, 0, 0.06);
  color: var(--yt-red);
}
.install-app-btn-wide {
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

@media (min-width: 992px) {
  .mobile-name {
    display: none;
  }
  .desktop-name {
    display: block;
  }
  .ytdl-nav-right {
    display: flex;
  }
  .ytdl-toggler {
    display: none;
  }
  .ytdl-mobile-panel {
    display: none !important;
  }
}

/* ---- v2 logo: ab brand-badge mein CSS gradient nahi, asli logo image hai ---- */
.brand-badge { background: none; box-shadow: none; border-radius: 0; width: 42px; height: 42px; }
.brand-badge img { width: 42px; height: 42px; display: block; border-radius: 12px;
  box-shadow: 0 6px 14px rgba(255, 0, 0, 0.28); }
/* mobile/desktop touch targets */
.ytdl-menu a, .ytdl-mobile-panel a { min-height: 44px; display: inline-flex; align-items: center; }
.ytdl-mobile-panel a { display: flex; }
@media (prefers-reduced-motion: reduce) { .ytdl-nav-accent { animation: none; } * { transition-duration: .01ms !important; } }

/* ================================================================
   v1.0.8 APPENDIX 3: HEADER INTEGRATION LAYER (site-specific)
   - LOCK 6: text-wrap balance (SIRF below-fold headings = first-screen
     layout par ZERO extra kaam, zero speed impact)
   - Old-nav class leaks neutralized (naya header cascade-winner)
   - Footer logo img (SVG play hata diya - brand logo hai)
   - Naye header controls par keyboard focus rings (a11y)
   - DARK MODE: site ke 3-layer pattern par (explicit + system-auto)
   ================================================================ */

/* ---- LOCK 6 (zero speed): balance sirf neeche wale headings par ---- */
.feature-heading,
.yt-faq-main-title { text-wrap: balance; }

/* ---- Purane .mobile-name rules ka leak neutralize (width:100% + center naya brand torta) ---- */
.ytdl-brand .mobile-name { width: auto; text-align: left; }
.ytdl-brand .name-line-2 { margin-top: 0; }

/* ---- Theme toggle naye header ke andar (base rule ka margin-left hatao, gap kaafi hai) ---- */
.ytdl-nav .theme-toggle-btn { margin: 0; flex-shrink: 0; }

/* ---- Footer logo: chhota brand logo (PNG) ---- */
.footer-logo img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: block;
    box-shadow: 0 3px 8px rgba(255, 0, 0, 0.25);
}

/* ---- Keyboard focus rings (naye interactive header controls) ---- */
.ytdl-brand:focus-visible,
.ytdl-toggler:focus-visible,
.ytdl-menu a:focus-visible, /* v1.0.8 LOCK 7 (completion): desktop menu links bhi ring cover */
.install-app-btn:focus-visible,
.ytdl-mobile-panel a:focus-visible {
    outline: 3px solid var(--focus-ring, rgba(255, 107, 107, 0.45));
    outline-offset: 2px;
}

/* ---- DARK MODE: explicit choice ---- */
html[data-theme="dark"] { --yt-text: #e8edf4; }
html[data-theme="dark"] .ytdl-nav {
    background: rgba(26, 32, 41, 0.88);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .ytdl-menu a { color: #c3ceda; }
html[data-theme="dark"] .ytdl-menu a:hover { color: #ff6b6b; background: rgba(255, 0, 0, 0.12); }
html[data-theme="dark"] .ytdl-menu a.active { color: #ff6b6b; }
html[data-theme="dark"] .ytdl-toggler { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); }
html[data-theme="dark"] .ytdl-toggler:hover { background: rgba(255, 255, 255, 0.16); }
html[data-theme="dark"] .ytdl-mobile-panel { background: #1a2029; border-bottom-color: rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] .ytdl-mobile-panel a { color: #dbe3ec; }
html[data-theme="dark"] .ytdl-mobile-panel a:hover,
html[data-theme="dark"] .ytdl-mobile-panel a.active { background: rgba(255, 0, 0, 0.14); color: #ff6b6b; }

/* ---- DARK MODE: system-auto (jab user ne manually kuch nahi chuna) ---- */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]):not([data-theme="dark"]) { --yt-text: #e8edf4; }
    html:not([data-theme="light"]):not([data-theme="dark"]) .ytdl-nav {
        background: rgba(26, 32, 41, 0.88);
        border-bottom-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    }
    html:not([data-theme="light"]):not([data-theme="dark"]) .ytdl-menu a { color: #c3ceda; }
    html:not([data-theme="light"]):not([data-theme="dark"]) .ytdl-menu a:hover { color: #ff6b6b; background: rgba(255, 0, 0, 0.12); }
    html:not([data-theme="light"]):not([data-theme="dark"]) .ytdl-menu a.active { color: #ff6b6b; }
    html:not([data-theme="light"]):not([data-theme="dark"]) .ytdl-toggler { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); }
    html:not([data-theme="light"]):not([data-theme="dark"]) .ytdl-toggler:hover { background: rgba(255, 255, 255, 0.16); }
    html:not([data-theme="light"]):not([data-theme="dark"]) .ytdl-mobile-panel { background: #1a2029; border-bottom-color: rgba(255, 255, 255, 0.08); }
    html:not([data-theme="light"]):not([data-theme="dark"]) .ytdl-mobile-panel a { color: #dbe3ec; }
    html:not([data-theme="light"]):not([data-theme="dark"]) .ytdl-mobile-panel a:hover,
    html:not([data-theme="light"]):not([data-theme="dark"]) .ytdl-mobile-panel a.active { background: rgba(255, 0, 0, 0.14); color: #ff6b6b; }
}

/* ---- v1.0.8 GUARD: hidden attribute hamesha respect ho ----
   (header.css ka display:inline-flex UA [hidden] rule ko override na kar sake;
   Safari/Firefox jahan beforeinstallprompt nahi milta wahan button chhupa rahe) */
.install-app-btn[hidden] { display: none !important; }
#pwaInstallBanner[hidden] { display: none !important; }

/* ================================================================
   v1.1.2 POLISH (footer social + mobile quality row)
   ZERO JS, ZERO speed cost, engine/layout untouched.
   ================================================================ */

/* ---- 1) FOOTER SOCIAL ROW ----
   6 share-intent links (X, Facebook, WhatsApp, Telegram, LinkedIn, Email).
   Button styles upar existing .social-link block se aate hain (dark theme,
   red hover + lift) - yahan sirf wrap add hai: chhoti screens par icons
   do lines mein wrap ho jayen, koi overflow nahi. */
.social-links {
    flex-wrap: wrap;
}

/* Footer description ka internal /blog link - brand red (default UA blue nahi) */
.footer-description a {
    color: #ff8a8a;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.footer-description a:hover {
    color: #ffffff;
}

/* ---- 2) MOBILE QUALITY BUTTONS: HD/SD/HQ teeno EK horizontal row ----
   BUG ROOT CAUSE (owner-reported): desktop block file mein mobile media
   query ke BAAD aata tha aur uska 'flex-wrap: wrap !important' cascade
   winner ban ke mobile nowrap ko hara deta tha -> HQ button niche gir
   jata tha (2+1 layout).
   FIX: ye block file ke SAB SE END par hai = ab cascade winner ye hai.
   flex: 1 1 0 + min-width: 0 = teeno buttons barabar width, fit guaranteed,
   koi scroll nahi. Height 44px+ (touch target). */
@media (max-width: 768px) {
    #qualitySelector {
        flex-wrap: nowrap !important;
        gap: 6px !important;
    }
    #qualitySelector button {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 14px 4px !important;
        font-size: clamp(10.5px, 3.4vw, 13.5px) !important;
        white-space: nowrap !important;
        text-align: center !important;
    }
}
