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

html {
    overflow: hidden auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.42857143;
    background: #f5f5f5;
    color: #222;
}

a {
    text-decoration: none;
    color: #337ab7;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* Main Layout */
.main-wrapper {
    display: flex;
    justify-content: center;
}

.main-content {
    width: 100vw;
    max-width: 1170px;
    background: #fff;
}

/* Header Navigation */
.navigation-menu {
    padding: 10px 20px;
    position: absolute;
    width: 100%;
    max-width: 1170px;
    z-index: 10;
    left: 50%;
    transform: translateX(-50%);
}

.navigation-menu a {
    color: #fff !important;
    opacity: 0.9;
    background-color: transparent !important;
}

.navigation-menu a:hover {
    color: #fff !important;
    opacity: 1 !important;
    text-decoration: none;
}

.nav__container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

.nav__mobile .nav__btn {
    display: none;
    padding: 10px;
}

.navbar-brand {
    float: left;
    height: 40px;
    padding: 10px;
    font-size: 15px;
    line-height: 19px;
    opacity: 1;
    display: flex;
    font-weight: 500;
}

.brand-4k {
    color: #ff4444;
    font-weight: 700;
}

.nav-toggle {
    display: block;
    background-color: transparent;
    width: 30px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 3px;
    border-radius: 35px;
    width: 100%;
    margin-top: 0;
    background-color: #fff;
    transition: 0.2s;
    opacity: 0.8;
    position: relative;
}

.nav-toggle span.mrg {
    margin-top: 5px;
}

.nav-toggle:hover span {
    opacity: 1;
}

.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(6.2px, 6.2px);
}

.nav-toggle.open span:nth-child(2) {
    width: 0;
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.menu-toggle {
    display: flex;
    max-height: 100vh;
    overflow: visible;
}

.nav__menu {
    display: flex;
    flex-direction: row;
    max-height: 100%;
    background-color: transparent;
    overflow: visible;
    padding: 0;
    margin: 0;
}

.nav__menu li {
    list-style: none;
    white-space: nowrap;
    position: relative;
}

.nav__menu li a,
.nav__menu li button.dropdown-label {
    display: block;
    font-size: 13px;
    padding: 1rem;
}

.nav__menu li button.dropdown-label {
    border: 0;
    background: transparent;
    text-align: left;
    color: #fff;
    opacity: 0.9;
    cursor: pointer;
}

.nav__menu li button.dropdown-label:hover {
    opacity: 1;
}

.nav__menu .dropdown .dropdown-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px; /* small, tight gap between title and arrow */
    padding: 1rem; /* keep the clickable area like other nav items */
}

.nav__menu .dropdown .dropdown-label {
    flex: 0 0 auto;
    padding: 0; /* avoid adding extra space before the arrow */
}

.nav-dropdown-toggle {
    border: 0;
    background: transparent;
    color: #fff;
    opacity: 0.9;
    cursor: pointer;
    padding: 0 0 0 4px; /* tiny spacing from title */
    margin-right: 0;
    border-radius: 4px;
    transition: 0.2s;
    line-height: 1;
}

.nav__menu .dropdown .dropdown-trigger:hover .nav-dropdown-toggle {
    opacity: 1;
    background: transparent;
}

.nav__menu .dropdown .dropdown-trigger:hover .dropdown-label {
    opacity: 1;
}

.nav-dropdown-toggle:hover {
    opacity: 1;
    background: transparent;
}

.dropdown.open .nav-dropdown-toggle {
    transform: rotate(180deg);
}

.nav__menu .dropdown > ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    opacity: 0;
    visibility: hidden;
    padding: 5px 0;
    transition: 0.3s;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
    max-height: 400px;
    min-width: 200px;
    z-index: 100;
    transform: translateY(8px);
    pointer-events: none;
}

.nav__menu .dropdown.open > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav__menu .dropdown ul li {
    padding: 0;
}

.nav__menu .dropdown ul li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav__menu .dropdown ul li a {
    padding: 11px 20px 11px 15px;
}

