/* Reset the basic style */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f0f7ff;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: #333;
}

ul {
    list-style: none;
}


/* Navigation bar */

header {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: bold;
    color: #5260ff;
}

.logo-img {
    height: 36px;
    margin-right: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:not(.btn-small):after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: #5260ff;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn-small):hover {
    color: #5260ff;
}

.nav-links a:not(.btn-small):hover:after {
    width: 70%;
}

.btn-small {
    background-color: #5260ff;
    color: white;
    padding: 8px 18px;
    border-radius: 24px;
    margin-left: 10px;
    transition: all 0.3s ease;
    height: 40px !important;
}
.nav-links .btn-small {
    padding: 8px 20px;
    white-space: nowrap;
}
.btn-small:hover {
    background-color: #4251e8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(82, 96, 255, 0.3);
}


/* Mainly download */

.hero {
    background-color: #e6f0ff;
    padding: 80px 0 50px;
    text-align: center;
}

h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #333;
}

.subtitle {
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto 30px;
    color: #666;
}

.download-box {
    display: flex;
    flex-direction: column;
    max-width: 650px;
    margin: 0 auto 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.url-input-container {
    position: relative;
    margin-bottom: 15px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #5260ff;
    font-size: 18px;
}

.url-input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.url-input:focus {
    border-color: #5260ff;
    box-shadow: 0 0 0 3px rgba(82, 96, 255, 0.1);
}

.button-group {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.paste-btn {
    background-color: #f0f0f0;
    color: #333;
    flex: 1;
}

.paste-btn:hover {
    background-color: #e0e0e0;
}

.download-btn {
    background-color: #5260ff;
    color: white;
    flex: 2;
}

.download-btn:hover {
    background-color: #4251e8;
}


/* Download the options panel */

.download-options {
    margin-top: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    position: relative;
}

.download-progress {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 10px;
}

.progress-fill {
    height: 100%;
    width: 50%;
    background-color: #5cb85c;
    border-radius: 5px;
}

.progress-text {
    font-size: 14px;
    font-weight: bold;
    color: #5cb85c;
}

.download-preview {
    display: flex;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
}

.video-thumbnail {
    width: 160px;
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
    margin-right: 15px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.video-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.download-formats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.format-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: #4099ff;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.format-btn.format-link {
    position: relative;
}

.format-btn.format-link:after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: white;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.format-btn.format-link:hover:after {
    width: 80%;
}

.format-btn:hover {
    background-color: #3088ee;
    transform: translateY(-2px);
}

.format-btn.another-btn {
    background-color: #f55f5f;
    margin-top: 5px;
}

.format-btn.another-btn:hover {
    background-color: #e44d4d;
}

.format-btn.format-btn-success {
    background-color: #5cb85c;
    /* Green indicates that it has been paid */
    position: relative;
}

.format-btn.format-btn-success:hover {
    background-color: #4cae4c;
}

.format-btn.format-btn-success:before {
    content: '\f00c';
    /* FontAwesome  */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
    color: white;
}

.format-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    transform: none !important;
}


/* Share dialog box */

.share-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.share-dialog-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: dialog-show 0.3s ease forwards;
}

@keyframes dialog-show {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.share-dialog-header h3 {
    font-size: 18px;
    margin: 0;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

.share-dialog-body {
    padding: 20px;
}

.share-dialog-body p {
    margin: 0 0 15px;
    color: #555;
    font-size: 16px;
}

.share-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s;
    padding: 10px;
    border-radius: 10px;
}

.share-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
}

.share-btn i {
    font-size: 24px;
    margin-bottom: 8px;
}

.share-btn[data-platform="weixin"] i {
    color: #07C160;
}

.share-btn[data-platform="qq"] i {
    color: #12B7F5;
}

.share-btn[data-platform="weibo"] i {
    color: #E6162D;
}

.share-btn[data-platform="facebook"] i {
    color: #1877F2;
}

.share-btn[data-platform="twitter"] i {
    color: #1DA1F2;
}

