/**
 * @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 */
: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);
}

/* Hero Section */
.download-hero, .platform-hero {
    background: linear-gradient(135deg, var(--download-primary), var(--download-primary-dark));
    color: white;
    padding: 60px 20px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.download-hero::before, .platform-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,5 C60,20 40,20 0,5 Z" fill="white" opacity="0.1"/></svg>');
    background-size: 100% 100px;
    background-repeat: no-repeat;
    background-position: bottom;
}

.download-hero-content, .platform-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.download-hero h1, .platform-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.download-hero p, .platform-hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.download-counter {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.download-counter i {
    margin-right: 10px;
    font-size: 1.3rem;
}

.download-counter span {
    font-weight: bold;
    margin: 0 5px;
}

/* Platform Selector */
.platform-selector {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    margin-bottom: 30px;
    overflow: hidden;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.platform-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
    transition: background-color 0.3s ease;
}

.platform-tab {
    flex: 1;
    text-align: center;
    padding: 20px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

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

.platform-tab:hover {
    background-color: rgba(var(--accent-color-rgb, 255, 119, 0), 0.05);
}

.platform-contents {
    padding: 20px;
}

.platform-content {
    display: none;
}

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

/* Version Card */
.version-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    overflow: hidden;
    transition: all 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

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

.version-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--download-primary), var(--download-primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.version-icon i {
    font-size: 30px;
    color: white;
}

.version-info {
    flex: 1;
}

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

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

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

.version-meta i {
    margin-right: 5px;
    color: var(--download-primary);
}

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

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

.description-content {
    color: var(--secondary-text);
    line-height: 1.6;
    white-space: pre-line;
}

.version-actions {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
}

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

.download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(var(--accent-color-rgb, 255, 119, 0), 0.4);
}

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

.version-history-link {
    display: inline-flex;
    align-items: center;
    color: var(--download-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.version-history-link:hover {
    color: var(--download-secondary-dark);
}

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

/* Guide Section */
.download-guide {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.guide-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.guide-tab {
    padding: 10px 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-color);
}

.guide-tab.active {
    background-color: var(--download-primary);
    color: white;
    border-color: var(--download-primary);
}

.guide-contents {
    position: relative;
}

.guide-content {
    display: none;
}

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

.guide-steps, .guide-step {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.guide-step {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}

.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: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.step-content p {
    color: var(--secondary-text);
    line-height: 1.6;
}

/* Version History */
.version-history-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.version-history-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.history-item {
    display: flex;
    position: relative;
}

.history-item::before {
    content: '';
    position: absolute;
    top: 30px;
    bottom: -30px;
    left: 15px;
    width: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.history-item:last-child::before {
    display: none;
}

.history-date {
    min-width: 100px;
    text-align: center;
    margin-right: 20px;
    position: relative;
    z-index: 2;
}

.date {
    display: inline-block;
    background-color: var(--download-primary);
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
}

.history-content {
    flex: 1;
    display: flex;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--card-shadow);
    overflow: hidden;
    transition: all 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.history-platform {
    width: 60px;
    background: linear-gradient(135deg, var(--download-primary), var(--download-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.history-info {
    flex: 1;
    padding: 20px;
}

.history-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.history-meta {
    display: flex;
    gap: 15px;
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

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

.history-meta i {
    margin-right: 5px;
    color: var(--download-primary);
}

.history-description {
    color: var(--secondary-text);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
    white-space: pre-line;
}

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

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

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

.view-more-container {
    text-align: center;
    margin-top: 30px;
}

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

.view-more-btn:hover {
    background-color: var(--download-primary);
    color: white;
}

/* FAQ Section */
.faq-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-list {
    margin-top: 30px;
}

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

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

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

.faq-question h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.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-answer p, .faq-answer ul {
    padding: 0 0 20px;
    color: var(--secondary-text);
    line-height: 1.6;
}

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

.faq-answer li {
    margin-bottom: 10px;
}

.faq-item.active .faq-question h3 {
    color: var(--download-primary);
}

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

/* Platform Version Page */
.platform-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.platform-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--download-primary), var(--download-primary-dark));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.platform-icon i {
    font-size: 35px;
    color: white;
}

.platform-info h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.platform-info p {
    color: var(--secondary-text);
}

.version-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.version-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    position: relative;
    transition: all 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid var(--border-color);
}

.version-item.latest {
    border-left-color: var(--download-primary);
}

.version-badge {
    position: absolute;
    top: 15px;
    right: 15px;
}

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

.version-details {
    flex: 1;
    min-width: 250px;
}

.version-details h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.version-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Other Platforms */
.other-platforms {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.platform-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--card-shadow);
    border-color: var(--download-primary);
}

.platform-card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--download-primary), var(--download-primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 30px;
}

.platform-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.platform-card p {
    color: var(--secondary-text);
    font-size: 0.9rem;
}

/* System Requirements */
.system-requirements {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.requirements-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--card-shadow);
    padding: 20px;
    margin-top: 20px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid var(--download-primary);
}

.requirements-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.requirements-card h3 i {
    margin-right: 10px;
    color: var(--download-primary);
}

.requirements-card ul {
    list-style: none;
    padding: 0;
}

.requirements-card li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--secondary-text);
}

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

.requirements-card li strong {
    color: var(--text-color);
    margin-right: 5px;
}

/* Back Button */
.back-to-download {
    text-align: center;
    margin-bottom: 30px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    color: var(--download-primary);
    border: 2px solid var(--download-primary);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

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

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

/* Responsive Styles */
@media (max-width: 768px) {
    .download-hero h1, .platform-hero h1 {
        font-size: 2rem;
    }

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

    .platform-tab {
        padding: 15px 10px;
    }

    .platform-tab span {
        font-size: 0.9rem;
    }

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

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

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

    .version-actions {
        flex-direction: column;
        gap: 10px;
    }

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

    .guide-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

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

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

    .history-item::before {
        display: none;
    }

    .platform-header {
        flex-direction: column;
        text-align: center;
    }

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

@media (max-width: 480px) {
    .download-hero, .platform-hero {
        padding: 40px 15px;
    }

    .download-hero h1, .platform-hero h1 {
        font-size: 1.8rem;
    }

    .platform-tabs {
        flex-wrap: wrap;
    }

    .platform-tab {
        flex: 1 0 40%;
    }

    .guide-tabs {
        flex-wrap: wrap;
    }

    .guide-tab {
        flex: 1 0 40%;
        text-align: center;
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .version-details h3 {
        font-size: 1.1rem;
    }

    .version-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .platform-grid {
        grid-template-columns: 1fr;
    }
}
