/* CSS Variables for easy theming */
:root {
    --primary-color: #36bdd4;
    --primary-hover-color: #2d9aab; /* Darker shade for hover */
    --secondary-color: #eaeaeb;
    --border-color: #dee2e6;
    --text-color: #333;
    --text-light-color: #6c757d;
    --bg-color: #ffffff;
    --header-height: 60px;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);  
}

/* Utility class to hide elements */
.hidden {
    display: none !important;
}

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Ensure the container inside the header uses flexbox for alignment */
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Take full width to enable space-between */
}

/* 1. Sticky Header */
.site-header {
    background-color: rgb(241, 241, 241);
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 1rem 1.45rem;;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff; /* Keep logo blue as requested */
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    gap: 1.5rem;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}

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

/* Hamburger Menu Button */
.hamburger-btn {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Above the mobile nav */
}

.hamburger-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger animation to "X" */
.hamburger-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Menu */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Language Switcher Styles */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropbtn {
    background-color: transparent;
    color: var(--text-color);
    padding: 8px 12px;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: background-color 0.2s;
}

.lang-dropbtn svg:last-child {
    transition: transform 0.2s ease;
}

.lang-dropbtn:hover {
    background-color: var(--secondary-color);
}

.lang-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 140px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1002;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 5px;
}

.lang-content a {
    color: var(--text-color);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: normal;
}

.lang-content a:hover {
    background-color: #f1f1f1;
    color: var(--primary-color);
}

.lang-content.show {
    display: block;
}

/* Rotate chevron when active */
.lang-dropdown.active .lang-dropbtn svg:last-child {
    transform: rotate(180deg);
}

/* Mobile Language Switcher */
.mobile-lang-wrapper {
    margin-top: 1rem;
    width: 80%;
    text-align: center;
}

.mobile-lang-select {
    width: 100%;
    padding: 10px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    font-size: 1rem;
    background-color: #fff;
    color: var(--text-color);
}

/* 2. Main Navigation (Platform Switcher) */
.platform-switcher {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background-color: rgb(233, 235, 236);
    margin-bottom: 1px;
    margin-top: 0;
}

.platform-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    background-color: rgb(255, 255, 255); /* White background for non-active buttons */
    color: var(--text-light-color);
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all 0.2s ease-in-out;
}

.platform-btn img {
    width: 20px;
    height: 20px;
}

.platform-btn:hover {
    background-color: rgb(203, 203, 206);
    color: var(--text-color);
}

.platform-btn.active {
    background-color: #613bc9; /* A nice violet-blue */
    color: rgb(248, 247, 247);
    border-color: #613bc9;
}

.platform-btn.active img {
    /* This filter combo turns any colored icon to white */
    filter: brightness(0) invert(1);
}
    
/* Desktop styles for platform switcher */
@media (min-width: 768px) {
    .platform-switcher {
        justify-content: center;
        gap: 1.5rem;
    }
    .platform-btn {
        padding: 1rem 2rem;
        font-size: 1.15rem;
    }
    .platform-btn img {
        width: 26px;
        height: 26px;
    }
}

/* Mobile Visibility Utilities */
.desktop-only { display: flex; }
.mobile-only { display: none; }

/* Collapsible Platforms Container for smooth slide-down */
.collapsible-platforms {
    justify-content: center;
    padding-top: 0;
    margin-top: -1px;
    border-top: none;
    max-height: 100px; /* Sufficient height for one row of buttons when visible */
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out, margin 0.3s ease-out;
}

.collapsible-platforms.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}

/* Blinking Ad Text */
.blinking-ad-text {
    text-align: center;
    padding-bottom: 0.5rem; /* Reduced space below the text */
    font-weight: bold;
    font-size: 1.1rem;
    color:darkblue;
    animation: blink-effect 1.3s steps(1) infinite;
    margin-bottom: 0;
}
@keyframes blink-effect {
    50% {
        color: blue;
    }
}
/* 4. Downloader Component */
.downloader-card {
    background-color: var(--bg-color);
    padding: 1rem 0 1rem; /* Reduced top padding to close the gap */
    border-radius: 0; /* Remove border-radius for full-width block */
    box-shadow: var(--box-shadow);
    text-align: center;
    margin-top: 0;
}

.downloader-card h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.downloader-card .subtitle {
    color: var(--text-light-color);
    margin-bottom: 1rem; /* Reduced gap above input container */
}

.input-container {
    display: flex;
    gap: 0.5rem; /* Default gap for side-by-side layout */
    margin-bottom: 1rem;
    margin-top: 0;
}

.input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
}

#url-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 80px; /* Make space for the inner button */
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #eeeeee; 
}