.nav__menu .dropdown ul.langs-menu {
    max-height: 280px;
    overflow-y: auto;
    min-width: 140px;
    right: 0;
    left: auto;
    /* Firefox scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.35) rgba(0,0,0,0.2);
}

/* Webkit (Chrome, Safari, Edge) scrollbar */
.nav__menu .dropdown ul.langs-menu::-webkit-scrollbar {
    width: 5px;
}

.nav__menu .dropdown ul.langs-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.nav__menu .dropdown ul.langs-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 10px;
}

.nav__menu .dropdown ul.langs-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.nav__menu .dropdown ul.langs-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav__menu .dropdown ul.langs-menu li a img {
    width: 16px;
    height: 12px;
    object-fit: cover;
}

.nav__menu .dropdown ul::-webkit-scrollbar {
    width: 7px;
}

.nav__menu .dropdown ul::-webkit-scrollbar-thumb {
    background-color: #3c426b;
    border-radius: 10px;
}

/* Mobile/Tablet Navigation */
@media screen and (max-width: 900px) {
    .navigation-menu {
        padding: 10px 15px;
    }

    .nav__container {
        position: relative;
    }

    .nav__mobile {
        width: 100%;
    }

    .nav__mobile .nav__btn {
        display: block;
        padding: 6px; /* Smaller padding on mobile */
    }

    /* Smaller hamburger icon on mobile */
    .nav-toggle {
        width: 24px; /* Reduced from 30px */
    }

    .nav-toggle span {
        height: 2.5px; /* Reduced from 3px */
    }

    .nav-toggle span.mrg {
        margin-top: 4px; /* Reduced from 5px */
    }

    /* Adjust transform values for smaller icon when open */
    .nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px); /* Adjusted for smaller size */
    }

    .nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px); /* Adjusted for smaller size */
    }

    .menu-toggle {
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: 0.4s;
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        padding: 15px;
        border-radius: 8px;
        z-index: 1000;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }

    .menu-toggle.active {
        display: flex;
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav__menu {
        flex-direction: column;
        width: 100%;
    }

    .nav__menu li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav__menu li:last-child {
        border-bottom: none;
    }

    .nav__menu li a {
        padding: 12px 15px;
    }

    /* On mobile, keep arrow on the right but still allow hover styling from the row */
    .nav__menu .dropdown .dropdown-trigger {
        display: flex;
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .nav-dropdown-toggle {
        padding: 10px 12px;
    }

    .nav__menu .dropdown ul {
        display: none; /* important: no blank space when closed */
        position: static;
        overflow: hidden;
        background-color: #1a1d2e;
        border-radius: 5px;
        margin: 0 0 10px;
    }

    .nav__menu .dropdown.open > ul {
        display: block; /* only take space when open */
        padding: 5px 0;
    }

    .nav__menu .dropdown ul li {
        border-bottom: none;
    }

    .nav__menu .dropdown ul li a {
        padding: 10px 20px;
        font-size: 13px;
    }

    .nav__menu .dropdown ul.langs-menu {
        right: auto;
        left: 0;
    }
}

/* Extra small devices (phones) - even smaller hamburger icon */
@media screen and (max-width: 480px) {
    .nav__mobile .nav__btn {
        padding: 4px; /* Even smaller padding on very small screens */
    }

    .nav-toggle {
        width: 22px; /* Even smaller on phones */
    }

    .nav-toggle span {
        height: 2px; /* Thinner lines on phones */
    }

    .nav-toggle span.mrg {
        margin-top: 3px; /* Tighter spacing */
    }

    .nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(4.5px, 4.5px);
    }

    .nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(3.5px, -3.5px);
    }
}

