/* Download Page Styles */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    --text: #f8fafc;
    --text-secondary: #cbd5e1;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.8);
    --border: rgba(99, 102, 241, 0.2);
}

/* Base Styles */
.download-page {
    background-color: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Utility Classes */
.text-center {
    text-align: center !important;
}

/* Main Container */
.download-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Styles */
.download-sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(99, 102, 241, 0.1);
    padding: 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    text-align: center;
}

.sidebar-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
}

.sidebar-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(45deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.platform-selector {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
}

.platform-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: all 0.2s ease;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.platform-option:hover, .platform-option.active {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.platform-option.windows.active {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-color: var(--primary);
}

.platform-option.ios.active {
    background: linear-gradient(45deg, #999999, #cccccc);
    border-color: #999999;
}

.platform-option.android.active {
    background: linear-gradient(45deg, #3DDC84, #32B374);
    border-color: #3DDC84;
}

.platform-option i {
    font-size: 1.1rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

.nav-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.back-home {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-home:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

/* Content Wrapper */
.download-content-wrapper {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
}

/* Loading Spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    height: 40vh;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    border-top: 3px solid var(--primary);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Download Content */
#download-content {
    margin-bottom: 2rem;
}

.download-header-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.platform-icon {
    font-size: 2.5rem;
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.download-title-wrapper {
    flex: 1;
}

.download-title {
    font-size: 1.8rem;
    margin: 0 0 0.4rem 0;
    color: var(--text);
    font-weight: 700;
    text-align: center;
}

.download-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

.download-info {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.download-details {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.details-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.details-item {
    padding: 0.7rem;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.7);
    transition: all 0.2s ease;
}

.details-item:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}

.details-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    display: block;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details-value {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

.download-action {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border: none;
    margin-bottom: 1rem;
    width: 100%;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(99, 102, 241, 0.4);
}

.download-button i {
    font-size: 1.2rem;
}

.view-details-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    margin-bottom: 0.8rem;
    width: 100%;
}

.view-details-link:hover {
    background: rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.2);
}

.view-details-link i {
    font-size: 0.9rem;
}

.download-note {
    color: var(--text-secondary);
    font-size: 0.75rem;
    max-width: 90%;
}

/* Section Styles */
.section-title {
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 600;
    justify-content: center;
    text-align: center;
}

.section-title i {
    color: var(--primary-light);
}

/* Requirements Section */
#requirements-section {
    margin-bottom: 1.5rem;
}

.requirements-list {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.requirement-item {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.7);
    transition: all 0.2s ease;
}

.requirement-item:hover {
    transform: translateY(-3px);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.requirement-icon {
    font-size: 1.6rem;
    color: var(--primary-light);
    margin-bottom: 0.6rem;
}

.requirement-name {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.3rem;
    font-weight: 600;
    text-align: center;
}

.requirement-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Installation Section */
#installation-section {
    margin-bottom: 1.5rem;
}

.installation-steps {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.step-list {
    list-style-position: inside;
    counter-reset: step-counter;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.step-item {
    position: relative;
    padding: 0.9rem 0.9rem 0.9rem 2.3rem;
    counter-increment: step-counter;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(30, 41, 59, 0.7);
}

.step-item:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.step-item::before {
    content: counter(step-counter);
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.4rem;
    height: 1.4rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-light);
}

.step-item strong {
    color: var(--primary-light);
    font-weight: 600;
}

/* Previous Versions Section */
#versions-section {
    margin-bottom: 1.5rem;
}

.previous-versions-list {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.previous-version-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.7);
    transition: all 0.3s ease;
}

.previous-version-item:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.version-info {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.version-name {
    font-weight: 600;
    color: var(--primary-light);
    font-size: 0.95rem;
}

.version-date, .version-size {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.version-actions {
    display: flex;
    gap: 0.6rem;
}

.version-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    box-shadow: 0 2px 5px rgba(6, 182, 212, 0.1);
}

.version-details-btn:hover {
    transform: translateY(-2px);
    background: rgba(6, 182, 212, 0.25);
    box-shadow: 0 4px 8px rgba(6, 182, 212, 0.2);
    color: var(--accent);
}

.version-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border: none;
    box-shadow: 0 2px 5px rgba(99, 102, 241, 0.2);
}

.version-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.version-changelog-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    cursor: pointer;
}

.version-changelog-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

.version-changelog {
    width: 100%;
    margin-top: 0.8rem;
    padding: 0.8rem;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    display: none;
}

.version-changelog.active {
    display: block;
}

.version-changelog h4 {
    color: var(--text);
    margin: 0 0 0.6rem 0;
    font-size: 0.9rem;
    text-align: center;
}

.version-changelog ul {
    padding-left: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
}

.version-changelog li {
    margin-bottom: 0.4rem;
}

.version-changelog li:last-child {
    margin-bottom: 0;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 1.5rem;
}

.faq-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    justify-content: center;
    text-align: center;
}

.faq-section h2:before {
    content: "\f059";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary-light);
}

.faq-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.faq-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.faq-question {
    padding: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(99, 102, 241, 0.05);
}

.faq-question h3 {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
    margin: 0;
    text-align: center;
}

.faq-question i {
    color: var(--primary-light);
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 0 0.9rem 0.9rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* Mobile Navigation */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    background: rgba(99, 102, 241, 0.2);
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* Responsive styles */
@media (max-width: 1200px) {
    .download-info {
        grid-template-columns: 1fr;
    }
    
    .requirements-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .step-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .download-container {
        flex-direction: column;
    }
    
    .download-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid rgba(99, 102, 241, 0.1);
        padding: 0.8rem;
        max-height: none;
        overflow-y: visible;
        transform: none;
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar-header {
        flex-direction: row;
        margin-bottom: 1rem;
        justify-content: center;
    }
    
    .sidebar-logo {
        width: 40px;
        height: 40px;
        margin-bottom: 0;
        margin-right: 0.8rem;
    }
    
    .platform-selector {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: 1rem;
    }
    
    .platform-option {
        flex: 1;
        min-width: 110px;
        padding: 10px;
    }
    
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }
    
    .nav-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .download-content-wrapper {
        padding-top: 1rem;
    }
    
    .download-content-wrapper::before {
        display: none;
    }
    
    .download-header-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.25rem;
    }
    
    .platform-icon {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .download-content-wrapper {
        padding: 4rem 1rem 1rem;
    }
    
    .requirements-list {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .details-list {
        grid-template-columns: 1fr;
    }
    
    .download-header-section,
    .download-details,
    .download-action,
    .installation-steps,
    .previous-versions-list {
        padding: 1rem;
    }
    
    .version-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .previous-version-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.8rem;
    }
    
    .version-actions {
        margin-top: 0.8rem;
        width: 100%;
        justify-content: space-between;
    }
    
    .download-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .faq-section h2 {
        font-size: 1.1rem;
    }
}

/* Add mobile navigation toggle functionality */
@media (max-width: 992px) {
    .download-content-wrapper::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: rgba(15, 23, 42, 0.95);
        z-index: 5;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    
    /* Remove the mobile platform indicator */
    .mobile-platform-indicator {
        display: none;
    }
}

/* Fix for header alignment in download page */
.download-page .page-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1001;
}

.download-page .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 30px;
}

.download-page .mobile-nav-toggle {
    position: relative;
    top: auto;
    right: auto;
    margin-left: auto;
}

/* Add styles for the cached data notification */
.cached-data-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cached-data-notice i {
    font-size: 1.25rem;
}

.reload-button {
    margin-left: auto;
    background-color: #ffc107;
    color: #212529;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.reload-button:hover {
    background-color: #e0a800;
} 