.input-adornment {
    position: absolute;
    top: 50%;
    right: 8px; /* Position from the right edge */
    transform: translateY(-50%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

#url-input:focus {
    border-color: var(--primary-color); /* Use primary color for focused border */
}
.input-adornment.hidden {
    display: none;
}

.paste-btn {
    /* This is now an adornment inside the input */
    background-color: rgb(201, 205, 206);
    color: white;
    padding: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 20px; /* Rounded button */
}

.paste-btn:hover {
    background-color: rgb(160, 198, 207);
    color: rgb(255, 255, 255);
}

.clear-btn {
    /* Make the clear button a simple icon */
    background-color: transparent;
    color: var(--text-light-color);
    padding: 0.5rem;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background-color: black;
    border: 2px solid black;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.download-btn img {
    height: 1.5em;
}


.download-btn:hover {
    background-color: #2892c4;;
    color: white;
    box-shadow: #89968d 5px 5px 6px;
}

/* Loading state for download button */
.download-btn.loading {
    cursor: not-allowed;
    background-color: var(--primary-hover-color);
}

.download-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* * **Important Check for Advertisements**
* If your Advertisement Box is defined as:
* <div class="container"><div class="advertisement-section">...</div></div>
* Then its margin-top from the main CSS should be checked.
*/

/* Adjusting the main Advertisement Section spacing for clean layout */
.advertisement-section,
section.advertisement-section {
    /* Removed margin-top dependency on the content above it.
       The spacing is now mostly controlled by .preview-card's bottom margin. */ /* FIX: Set margin-top to 0 to prevent collision and rely solely on the .preview-card's large margin-bottom. */
    margin-top: 0;
    padding: 1rem;
    background-color: var(--secondary-color);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light-color);
    font-size: 0.9rem;
    /* transition: margin-top 0.4s ease-in-out; */ /* Smooth transition */
}

/* Download Options Section */
.download-options-container {
    /* This is now the table container */
    margin-top: 1.5rem;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    padding-top: 0;

    /* --- Animation Properties --- */
    overflow: hidden;
    /* max-height: 500px; */ /* REMOVED: This was cutting off tall vertical videos */
    opacity: 1;
    transition: all 0.4s ease-in-out;
}

.download-options-container.hidden {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    border: none;
}

/* Each row in the download table */
.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

.download-row:last-child {
  border-bottom: none;
}

/* Left side (resolution + size) */
.format-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 1.1rem; /* Larger font for desktop readability */
  /* Add a thin right border for separation */
  border-right: 1px solid #ddd; /* Light grey border */
  padding-right: 16px; /* Space between info and button */
}

/* File size text */
.file-size {
  color: #555;
  font-size: 1rem; /* Larger font for desktop readability */
}

/* Download button inside the row */
.format-download-btn {
  width: 120px; /* Set a fixed width for better readability */
  background: #28a745;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 17px; /* Increase font size for better readability */
  cursor: pointer;
  transition: background 0.2s;
}

.format-download-btn:hover {
  background: #218838;
}

/* Group header for Audio/Video */
.format-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #343a40; /* Dark grey */
  color: white;
  padding: 8px 16px;
  font-weight: bold;
  font-size: 1rem; /* Larger font for desktop */
  text-align: left;
}

.format-group-header img {
  width: 16px;
  height: 16px;
}

/* More formats header */
.more-formats-header {
  text-align: center;
  padding: 12px 16px;
  font-weight: bold;
  font-size: 1.1rem; /* Consistent with other desktop text */
  color: var(--text-color);
  background-color: var(--secondary-color); /* Light background to differentiate */
  margin-top: 1rem; /* Space above it */
  /* Add some border to make it look like a separator */
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}


/* 3. Sub-Navigation (Downloader Type) */
.downloader-type-switcher {
    display: flex;
    justify-content: flex-start; /* Aligns buttons to the left */
    gap: 0.5rem;
    margin-bottom: 0.75rem; /* Further reduced space below the buttons */
}
.download-row.needs-merge {
    background-color: #fff0f0;
}

.type-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-light-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-btn img {
    width: 16px;
    height: 16px;
}

.type-btn.active {
    background-color: var(--bg-color);
    color: #5a3de0;
    font-weight: 500;
    border-color: #5a3de0;
}

/* 5. Standard Sections */
section {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.how-to-download .steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    text-align: center;
    margin-top: 1.5rem;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.supported-platforms .logos-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    align-items: center;
}

.platform-logo { font-weight: 500; color: var(--text-light-color); }
.content-faq h3 { margin-top: 2rem; }
.faq-item { margin-top: 1rem; }

/* New Content Sections */
.content-block {
    box-shadow: rgb(75, 73, 73);
}

.content-block {
    box-shadow: var(--box-shadow);
}

.content-block h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.content-block .features-title {
    color: var(--primary-color);
}

.text-center {
    text-align: center;
}

.text-light {
    color: var(--text-light-color);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-top: 1rem;
}

.features-list {
    list-style: disc;
    padding-left: 20px;
    margin-top: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light-color);
}

.features-list li + li {
    margin-top: 0.5rem;
}

/* New FAQ Section with Accordion */
.faq-section {
    background-color: transparent;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
}

.faq-section > h2 {
    text-align: center;
}