/* Banner/Hero Section */
.banner-area {
    position: relative;
    width: 100%;
    background: #639df9;
    background: linear-gradient(#02698b, rgba(124, 206, 255, 0.54));
    padding-bottom: 145px;
    overflow: hidden;
}

.banner-content {
    padding: 135px 20px 10px;
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.banner-content .header {
    color: #fff;
}

.banner-content .header h1 {
    font-size: 28px;
    font-weight: 300;
    margin-top: 40px;
}

.banner-content .header h2 {
    font-size: 16px;
    margin: 25px 0;
    font-weight: 300;
    line-height: 1.65;
}

/* Decorative Circles */
.span-circle {
    position: absolute;
    border-radius: 50%;
}

.span-1 {
    bottom: auto;
    left: -4%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
}

.span-2 {
    top: 12%;
    right: 3%;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
}

.span-3 {
    top: 230px;
    right: 9%;
    width: 75px;
    height: 75px;
    background: rgba(255, 255, 255, 0.08);
}

.span-4 {
    top: 35%;
    left: 2%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
}

.span-5 {
    top: 45%;
    left: 9%;
    width: 175px;
    height: 175px;
    background: rgba(255, 255, 255, 0.15);
}

.span-6 {
    right: 36%;
    bottom: 50%;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.04);
}

.span-7 {
    right: 1%;
    bottom: 30px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.2);
}

/* Wave SVG */
.wave-svg {
    position: absolute;
    bottom: -50px;
    width: 100%;
}

/* Search Form */
.form-container {
    margin-top: 40px;
}

.video-form {
    position: relative;
    display: flex;
    flex-wrap: wrap;
}

.video-form .url-input {
    width: calc(100% - 155px);
    line-height: 60px;
    background-color: #fff;
    color: #474756;
    font-size: 17px;
    font-weight: 300;
    letter-spacing: -0.3px;
    border: 0;
    border-radius: 10px 0 0;
    padding: 0 20px;
    outline: 0;
}

.video-form .url-input::placeholder {
    color: #999;
}

.download-btn {
    border: 0;
    background-color: #15b133;
    color: #fff;
    line-height: 60px;
    transition: 0.2s;
    cursor: pointer;
    font-weight: 300;
    font-size: 17px;
    width: 155px;
    border-radius: 0 0 10px;
}

.download-btn:hover {
    background-color: #13c135;
}

/* Sub Form Container */
.sub-form-container {
    /* Shared width system: match the download table edges exactly */
    width: min(var(--stack-max, 700px), calc(100% - (var(--stack-gutter, 20px) * 2)));
    min-height: 50px;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0 auto;
}

/* Loading Spinner */
.loading-message-container {
    min-height: 50px;
}

