/**
 * @author Jukaza
 * @copyright Copyright (c) 2023
 * @contact Email: jukaza208@gmail.com | Facebook: https://www.facebook.com/profile.php?id=100076560932270 | Zalo: 0385436233
 * @license Proprietary
 * @version 1.0.0
 * @description File này thuộc quyền sở hữu của Jukaza. Nghiêm cấm sao chép khi chưa được phép.
 */

/* Download Page Styles - Mobile Friendly Version */
:root {
    --download-primary: var(--accent-color, #ff7700);
    --download-primary-dark: var(--link-hover, #e65c00);
    --download-primary-light: #ff9d4d;
    --download-secondary: #4a89dc;
    --download-secondary-dark: #3b6eb4;
    --download-success: #37bc9b;
    --download-warning: #f6bb42;
    --download-danger: #da4453;
    --download-light: #f5f7fa;
    --download-dark: #333;
    --download-gray: #aab2bd;
    --download-border: #e6e9ed;
    --download-shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --download-light: #2c2c2c;
    --download-dark: #f5f7fa;
    --download-gray: #8c8c8c;
    --download-border: #444;
    --download-shadow: rgba(0, 0, 0, 0.3);
}

/* Main Container */
.download-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Download Title */
.download-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--download-primary);
    margin: 20px 0 30px 0;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.download-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--download-primary);
}

/* Platform Selector */
.platform-selector {
    background-color: var(--download-light);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--download-shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.platform-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    background-color: var(--download-light);
    border-bottom: 1px solid var(--download-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.platform-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.platform-tab {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    color: var(--download-dark);
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.platform-tab i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.platform-tab.active {
    color: var(--download-primary);
    border-bottom-color: var(--download-primary);
    background-color: rgba(255, 119, 0, 0.05);
}

.platform-tab:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.03);
}

.platform-contents {
    padding: 20px;
}

.platform-content {
    display: none;
}

.platform-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Version Card */
.version-card {
    background-color: var(--download-light);
    border-radius: 12px;
    overflow: hidden;
}

.version-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--download-border);
}

.version-icon {
    width: 60px;
    height: 60px;
    background-color: var(--download-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
}

.version-info {
    flex: 1;
}

.version-info h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--download-dark);
}

.version-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--download-gray);
}

.version-meta span {
    display: flex;
    align-items: center;
}

.version-meta i {
    margin-right: 5px;
}

.version-description {
    padding: 20px;
    border-bottom: 1px solid var(--download-border);
}

.version-description h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--download-dark);
}

.description-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--download-dark);
    white-space: pre-line;
}

.version-actions {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background-color: var(--download-primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 119, 0, 0.3);
}

.download-button:hover {
    background-color: var(--download-primary-dark);
}

.download-button i {
    margin-right: 8px;
}

.version-history-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background-color: transparent;
    color: var(--download-primary);
    border: 1px solid var(--download-primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.version-history-link:hover {
    background-color: rgba(255, 119, 0, 0.1);
}

.version-history-link i {
    margin-right: 8px;
}

/* Installation Guide */
.download-guide {
    background-color: var(--download-light);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--download-shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.section-title {
    padding: 20px;
    font-size: 1.5rem;
    color: var(--download-dark);
    border-bottom: 1px solid var(--download-border);
    margin: 0;
}

.guide-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background-color: var(--download-light);
    border-bottom: 1px solid var(--download-border);
}

.guide-tabs::-webkit-scrollbar {
    display: none;
}

.guide-tab {
    flex: 1;
    min-width: 80px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    color: var(--download-dark);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.guide-tab.active {
    color: var(--download-primary);
    border-bottom-color: var(--download-primary);
    background-color: rgba(255, 119, 0, 0.05);
}

.guide-contents {
    padding: 20px;
}

.guide-content {
    display: none;
}

.guide-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.guide-step {
    display: flex;
    margin-bottom: 20px;
    position: relative;
}

.guide-step:last-child {
    margin-bottom: 0;
}

.guide-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    left: 20px;
    width: 2px;
    height: calc(100% - 20px);
    background-color: var(--download-border);
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--download-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 20px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    padding-top: 5px;
}

.step-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--download-dark);
}