.share-link-container {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.share-input-group {
    display: flex;
    margin-top: 10px;
}

.share-link-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.copy-link-btn {
    padding: 0 15px;
    background-color: #5260ff;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.copy-link-btn:hover {
    background-color: #4251e8;
}


/* Loading */

.loading-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(82, 96, 255, 0.2);
    border-radius: 50%;
    border-top: 4px solid #5260ff;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-text {
    font-size: 16px;
    color: #5260ff;
    font-weight: 500;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.supported-platforms {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px auto;
}

.platform {
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.platform:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(82, 96, 255, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.platform:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.platform:hover:before {
    transform: scale(1);
}

.platform:active {
    transform: translateY(-2px);
}

.platform i {
    color: #5260ff;
    position: relative;
    z-index: 1;
}

.btn-circle {
    background-color: #00b3ff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.btn-circle:hover {
    background-color: #0099e0;
}


/* Function introduction */

.features {
    padding: 70px 0;
    background-color: #fff;
}

h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

h3 {
    margin: 40px 0 20px;
    font-size: 22px;
}

.features p {
    margin-bottom: 20px;
    color: #555;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.step {
    flex: 1;
    min-width: 300px;
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.step-icon {
    width: 60px;
    height: 60px;
    background-color: #e6f0ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: #5260ff;
}

.step-image img {
    height: 184px;
}

h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.step-image {
    margin-top: 20px;
    max-width: 100%;
    height: auto;
}

.step-image img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}


/* Best downloader */

.best-downloader {
    padding: 70px 0;
    background-color: #f7f9fe;
    text-align: center;
}

.features-diagram {
    margin-top: 40px;
}

.diagram-img {
    max-width: 100%;
    height: auto;
}


/* FAQ */

.faq {
    padding: 70px 0;
    background-color: #fff;
}

.faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.faq-question {
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.toggle-icon {
    font-size: 20px;
    color: #5260ff;
    transition: transform 0.3s ease;
}

.faq-item.active .toggle-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.3s ease;
}

.faq-answer.active {
    max-height: 200px;
    /* Enough height to accommodate the content. */
    opacity: 1;
    padding: 0 0 15px;
}


/* Subscribe styles. */

.subscription {
    padding: 50px 0;
}

.subscription-box {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.subscription-box h3 {
    margin-top: 0;
}

.subscription-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.subscription-logo {
    font-size: 24px;
    font-weight: bold;
    color: #5260ff;
}

.subscribe-btn {
    background-color: #5260ff;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 15px;
}

.subscribe-btn:hover {
    background-color: #4251e8;
}


/* Footer style */

footer {
    background-color: #f7f9fe;
    padding: 70px 0 20px;
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: #5260ff;
    margin-bottom: 15px;
}

.logo-img-small {
    height: 20px;
    margin-right: 8px;
}

.footer-section p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: #333;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #666;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #5260ff;
}

.subscribe-footer {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    width: 30px;
    height: 30px;
    background-color: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.social-icons a:hover {
    background-color: #5260ff;
}

.social-icons i {
    color: #333;
    font-size: 14px;
}

.social-icons a:hover i {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}


/* mobile */

@media (max-width: 992px) {
    .nav-links {
        gap: 10px;
    }
    .nav-links a {
        padding: 0 12px;
        font-size: 14px;
    }
    .steps-container {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 15px;
        height: auto;
    }
    .nav-links a {
        height: 40px;
        margin: 5px 0;
    }
    .btn-small {
        margin-top: 10px;
    }
    .download-box {
        width: 90%;
    }
    .url-input {
        padding: 10px;
    }
    .button-group {
        flex-wrap: wrap;
    }
    .paste-btn,
    .download-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 50px 0 30px;
    }
    h1 {
        font-size: 26px;
    }
    .supported-platforms {
        gap: 10px;
    }
    .platform {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}


/* payment */

.payment-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.payment-dialog-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: dialog-show 0.3s ease forwards;
}

.payment-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.payment-dialog-header h3 {
    font-size: 18px;
    margin: 0;
    color: #333;
}

.payment-dialog-body {
    padding: 20px;
    position: relative;
    /* Ensure that the center-loading can be positioned inside. */
}

.video-info-payment {
    background-color: #f0f7ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
}

.format-info,
.price-info {
    font-size: 15px;
}

.price-value {
    font-weight: bold;
    color: #ff6b6b;
    font-size: 18px;
}

.payment-options {
    margin-bottom: 25px;
}

.payment-option {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.payment-option:hover {
    border-color: #5260ff;
    background-color: #f9f9ff;
}

.payment-option input[type="radio"] {
    margin-right: 10px;
}

.payment-option label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.payment-option i {
    font-size: 24px;
    margin-right: 10px;
}

.payment-option i.fa-weixin {
    color: #07C160;
}

.payment-option i.fa-alipay {
    color: #1677FF;
}

.payment-option i.fa-credit-card {
    color: #ff9800;
}

.payment-action {
    text-align: center;
}

.pay-now-btn {
    background-color: #ff6b6b;
    color: white;
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    font-weight: bold;
}

.pay-now-btn:hover {
    background-color: #ff5252;
}

.subscription-prompt {
    font-size: 14px;
    color: #666;
}

.subscribe-link {
    color: #5260ff;
    font-weight: 500;
    text-decoration: underline;
}

.subscribe-link:hover {
    color: #4251e8;
}


/* Highlight effect of the input box. */

.highlight-input {
    border-color: #5260ff !important;
    background-color: rgba(82, 96, 255, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(82, 96, 255, 0.2) !important;
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(82, 96, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(82, 96, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(82, 96, 255, 0);
    }
}

.progress-fill.complete {
    background-color: #28a745;
    /* A darker shade of green indicates completion. */
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
    transition: box-shadow 0.3s ease;
}

.progress-text.complete {
    color: #28a745;
}

.download-complete {
    margin-top: 20px;
    padding: 15px;
    background-color: #f1fff1;
    border: 1px solid #d4ffd4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.download-complete i {
    font-size: 24px;
    color: #28a745;
}

.download-complete span {
    font-size: 16px;
    font-weight: 600;
    color: #28a745;
}

.download-complete .download-link {
    margin-left: auto;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.download-complete .download-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.center-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    z-index: 10;
}

.center-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(82, 96, 255, 0.1);
    border-radius: 50%;
    border-top-color: #5260ff;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.center-loading-text {
    font-size: 16px;
    font-weight: 500;
    color: #5260ff;
}