.loading-message {
    display: flex;
    padding: 20px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.loading-message .status {
    text-align: center;
    font-size: 14px;
    color: #3d4855;
    width: 100%;
    margin-top: 20px;
}

:root {
    --loader-width: 65px;
    --loader-height: 65px;
    --loader-color-primary: #27ae60;
    --line-width: 2px;
    --animation-duration: 750ms;

    /* Shared width system for the whole download stack (progress + video + table) */
    --stack-max: 700px;
    --stack-gutter: 20px;
}

.loader.quantum-spinner {
    --primary-circle-offset: calc(((var(--loader-width) * 0.2) / 2) - var(--line-width));
    --secondary-circle-offset: calc(((var(--loader-width) * 0.4) / 2) - var(--line-width));
    position: relative;
    width: var(--loader-width);
    height: var(--loader-height);
    transform-origin: center center;
    border-radius: 50%;
    border: var(--line-width) solid transparent;
    border-top-color: var(--loader-color-primary);
    animation: momentum var(--animation-duration) linear infinite;
}

.quantum-spinner:before,
.quantum-spinner:after {
    border-radius: 50%;
    transform-origin: center center;
    content: "";
    position: absolute;
}

.quantum-spinner:before {
    top: var(--primary-circle-offset);
    left: var(--primary-circle-offset);
    width: calc(var(--loader-width) * 0.8);
    height: calc(var(--loader-height) * 0.8);
    border: var(--line-width) solid transparent;
    border-top-color: var(--loader-color-primary);
    opacity: 0.7;
    animation: momentum calc(var(--animation-duration) * 2) linear infinite;
}

.quantum-spinner:after {
    top: var(--secondary-circle-offset);
    left: var(--secondary-circle-offset);
    width: calc(var(--loader-width) * 0.6);
    height: calc(var(--loader-height) * 0.6);
    border: var(--line-width) solid transparent;
    border-top-color: var(--loader-color-primary);
    opacity: 0.3;
    animation: momentum var(--animation-duration) linear infinite;
}

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

/* Download Progress */
.download-progress {
    margin: 20px 0;
    padding: 20px;
    background: #fff3e0;
    border-radius: 10px;
    border: 1px solid #ffcc80;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.download-progress p {
    color: #e65100;
    font-weight: 500;
    margin-bottom: 15px;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    /* Make the bar a bit narrower than the box on large screens */
    max-width: 620px;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: width 0.3s ease;
}

/* Download Area */
.download-area {
    text-align: center;
    width: min(var(--stack-max, 700px), calc(100% - (var(--stack-gutter, 20px) * 2)));
    margin: 0 auto;
    color: #253b57;
    padding: 0;
}

/* Video Info */
.video-info {
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    text-align: left;
}

.video-info .video-thumbnail img {
    width: 200px;
    height: 112px;
    object-fit: cover;
    border-radius: 10px;
}

.video-info .title {
    margin: 0 auto 13px;
    color: #1a2b50;
    display: block;
    font-size: 16px;
    max-width: 600px;
    overflow: hidden;
}

.video-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

/* Format Selection */
.format-selection {
    margin-top: 30px;
}

.downloads-table-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.download-type h3 {
    font-size: 17px;
    margin: 0 auto;
    color: #263f5e;
    padding: 25px 0;
    font-weight: 500;
}

/* Media Tabs */
.media-tabs {
    background-color: #24282c;
    border-radius: 4px 4px 0 0;
    position: relative;
    display: flex;
}

.media-tabs::after {
    content: "";
    width: 50%;
    height: 3px;
    position: absolute;
    transition: 0.2s;
    z-index: 0;
    bottom: 0;
    background: #ff2626;
    border-radius: 5px;
    left: 0;
}

.media-tabs.audio-active::after {
    left: 50%;
}

.tab-label {
    width: 50%;
    color: #fff;
    text-align: center;
    cursor: pointer;
    transition: 0.25s;
    z-index: 1;
    position: relative;
    padding: 13px 10px;
    font-size: 14px;
    display: inline-block;
    opacity: 0.7;
}

.tab-label:hover,
.tab-label.active {
    opacity: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Downloads Table */
.downloads-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.downloads-table thead {
    background: #2e3237;
}

.downloads-table thead tr {
    display: table-row;
}

.downloads-table th {
    padding: 14px 10px;
    color: #ececec;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
}

.downloads-table th:nth-child(1) { width: 22%; }
.downloads-table th:nth-child(2) { width: 14%; }
.downloads-table th:nth-child(3) { width: 18%; }
.downloads-table th:nth-child(4) { width: 26%; }
.downloads-table th:nth-child(5) { width: 20%; }

.downloads-table tbody tr {
    transition: 0.1s;
    display: table-row;
    border-bottom: 1px solid #f1f2f4;
}

.downloads-table tbody tr:hover {
    background-color: rgba(165, 193, 181, 0.08);
}

.downloads-table tbody td {
    padding: 12px 10px;
    font-size: 14px;
    text-align: center;
    vertical-align: middle;
}

/* Resolution Cell with Badge */
.resolution-wrap {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.1;
}

.quality-badge {
    position: relative;
    top: -1px;
    font-size: 0.55rem;
    font-weight: 700;
    color: #fff;
    background: #e53935;
    border-radius: 2px;
    padding: 1px 4px;
    letter-spacing: 0.3px;
    user-select: none;
}

.audio-subtext {
    font-weight: 400;
    color: #666;
    font-size: 0.82em; /* scale with the table cell font-size */
    line-height: 1.1;
    margin-top: 2px;
}

.hd-title {
    position: relative;
    left: 4px;
    font-size: 85%;
    vertical-align: super;
    color: #ec0631;
}

/* Download Button in Table */
.downloads-table .download-btn,
.download-row-btn {
    border: 0;
    background: #179f40;
    color: #fff;
    font-size: 13px;
    border-radius: 3px;
    white-space: nowrap;
    padding: 8px 12px 8px 14px;
    cursor: pointer;
    transition: 0.2s;
}

.downloads-table .download-btn:hover,
.download-row-btn:hover {
    background: #14ac42;
}

.download-row-btn .dropdown-arrow {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-left: 3px;
}

/* HDR/FPS/Codec Tags */
.codec-tag,
.fps-tag,
.hdr-tag {
    background-color: #a60642;
    color: #fff;
    padding: 3px 4px;
    font-size: 10px;
    border-radius: 3px;
    font-weight: 700;
    cursor: default;
    margin: 2px;
    display: inline-block;
    white-space: nowrap;
}

.fps-tag {
    background-color: #204473;
}

.codec-tag {
    background-color: #319d75;
}

.fps-tag.fps-30 {
    background-color: #3e3e3e;
}

/* Error Message */
.error-msg {
    display: block;
    margin: 25px auto 0;
    background: rgba(229, 57, 53, 0.1);
    color: #c33;
    padding: 15px 30px;
    border-radius: 10px;
    max-width: 700px;
    font-size: 14px;
}

/* Content Sections */
.content {
    padding: 0 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content .block {
    max-width: 900px;
    margin: 55px auto;
}

/* Features List */
.features-list {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    padding: 0 15px;
}

.feat-card {
    width: 100%;
    max-width: 240px;
    margin: 30px 10px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 1px 4px 15px 1px rgba(66, 100, 137, 0.2);
    text-align: center;
    transition: 0.25s;
    background: #fff;
}

@media (max-width: 767px) {
    .features-list {
        padding: 0 20px;
        gap: 15px;
    }

    .feat-card {
        max-width: 100%;
        margin: 10px 0;
    }
}

.feat-card:hover {
    transform: translate(0, -5px);
    box-shadow: 1px 4px 15px 1px rgba(66, 100, 137, 0.3);
}

.feat-card .card-icon {
    font-size: 40px;
    margin: 20px auto;
}

.feat-card .title {
    color: #4f5966;
    font-size: 17px;
    margin: 0 0 20px;
    line-height: 1.4;
    font-weight: 500;
}

.feat-card .desc {
    color: #1e2c3e;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
}

/* How To Section */
.howto {
    max-width: 100%;
    padding: 35px;
    border-radius: 10px;
    border: 10px solid #f1f2f4;
    background: #fff;
}

.howto h4 {
    font-size: 25px;
    font-weight: 300;
    color: #0a1e32;
    text-transform: capitalize;
}

.howto ul {
    margin: 40px 0;
    color: #162636;
    list-style: decimal;
    font-size: 15px;
    padding-left: 20px;
}

.howto ul li + li {
    margin-top: 22px;
}

.start-btn {
    background-color: #b92a37;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 21px;
    background-position: 9px center;
    padding: 10px 10px 10px 38px;
    font-size: 13px;
    border: 0;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    text-transform: capitalize;
    transition: 0.2s;
}

.start-btn:hover {
    background-color: #d22433;
}

/* CTA Section */
.cta-section {
    margin-top: 50px;
}

.cta-box {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
    border-top: 1px solid #eee;
}

.cta-box h3 {
    font-size: 22px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.cta-box p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* FAQ Section */
.faq-section {
    margin-top: 30px;
    padding-bottom: 40px;
}

.faq-title {
    text-align: center;
    font-size: 24px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 30px;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e9ecef;
}

.faq-item:first-child {
    border-top: 1px solid #e9ecef;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    text-align: left;
    transition: 0.2s;
}

.faq-question:hover {
    background-color: #f9f9f9;
}

.faq-arrow {
    font-size: 14px;
    color: #999;
    transition: transform 0.3s;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    padding: 0 15px 18px;
}

.faq-answer p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* Footer */
footer {
    background: #f0f0f0;
    margin-top: 50px;
    border-top: 1px solid #ddd;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 20px 40px;
    gap: 40px;
}

.footer-column {
    flex: 1;
    min-width: 150px;
}

.footer-brand {
    flex: 1.5;
}

.footer-logo {
    font-size: 20px;
    font-weight: 700;
    color: #c0392b !important;
    text-decoration: none !important;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 18px;
}

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

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #666 !important;
    font-size: 13px;
    text-decoration: none !important;
    transition: 0.2s;
}

.footer-column ul li a:hover {
    color: #c0392b !important;
}

.footer-bottom {
    border-top: 1px solid #e0e0e0;
    text-align: center;
    padding: 20px;
    background: #1a1a1a;
}

.footer-bottom p {
    margin: 0;
    font-size: 13px;
    color: #fff;
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-column {
        min-width: 100%;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
    flex: 1;
    padding-right: 15px;
    word-break: break-word;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
    text-align: center;
}

/* Progress Modal (Download-in-progress popup) */
.progress-modal .progress-modal-content {
    width: min(720px, calc(100vw - 30px));
}

.progress-modal-message {
    color: #1a2b50;
    font-weight: 600;
    margin: 4px 0 16px;
    line-height: 1.4;
    white-space: pre-line; /* allow 2-line status (phase + detail) */
}

.progress-modal .progress-modal-bar {
    height: 34px;
    border-radius: 999px;
    background: #e7e7e7;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}

.progress-modal .progress-bar {
    border-radius: 999px;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}

.progress-modal-hint {
    margin-top: 14px;
    color: #666;
    font-size: 0.92rem;
    line-height: 1.5;
}

.btn-success {
    background: #4caf50;
    color: white;
    padding: 15px 40px;
    font-size: 1.1rem;
    display: inline-block;
    text-decoration: none;
    margin-bottom: 20px;
    border-radius: 10px;
    transition: 0.2s;
}

.btn-success:hover {
    background: #45a049;
    text-decoration: none;
}

.modal-message {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Responsive */
@media all and (max-width: 1000px) {
    .banner-content {
        padding-top: 120px;
    }

    .banner-content .header h1 {
        font-size: 27px;
    }

    .banner-content .header h2 {
        font-size: 15px;
    }

    .content {
        padding: 0 15px;
    }

    :root { --stack-gutter: 15px; }

    .video-form {
        flex-wrap: wrap;
    }

    .video-form .url-input {
        line-height: 50px;
        width: 100%;
        border-radius: 5px 5px 0 0;
        font-size: 15px;
    }

    .download-btn {
        position: initial;
        width: 100%;
        line-height: 50px;
        border-radius: 0 0 5px 5px;
    }
}

@media all and (max-width: 767px) {
    .wave-svg {
        bottom: -5px;
    }

    .banner-content {
        padding-top: 100px;
    }

    .content {
        padding: 0 15px;
    }

    :root { --stack-gutter: 15px; }

    .video-info {
        flex-direction: column;
        text-align: center;
        margin: 15px auto;
        padding: 15px;
    }

    .video-info .video-thumbnail img {
        width: 100%;
        height: auto;
        max-width: 300px;
    }

    .video-meta {
        justify-content: center;
    }
}

@media all and (max-width: 600px) {
    .content {
        padding: 0 15px;
    }

    .download-progress {
        margin: 15px 0;
        padding: 15px;
    }
    :root { --stack-gutter: 15px; }

    /* On small screens, let the progress bar use full available width */
    .progress-bar-container {
        max-width: 100%;
    }

    .downloads-table-wrapper {
        overflow-x: hidden; /* try to fit without sideways scroll */
        margin: 0;
        padding: 0;
    }

    .downloads-table {
        min-width: 0;
        width: 100%;
    }

    /* Hide Codec / Features column on small screens to fit better */
    .downloads-table th:nth-child(4),
    .downloads-table td:nth-child(4) {
        display: none;
    }

    /* Re-balance widths for 4 visible columns: Resolution, Type, Size, Action */
    .downloads-table th:nth-child(1) { width: 30%; }
    .downloads-table th:nth-child(2) { width: 18%; }
    .downloads-table th:nth-child(3) { width: 24%; }
    .downloads-table th:nth-child(5) { width: 28%; }

    .downloads-table th,
    .downloads-table td {
        padding: 8px 6px;
        font-size: 11px;
        white-space: normal; /* allow wrapping like "109.74 MB" */
    }

    .downloads-table .download-btn,
    .download-row-btn {
        padding: 7px 10px;
        font-size: 11px;
    }

    /* Hide the small ▼ inside the table button on mobile to save width */
    .download-row-btn .dropdown-arrow {
        display: none;
    }

    /* Slightly tighter resolution badge on mobile */
    .resolution-wrap {
        gap: 4px;
    }

    .audio-subtext {
        font-size: 0.82em;
    }

    .tab-label .tab-text {
        font-size: 12px;
    }

    .media-tabs {
        padding: 0 10px;
    }

    .tab-label {
        padding: 12px 15px;
    }
}

/* Extra-small devices (≤350px): tighten table typography/buttons further */
@media all and (max-width: 350px) {
    .content {
        padding: 0 10px;
    }
    :root { --stack-gutter: 10px; }

    .download-progress {
        margin: 10px 0;
        padding: 12px;
    }

    /* download-area/sub-form-container use --stack-gutter now */

    .downloads-table th,
    .downloads-table td {
        padding: 6px 4px;
        font-size: 9.5px;
    }

    .downloads-table th {
        font-size: 9.5px;
    }

    /* Make sure the row Download button really shrinks (override base rule) */
    .downloads-table .download-btn,
    .downloads-table .download-row-btn {
        padding: 5px 8px !important;
        font-size: 9.5px !important;
        border-radius: 3px;
    }

    .downloads-table tbody td {
        font-size: 9.5px;
    }

    /* Keep resolution/badges compact */
    .resolution-wrap {
        gap: 3px;
        line-height: 1.05;
    }

    .tab-label .tab-text {
        font-size: 11px;
    }

    .tab-label {
        padding: 10px 12px;
    }

    /* Keep badge same as default (don't upscale on tiny screens) */
    .quality-badge {
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .audio-subtext {
        font-size: 0.82em;
    }
}

@media all and (max-width: 450px) {
    .banner-content .header h1 {
        font-size: 20px;
    }

    .banner-content .header h2 {
        font-size: 14px;
    }
}

/* ========================================
   Static Pages (Copyright, Terms, Privacy, Contact)
   ======================================== */
.page-content {
    background: #fff;
    min-height: 60vh;
    padding: 60px 20px;
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
    color: #333;
    line-height: 1.8;
}

.content-container h1 {
    font-size: 2.5rem;
    color: #1a1d2e;
    margin-bottom: 10px;
    border-bottom: 3px solid #e53935;
    padding-bottom: 15px;
}

.content-container .last-updated {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.content-container h2 {
    font-size: 1.5rem;
    color: #1a1d2e;
    margin: 30px 0 15px;
}

.content-container h3 {
    font-size: 1.2rem;
    color: #333;
    margin: 20px 0 10px;
}

.content-container p {
    margin-bottom: 15px;
    color: #555;
}

.content-container ul {
    margin: 15px 0 20px 20px;
    color: #555;
}

.content-container ul li {
    margin-bottom: 8px;
    padding-left: 5px;
}

.content-container a {
    color: #e53935;
    text-decoration: none;
}

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

.back-link {
    display: inline-block;
    margin-top: 40px;
    padding: 12px 25px;
    background: #e53935;
    color: #fff !important;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s;
}

.back-link:hover {
    background: #c62828;
    text-decoration: none !important;
}

/* Contact page specific */
.contact-info {
    margin: 30px 0;
}

.contact-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #e53935;
}

.contact-item h3 {
    margin-top: 0;
    color: #1a1d2e;
}

@media (max-width: 600px) {
    .content-container h1 {
        font-size: 1.8rem;
    }
    
    .content-container h2 {
        font-size: 1.3rem;
    }
    
    .page-content {
        padding: 40px 15px;
    }
}