.step-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--download-gray);
}

/* Version History */
.version-history-section {
    background-color: var(--download-light);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--download-shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.version-history-list {
    padding: 0 20px;
}

.history-item {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid var(--download-border);
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    min-width: 80px;
    margin-right: 20px;
    text-align: center;
    flex-shrink: 0;
}

.date {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--download-primary);
    color: white;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
}

.history-content {
    flex: 1;
    display: flex;
}

.history-platform {
    width: 40px;
    height: 40px;
    background-color: var(--download-light);
    border: 1px solid var(--download-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--download-primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.history-info {
    flex: 1;
}

.history-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--download-dark);
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--download-gray);
    margin-bottom: 10px;
}

.history-meta span {
    display: flex;
    align-items: center;
}

.history-meta i {
    margin-right: 5px;
}

.history-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--download-dark);
    margin-bottom: 15px;
}

.history-download-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background-color: var(--download-primary);
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.history-download-btn:hover {
    background-color: var(--download-primary-dark);
}

.history-download-btn i {
    margin-right: 5px;
}

.view-more-container {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--download-border);
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: transparent;
    color: var(--download-primary);
    border: 1px solid var(--download-primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    background-color: rgba(255, 119, 0, 0.1);
}

/* FAQ Section */
.faq-section {
    background-color: var(--download-light);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--download-shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.faq-list {
    padding: 0 20px;
}

.faq-item {
    border-bottom: 1px solid var(--download-border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.faq-question h3 {
    font-size: 1.1rem;
    color: var(--download-dark);
    margin: 0;
}

.faq-question i {
    color: var(--download-primary);
    transition: transform 0.3s ease;
}

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

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 20px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--download-gray);
    margin-bottom: 10px;
}

.faq-answer ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.faq-answer li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--download-gray);
    margin-bottom: 5px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .download-hero h1 {
        font-size: 2.2rem;
    }

    .version-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .version-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .history-content {
        flex-direction: column;
    }

    .history-platform {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .download-hero h1 {
        font-size: 1.8rem;
    }

    .download-hero p {
        font-size: 1rem;
    }

    .platform-tab {
        padding: 12px 8px;
    }

    .platform-tab i {
        font-size: 1.3rem;
    }

    .version-meta {
        flex-direction: column;
        gap: 8px;
    }

    .version-actions {
        flex-direction: column;
    }

    .download-button, .version-history-link {
        width: 100%;
    }

    .history-item {
        flex-direction: column;
    }

    .history-date {
        margin-right: 0;
        margin-bottom: 15px;
        text-align: left;
    }
}

@media (max-width: 576px) {
    .download-hero {
        padding: 30px 15px;
    }

    .download-hero h1 {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .platform-tabs, .guide-tabs {
        justify-content: flex-start;
    }

    .platform-tab, .guide-tab {
        flex: 0 0 auto;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .guide-step:not(:last-child)::after {
        top: 30px;
        left: 15px;
    }

    .step-content h3 {
        font-size: 1rem;
    }

    .faq-question h3 {
        font-size: 1rem;
    }
}

/* Truncated Description */
.truncated-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3em;
    line-height: 1.5;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .platform-tab:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .platform-tab.active,
[data-theme="dark"] .guide-tab.active {
    background-color: rgba(255, 119, 0, 0.15);
}

[data-theme="dark"] .download-button {
    box-shadow: 0 4px 10px rgba(255, 119, 0, 0.5);
}

[data-theme="dark"] .version-history-link:hover,
[data-theme="dark"] .view-more-btn:hover {
    background-color: rgba(255, 119, 0, 0.2);
}