.faq-intro {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.faq-item {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 0; /* Override generic .faq-item margin from other pages */
}

.faq-question {
    font-weight: 500;
    cursor: pointer;
    list-style: none; /* Remove default marker */
    position: relative;
    padding-right: 1.5rem; /* Space for the chevron */
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
    content: '›';
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light-color);
    transition: transform 0.2s ease-in-out;
}

.faq-item[open] > .faq-question::after {
    transform: translateY(-50%) rotate(90deg);
}

.faq-answer {
    margin-top: 1rem;
    color: var(--text-light-color);
    line-height: 1.7;
}

/* Privacy Policy Page */
.policy-container {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.policy-container h1 {
    font-size: 2.25rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.policy-container h2 {
    font-size: 1.75rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.policy-content p,
.policy-content li {
    color: var(--text-light-color);
    line-height: 1.8;
}

.policy-content p + p,
.policy-content p + ul {
    margin-top: 1rem;
}

.policy-content ul {
    list-style: disc;
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.policy-content .contact-list {
    list-style: none;
    padding-left: 0;
}

.policy-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.policy-content a:hover {
    text-decoration: underline;
}

/* 8. Footer */
.site-footer-main {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    color: var(--text-light-color);
    font-size: 0.9rem;
}
.footer-nav { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
.footer-nav a { color: var(--text-light-color); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    /* Show hamburger on mobile */
    .hamburger-btn {
        display: flex;
    }

    .platform-switcher {
        /* Adjust padding and keep buttons in a row */
        padding: 1rem;
    }
    .platform-btn {
        flex: 1 1 0px; /* Make buttons take up equal space */
        min-width: 0;
        padding: 0.7rem 0.5rem; /* Adjust padding for a more "boxy" feel */
        margin-top: 0.1rem;
        font-size: 0.9rem; /* Slightly larger font */
        gap: 5px; /* Slightly larger gap */
        white-space: nowrap; /* Keep text on one line */
    }   

    .platform-btn img {
        width: 18px; /* Slightly larger icon */
        height: 18px;
    }
    
    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }
    
    /* More Button Styling on Mobile */
    .platform-btn.more-btn {
        flex: 0 0 auto; /* Don't grow like others */
        width: auto;
        padding: 0 1rem;
        background-color: #f1f1f1;
        /* Ensure text is visible and styled */
        color: var(--text-color);
        font-weight: 500;
    }
    
    .downloader-card,
    section {
        padding: 1.5rem 1rem;
    }

    .downloader-card h1 { 
        /* Use a responsive font size to prevent wrapping on small screens */
        font-size: clamp(1.3rem, 5.5vw, 1.5rem); 
    }

    .input-container {
        flex-direction: column;
        gap: 1rem; /* Use a larger gap for the vertical layout */
    }

    .download-btn {
        padding: 0.65rem 1rem; /* Reduce horizontal padding */
        font-size: 0.9rem;     /* Slightly smaller font */
        width: 100%; /* Make button full-width on mobile */
    }

    /* On mobile, make FAQ items blend into the background to look more like a list */
    .faq-item {
  background-color: #fffdfd; /* ya tumhari theme ka rang */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Reset download row text size for mobile */
.format-info {
    font-size: 1rem; /* Default font size for mobile */
}
.file-size {
    font-size: 14px; /* Original smaller size for mobile */
}
.format-group-header {
    font-size: 14px; /* Original smaller size for mobile */
}

/* More formats header for mobile */
.more-formats-header {
    font-size: 1rem; /* Smaller for mobile */
    padding: 8px 16px; /* Smaller padding for mobile */
    margin-top: 0.5rem; /* Smaller margin for mobile */
}

/* Hide file extension on mobile for a cleaner look */
.file-size .file-ext {
    display: none;
}
}
/* Downloader type switcher buttons for mobile */
@media (max-width: 768px) {
    .type-btn {
        flex-direction: column; /* Stack icon and text vertically */
        gap: 0.2rem; /* Reduce space between icon and text */
        padding: 0.6rem 0.5rem; /* Adjust padding for vertical layout */
        font-size: 0.75rem; /* Make text slightly smaller */
        flex: 1; /* Allow buttons to take equal space */
    }
}


/* --- Video Info Card --- */
.video-info-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    text-align: left;
}

.video-thumbnail {
    width: 160px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

#video-title-display {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
}

.merge-thumbnail {
    width: 120px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 10px;
}

/* --- Loading Spinner --- */
.loading-box {
    text-align: center;
    padding: 40px 20px;
    /* Aap is color ko badal sakte hain */
    background-color: #dee1e4; 
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #f7f7f7;
    border-top-color: #3784ffe3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

/* 🛠️ 1. HORIZONTAL SLIDER CONTAINER */
/* ================================================= */
.multi-media-slider {
    display: flex; /* सभी कार्ड्स को एक ही लाइन में रखने के लिए */
    gap: 1.5rem; /* कार्ड्स के बीच 1.5rem का गैप */
    
    /* हॉरिजॉन्टल स्क्रॉलिंग की अनुमति दें */
    overflow-x: auto; 
    overflow-y: hidden;
    
    width: 100%;
    
    /* स्क्रॉलिंग को आसान बनाने के लिए थोड़ा पैडिंग (padding) */
    padding: 10px 0; 
    
    /* Scrollbar को छिपाता है (सिर्फ़ क्लीनर दिखने के लिए) */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* Chrome, Safari, और Opera के लिए Scrollbar छिपाएँ */
.multi-media-slider::-webkit-scrollbar {
    display: none;
}
/* --- Preview Card (CRITICAL: Allow Content to Determine Height) --- */
.preview-card {
  background: rgb(255, 255, 255);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.8rem;
  /* Use max-width for responsiveness */
  max-width: 380px;
  width: 100%;
  /* FIX 1: Ensure the card takes the full height of the vertical video */
  height: auto !important;
  min-height: 0;
  /* FIX 2: This is the style for a SINGLE card. It should be centered. */
  /* 🟢 !important हटा दिया गया। यह स्लाइडर ओवरराइड से संभाला जाएगा। */
  margin: 1rem auto 1.5rem auto;
  box-shadow: 0 4px 12px rgba(41, 40, 40, 0.863);
  animation: fadeIn 0.3s ease-in-out;
  text-align: center;
  /* Use flex to manage inner content alignment */
  display: flex;
  flex-direction: column;
}
.preview-card .preview-video {
    /* Ensure media element doesn't shrink */
    flex-shrink: 0;
}

/* CRITICAL: Only apply slider-specific styles when a card is INSIDE the slider */
/* 
  सुधार: अब हम सीधे #download-results के अंदर कार्ड को स्टाइल करेंगे,
  लेकिन केवल तभी जब उसमें एक से अधिक कार्ड हों (यानी, जब वह एक स्लाइडर हो)।
*/
#download-results:not(:has(> :only-child)) .preview-card {
    margin: 0; /* स्लाइडर में मार्जिन रीसेट करें */
    flex-shrink: 0; /* कार्ड को सिकुड़ने से रोकें */
}

/* --- Video Container (Ensure it doesn't limit height) --- */
.preview-video-container {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden; /* Ensures video corners stay rounded */
    border-radius: 10px;
    margin-bottom: 0.8rem;
    /* The aspect-ratio will be set by JS once the video metadata is loaded.
       This prevents the layout from jumping. */
    aspect-ratio: 16 / 9; /* Default aspect ratio before video loads */
    background-color: #f1efef; /* Placeholder color */
}

/* --- Actual Video Element (CRITICAL for Sliding and Fitting) --- */
.preview-video {
  width: 100%;
  height: auto; /* Let the video's aspect ratio determine the height */
  /* REMOVED: padding-bottom: 30px !important; was causing scaling issues. */
  
  /* Ensures the whole video/thumbnail fits inside the frame without cropping */
  object-fit: cover; /* This is key for fitting vertical media */
  /* FIX 5: REMOVED max-height to allow vertical videos to grow to their full natural height. */
  display: block; 
  border-radius: 10px;
}

/* --- Buttons (Ensure full width) --- */
.preview-buttons {
  display: flex;
  justify-content: center;
  margin-top: 0; /* Already added margin to video container */
}

.btn-solid {
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  background: var(--primary-color);
  border: none;
  color: #fff;
  width: 100%; 
  transition: background 0.2s ease-in-out;
}

.btn-solid:hover {
  background: var(--secondary-color);
}


/* --- Other styles remain the same --- */
.error-text {
  color: red;
  text-align: center;
  font-weight: 500;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

.resolution-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

.fast-badge {
    background-color: #ffcc00;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
}
/* ================================================= */
/* 🛠️ 1. MOBILE-SPECIFIC LAYOUT FIXES (Vertical Stack) */
/* ================================================= */

/* 768px या उससे कम चौड़ाई वाले स्क्रीन के लिए नियम */
@media (max-width: 768px) {
    
    /* 1. मल्टी-मीडिया स्लाइडर कंटेनर को बदलें */
    .multi-media-slider {
        /* Flex लेआउट हटा दें */
        display: block; 
        
        /* हॉरिजॉन्टल स्क्रॉलिंग हटा दें */
        overflow-x: hidden; 
        
        /* मोबाइल पर कोई हॉरिजॉन्टल पैडिंग नहीं */
        padding: 0; 
        
        /* मोबाइल पर Scrollbar छिपाने की आवश्यकता नहीं (अगर आपने छिपाया है) */
        -ms-overflow-style: initial; 
        scrollbar-width: initial;
    }
    .multi-media-slider::-webkit-scrollbar {
        display: initial;
    }

    /* 2. प्रीव्यू कार्ड्स को बदलें (सबसे महत्वपूर्ण) */
    .multi-media-slider .preview-card {
        /* CRITICAL: हॉरिजॉन्टल स्लाइडर के नियम को ओवरराइड करें */
        
        /* कार्ड को पूरी चौड़ाई लेने दें (सेंटर करने के लिए) */
        flex-shrink: initial; 
        width: 100%; 
        max-width: 380px; /* सिंगल-कार्ड के जैसी अधिकतम चौड़ाई रखें */
        
        /* सेंटर करें और वर्टिकल गैप वापस लाएँ (जैसा सिंगल कार्ड में था) */
        margin: 1rem auto 1.5rem auto !important;
    }
    
    /* सुनिश्चित करें कि .preview-card के अंदर की इमेज/वीडियो भी ठीक से स्केल हो */
    .multi-media-slider .preview-card .preview-video {
        width: 100%;
        height: auto;
    }
}

/* --- Instagram Audio/Video Toggle --- */
.download-controls {
    margin-top: 0.8rem;
}

.download-type-toggle {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 0.8rem;
    background-color: var(--secondary-color);
    padding: 4px;
    border-radius: var(--border-radius);
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.toggle-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    background-color: transparent;
    color: var(--text-light-color);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.toggle-btn.active {
    background-color: #fff;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

  body { font-family: Arial, sans-serif; padding: 0; margin: 0; background-color: var(--bg-color); color: var(--text-color); }
  .site-header { background-color: #ffffff; padding: 0.8rem 0; } /* Added padding to header for better spacing */
  .logo img { height: 40px; width: auto; vertical-align: middle; } /* Increased logo height */
  .site-footer-main { background-color: #f8f9fa; padding: 3rem 1rem; border-top: 1px solid var(--border-color); }
  .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
  .footer-column h4 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--text-color); }
  .footer-column .footer-nav { display: flex; flex-direction: column; gap: 0.75rem; }
  .footer-nav a { color: var(--text-light-color); }

  .resizer-container { max-width: 800px; margin: 2rem auto; padding: 2rem; background-color: var(--bg-color); border: 1px solid var(--border-color); border-radius: var(--border-radius); box-shadow: var(--box-shadow); text-align: center; }
  .resizer-container h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
  .resizer-container .subtitle { color: var(--text-light-color); margin-bottom: 2rem; }

  /* Upload Area Styles (from converter.html) */
  .upload-area { border: 2px dashed var(--border-color); border-radius: var(--border-radius); padding: 3rem 1rem; text-align: center; cursor: pointer; transition: background-color 0.2s, border-color 0.2s; }
  .upload-area.dragover { background-color: #e9f8ff; border-color: var(--primary-color); }
  .upload-icon { font-size: 3rem; color: var(--primary-color); transition: transform 0.2s ease-in-out; }
  .upload-text { margin-top: 1rem; font-weight: 500; }
  .upload-area.dragover .upload-icon { transform: translateY(-10px); }
  .upload-hint { color: var(--text-light-color); font-size: 0.9rem; }
  #file-input { display: none; }
  #select-file-btn { margin-top: 1rem; padding: 0.9rem 1.5rem; max-width: 249px; }

  /* Edit View Styles */
  .select-button-wrapper {
      position: relative;
      display: inline-flex;
      margin-top: 1rem;
      --chevron-btn-width: calc(16px + 2 * 0.8rem); /* SVG icon width + 2 * horizontal padding */
  }
  .select-button-wrapper .btn-solid {
      margin-top: 0;
  }
  .select-button-wrapper .chevron-btn {
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
      border-left: 1px solid var(--primary-hover-color);
      padding: 0.6rem 0.8rem; /* Set specific padding for the chevron button */
      min-width: auto; /* Allow the button to be narrow */
  }
  #select-file-btn {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
  }
  .source-dropdown {
      position: absolute;
      bottom: 100%; /* Position above the button */
      left: 0;
      width: calc(100% - var(--chevron-btn-width)); /* Match width of 'Select Image' button */
      background-color: white;
      border: 1px solid var(--border-color);
      border-radius: var(--border-radius);
      box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
      z-index: 10;
      overflow: hidden;
      margin-bottom: 0.5rem;
  }
  .source-dropdown a { display: block; padding: 0.75rem 1rem; color: var(--text-color); text-decoration: none; text-align: left; }
  .source-dropdown a:hover { background-color: #f8f9fa; }


  #edit-view { display: flex; flex-direction: column; gap: 2rem; }
  .preview-container { width: 100%; text-align: center; }
  #preview { max-width: 100%; max-height: 400px; height: auto; border: 1px solid var(--border-color); border-radius: var(--border-radius); object-fit: contain; }

  .options-container { display: flex; flex-direction: column; gap: 1.5rem; background-color: #f8f9fa; padding: 1.5rem; border-radius: var(--border-radius); }
  .input-group {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1rem;
      padding: 1rem 0;
      border-bottom: 1px solid var(--border-color);
  }
  .options-container .input-group:last-child { border-bottom: none; }
  .input-group label { font-weight: 500; }
  .input-group input[type="number"], .input-group select { padding: 0.6rem 1rem; border: 1px solid var(--border-color); border-radius: var(--border-radius); background-color: #fff; color: var(--text-color); font-size: 1.1rem; width: 100px; text-align: center; }
  .input-group input[type="range"] { flex-grow: 1; max-width: 250px; }
  #qv { font-weight: bold; min-width: 40px; text-align: left; }
  .quality-input-mobile { display: none; }

  /* Image Previews Container */
  .image-previews-container {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      justify-content: flex-start; /* Align items to the start (corner) */
      margin-bottom: 1.5rem;
      border: 3px dashed #b0b0b0; /* Bolder and bigger dashed border */
      border-radius: var(--border-radius);
      padding: 3rem; /* Increased padding for a larger box */
      min-height: 200px; /* Increased min-height */
      align-items: flex-start; /* Align items to the top */
      background-color: transparent; /* Removed background for a pure outline look */
  }
  .image-preview-item {
      position: relative;
      width: 120px; /* Increased preview size */
      height: 120px; /* Increased preview size */
      border: 1px solid #eee;
      border-radius: var(--border-radius);
      overflow: hidden;
      display: flex;
      justify-content: center;
      align-items: center;
  }
  .image-preview-item img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
  }
  .dimension-group { display: flex; align-items: center; gap: 1rem; }
  .dimension-group label { min-width: 60px; text-align: right; }
  .dimension-group input[type="number"] { width: 120px; font-size: 1.1rem; }
  .dimension-controls-stack { display: flex; flex-direction: column; gap: 1rem; }
  .accessory-controls-stack { display: flex; align-items: center; gap: 1rem; }
  .input-group:first-of-type { flex-direction: row; justify-content: center; gap: 1.5rem; }
  .quality-controls { display: flex; align-items: center; gap: 1rem; }

  .dimension-group select { width: 80px; padding: 0.5rem 0.2rem; }

  .aspect-ratio-lock {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s;
  }
  .aspect-ratio-lock.locked {
    background-color: #e9f8ff;
    border-color: var(--primary-color);
  }
  .image-preview-item .remove-btn {
      position: absolute;
      top: 2px;
      right: 2px;
      background-color: rgba(255, 0, 0, 0.7);
      color: white;
      border: none;
      border-radius: 50%;
      width: 20px;
      height: 20px;
      font-size: 0.8rem;
      display: flex;
      justify-content: center;
      align-items: center;
      cursor: pointer;
      line-height: 1; /* For better centering of 'x' */
      padding: 0;
  }
  /* Style for the "Add More" button inside the preview container */
  .add-more-card {
      width: 120px;
      height: 120px;
      border: 2px dashed var(--border-color);
      border-radius: var(--border-radius);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      cursor: pointer;
      color: var(--text-light-color);
      transition: border-color 0.2s, color 0.2s;
      font-size: 0.9rem;
      text-align: center;
      padding: 0.5rem;
  }
  .add-more-card:hover {
      border-color: var(--primary-color);
      color: var(--primary-color);
  }

  .actions-container { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
  .btn-solid { padding: 0.75rem 2rem; font-size: 1rem; cursor: pointer; background-color: var(--primary-color); color: white; border: none; border-radius: var(--border-radius); transition: background-color 0.3s ease; width: 100%; max-width: 300px; }
  .btn-solid:hover { background-color: var(--primary-hover-color); }
  .btn-secondary { background: none; border: none; color: var(--primary-color); font-weight: 500; cursor: pointer; padding: 0.5rem; }
  .btn-secondary:hover { text-decoration: underline; }

  .hidden { display: none !important; }

  /* Short labels for mobile */
  .short-label { display: none; }

  @media (max-width: 768px) { /* Increased breakpoint for better tablet support */
    .resizer-container { padding: 1rem; } /* No change */
    .options-container { padding: 1rem; }
    .input-group:not(:first-of-type) { /* Apply to all input-groups except the first one */
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    .input-group input[type="range"] { width: 100%; }
    .long-label { display: none; }
    .short-label { display: inline; }

    /* Hide slider on mobile and show number input */
    .input-group .quality-slider, .input-group .quality-value-display {
        display: none;
    }
    .quality-input-mobile { display: block; width: 120px !important; font-size: 1rem; }

    /* Specific adjustments for the dimension row */
    /* Main Row Adjustment */
    .input-group:first-of-type {
        display: flex !important;
        flex-direction: row; /* W/H ek side aur Lock/PX ek side */
        align-items: center;
        justify-content: center;
        gap: 15px;
    }

    /* W aur H boxes ko stack karne ke liye */
    .dimension-controls-stack {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Lock aur PX dropdown ko ek line mein laane ke liye */
    .accessory-controls-stack {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    /* Inputs ki width fix karein taki screen se bahar na jayein */
    .dimension-group input[type="number"] {
        width: 80px !important; font-size: 1rem;
    }
    .dimension-group {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }
  }

  /* Resources Section Styles */
  .resources-section {
      margin-top: 2rem;
      margin-bottom: 2rem;
  }
  .resources-heading {
      margin-bottom: 1rem;
      font-size: 1.5rem;
      font-weight: 500;
      text-align: left;
  }
  .resources-list {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
  }
  @media (min-width: 768px) {
      .resources-heading {
          text-align: center;
      }
      .resources-list {
          flex-direction: row;
          justify-content: center;
          flex-wrap: wrap;
      }
  }

/* Floating Share Button */
.floating-share-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.floating-share-btn img {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .floating-share-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    .floating-share-btn img {
        width: 20px;
        height: 20px;
    }
}

/* Custom Share Modal */
.custom-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.custom-share-modal.active {
    opacity: 1;
    visibility: visible;
}

.share-modal-content {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

.custom-share-modal.active .share-modal-content {
    transform: translateY(0);
}

.share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.share-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.close-share-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0 5px;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.8rem;
    gap: 8px;
}

.share-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.share-item:hover .share-icon {
    transform: scale(1.1);
}

.share-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Platform Colors */
.share-icon.whatsapp { background: transparent; }
.share-icon.twitter { background: #000000; }
.share-icon.gmail { background: #EA4335; }
.share-icon.reddit { background: #FF4500; }
.share-icon.pinterest { background: #E60023; }
.share-icon.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

.copy-link-wrapper {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    padding: 5px;
    background: #f9f9f9;
}

.copy-link-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px;
    font-size: 0.9rem;
    color: #555;
    outline: none;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

@media (max-width: 480px) {
    .share-modal-content {
        position: absolute;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        margin: 0;
        transform: translateY(100%);
    }
    .custom-share-modal.active .share-modal-content {
        transform: translateY(0);
    }
}

/* --- Consolidated Styles from HTML Files --- */

/* Monetag / Ad Styles */
iframe[src*="nap5k"],
iframe[src*="monetag"],
div[id*="monetag"],
div[class*="monetag"],
div[class*="adsby"],
div[class*="push"] {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
}

@media (max-width: 768px) {
  iframe[src*="nap5k"],
  div[id*="monetag"] {
    bottom: 70px !important;
  }
}

#floating-ad-container {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 300px;
    height: 250px;
    z-index: 999;
}

@media (max-width: 480px) {
    #floating-ad-container {
        width: 150px;
        height: 125px;
        bottom: 10px;
        right: 10px;
    }
}

.ad-mobile { 
    display: none; 
    text-align: center;
}
.ad-desktop { 
    display: block; 
    text-align: center;
}
@media (max-width: 768px) {
  .ad-mobile { display: block; }
  .ad-desktop { display: none; }
}

/* Steps Section (General) */
.steps-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.step-box {
    flex: 1;
    min-width: 200px;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.step-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #4facfe 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    z-index: 2;
    position: relative;
}

.step-icon-wrapper svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.step-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f0f2f5;
    color: var(--text-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    z-index: 2;
}

.step-box h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.step-box p {
    color: var(--text-light-color);
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Platform Specific Step Styles (Overrides) */
/* Twitter */
.twitter-theme .step-box:hover { border-color: #1DA1F2; }
.twitter-theme .step-icon-wrapper { background: linear-gradient(135deg, #1DA1F2 0%, #0d8bd9 100%); box-shadow: 0 10px 20px rgba(29, 161, 242, 0.2); }

/* Reddit */
.reddit-theme .steps-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.reddit-theme .step-box { align-items: flex-start; text-align: left; overflow: hidden; }
.reddit-theme .step-box:hover { box-shadow: 0 20px 40px rgba(255, 69, 0, 0.15); border-color: rgba(255, 69, 0, 0.3); }
.reddit-theme .step-icon-wrapper { background: linear-gradient(135deg, #FF4500 0%, #FF6314 100%); box-shadow: 0 8px 16px rgba(255, 69, 0, 0.25); margin-bottom: 1rem; }
.reddit-theme .step-badge { top: -15px; right: -10px; font-size: 6rem; font-weight: 900; color: rgba(255, 69, 0, 0.08); background: transparent; width: auto; height: auto; }

/* Pinterest */
.pinterest-theme .steps-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.pinterest-theme .step-box { align-items: flex-start; text-align: left; overflow: hidden; }
.pinterest-theme .step-box:hover { box-shadow: 0 20px 40px rgba(230, 0, 35, 0.15); border-color: rgba(230, 0, 35, 0.3); }
.pinterest-theme .step-icon-wrapper { background: linear-gradient(135deg, #E60023 0%, #ff585a 100%); box-shadow: 0 8px 16px rgba(230, 0, 35, 0.25); margin-bottom: 1rem; }
.pinterest-theme .step-badge { top: -15px; right: -10px; font-size: 6rem; font-weight: 900; color: rgba(230, 0, 35, 0.08); background: transparent; width: auto; height: auto; }

/* Merge Modal Styles */
.merge-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 9999; }
.merge-modal { position: relative; width: 420px; max-width: 90%; background: #ffffff; border-radius: 14px; padding: 22px; box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35); animation: scaleIn 0.25s ease; text-align: left; }
#merge-close-btn { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; background: #f0f0f0; border: none; border-radius: 50%; font-size: 18px; font-weight: bold; color: #888; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; transition: all 0.2s ease; }
#merge-close-btn:hover { background: #e0e0e0; color: #333; transform: rotate(90deg); }
.merge-preview { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.merge-thumb { width: 96px; height: 54px; border-radius: 8px; object-fit: cover; background: #eee; }
.merge-info { flex: 1; }
.merge-video-title { font-size: 14px; font-weight: 600; color: #222; margin-bottom: 4px; line-height: 1.3; }
.merge-meta { font-size: 12px; color: #777; }
.merge-progress { width: 100%; height: 12px; background: #eaeaea; border-radius: 999px; overflow: hidden; margin-bottom: 16px; position: relative; }
.merge-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #22c55e, #16a34a); transition: width 0.4s ease; border-radius: 999px; position: relative; }
.merge-status { font-size: 13px; color: #444; margin-bottom: 14px; text-align: center; }
.merge-download-btn { width: 100%; height: 44px; border-radius: 10px; border: none; background: #22c55e; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s ease; opacity: 0.6; pointer-events: none; }
.merge-download-btn.active { opacity: 1; pointer-events: auto; }
.merge-download-btn:hover.active { background: #16a34a; }
@keyframes scaleIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Resizer Page Styles */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; text-align: left; }
.step-card { background-color: var(--secondary-color); padding: 2rem; border-radius: var(--border-radius); border: 1px solid var(--border-color); }
.step-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; text-align: left; }
.feature-card { display: flex; align-items: flex-start; gap: 1rem; }
.feature-icon { flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--primary-color); }
.feature-icon svg { width: 28px; height: 28px; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }

.step-card{
  background:#fff;
  border:1px solid var(--border-color);
  border-radius:12px;
  padding:1.5rem;
  margin-bottom:1.5rem;
  box-shadow:0 2px 8px rgba(0,0,0,.05)
}
.step-header{display:flex;align-items:center;margin-bottom:1rem}
.step-number{
  background:var(--primary-color);
  color:#fff;
  width:28px;height:28px;
  display:flex;align-items:center;justify-content:center;
  border-radius:50%;
  font-weight:700;
  margin-right:12px
}
.generated-link-box{
  background:#f1f3f5;
  padding:1rem;
  border-radius:8px;
  font-family:monospace;
  font-size:.85rem;
  border:1px dashed #ccc
}
textarea#json-source{
  width:100%;height:150px;
  padding:1rem;
  border-radius:8px;
  font-family:monospace;
  background:#f9f9f9
}
.hidden{display:none}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
/* 🔥 OPEN BUTTON STYLES */
.btn-action{
  background:linear-gradient(135deg,#7b2cff,#b84cff);
  color:#fff;
  border:none;
  padding:14px 20px;
  border-radius:30px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 12px 25px rgba(123,44,255,.45);
}
.btn-action:hover{transform:translateY(-1px)}

.input-wrapper {
  position: relative;
  flex: 1;
}
.paste-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #f0f2f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  color: #333;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.paste-btn:hover {
  background-color: #e4e6eb;
  color: #000;
}
.desktop-home-link {
    display: none; /* Hidden on mobile */
}

/* Show on desktop and style it */
@media (min-width: 768px) {
    .desktop-home-link {
        display: inline-block;
        color: #333;
        font-weight: 500;
        text-decoration: none;
        padding: 8px 16px;
        border-radius: 8px;
        margin-left: auto; /* Pushes the link to the right */
        transition: background-color 0.2s ease;
    }
    .desktop-home-link:hover {
        background-color: #f0f2f5;
    }
    .hamburger-btn {
        display: none; /* Hide hamburger on desktop */
    }
    #download-results {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

#download-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.preview-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}
.preview-media-container {
    margin-bottom: 15px;
}

/* New Styles for Private Downloader Steps */
.private-steps-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 3rem;
}
.private-step-row {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.private-step-row.reverse {
    flex-direction: row-reverse;
}
.private-step-text {
    flex: 1;
    text-align: left;
}
.private-step-image-placeholder {
    flex: 1;
    background: #eef0f2;
    border: 2px dashed #cbd5e0;
    border-radius: 16px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    font-weight: 600;
    font-size: 1.1rem;
}
.step-badge-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.private-step-text h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}
.private-step-text p {
    color: var(--text-light-color);
    line-height: 1.6;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .private-step-row, .private-step-row.reverse {
        flex-direction: column;
    }
    .private-step-image-placeholder {
        width: 100%;
        min-height: 200px;
    }
    .input-row {
        gap: 8px;
    }
    .btn-action {
        padding: 10px 16px;
        font-size: 14px;
    }
    .paste-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    #private-post-url {
        padding-right: 70px !important;
    }
}

.share-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-icon svg {
  width: 22px;
  height: 22px;
}

.share-icon.telegram {
  transform: scale(1.1);
  transition: transform 0.25s ease;
}


.share-item:hover .share-icon.telegram {
  transform: scale(1.1) translateY(-6px);
}



.share-icon.telegram svg {
  width: 26px;
  height: 26px;
}