/**
 * Download Portal Styles
 * Modern UI matching the main website design
 */

/* ============================================
   GLOBAL STYLES
   ============================================ */

body.dashboard-body {
    background: #0a0a0a !important;
    color: #ffffff;
    min-height: 100vh;
}

.dashboard-layout {
    background: #0a0a0a;
    min-height: 100vh;
}

.dashboard-content {
    background: #0a0a0a;
    padding: 48px;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 48px;
    text-align: center;
}

.dashboard-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px 0;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.dashboard-subtitle {
    font-size: 18px;
    color: #b3b3b3;
    margin: 0;
}

/* ============================================
   SECTION STYLES
   ============================================ */

.download-section {
    margin-bottom: 48px;
}

.section-header {
    margin-bottom: 32px;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.section-icon {
    font-size: 32px;
    color: #ff0000;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    font-family: 'Orbitron', sans-serif;
}

.section-description {
    font-size: 16px;
    color: #b3b3b3;
    margin: 0;
    margin-left: 48px;
}

/* ============================================
   DOWNLOAD GRID
   ============================================ */

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    .download-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   DOWNLOAD CARD
   ============================================ */

.download-card {
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #ff0000;
    transform: scaleX(1);
    transition: transform 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.download-card:hover {
    background: #1a1a1a;
    border-color: rgba(255, 0, 0, 0.5);
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(255, 0, 0, 0.4),
                0 0 40px rgba(255, 0, 0, 0.2);
}

.download-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 12px;
    color: #ff0000;
    font-size: 32px;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
    font-family: 'Rajdhani', sans-serif;
}

.card-description {
    font-size: 14px;
    color: #b3b3b3;
    margin: 0;
    line-height: 1.6;
}

.download-btn {
    width: 100%;
    padding: 14px 24px;
    background: #ff0000;
    color: #ffffff;
    border: 1px solid #ff0000;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Rajdhani', sans-serif;
}

.download-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn i {
    font-size: 18px;
}

/* ============================================
   CHANGELOG CARD
   ============================================ */

.changelog-card {
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.changelog-card:hover {
    background: #1a1a1a;
    border-color: rgba(255, 0, 0, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.changelog-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    font-family: 'Orbitron', sans-serif;
}

.changelog-date {
    font-size: 14px;
    color: #b3b3b3;
    margin: 0 0 20px 0;
}

.changelog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-list li {
    font-size: 16px;
    color: #ffffff;
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    line-height: 1.6;
}

.changelog-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ff0000;
    font-weight: 700;
}

/* ============================================
   DOWNLOAD POPUP
   ============================================ */

.download-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.download-popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(255, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.download-popup.active .popup-content {
    transform: scale(1) translateY(0);
}

.popup-header {
    background: rgba(255, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 0, 0, 0.2);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.popup-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.popup-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.popup-close:hover {
    background: rgba(255, 0, 0, 0.3);
    transform: rotate(90deg);
}

.popup-body {
    padding: 32px;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(17, 17, 17, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.4s ease;
    opacity: 0.5;
    transform: translateX(-10px);
}

.step.active {
    opacity: 1;
    transform: translateX(0);
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}

.step.completed {
    opacity: 1;
    transform: translateX(0);
    background: rgba(0, 255, 0, 0.05);
    border-color: rgba(0, 255, 0, 0.2);
}

.step.error {
    opacity: 1;
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.5);
}

.step-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 12px;
    color: #ff0000;
    font-size: 24px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.step.completed .step-icon {
    background: rgba(0, 255, 0, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
    color: #00ff00;
}

.step.completed .step-icon::after {
    content: '✓';
    position: absolute;
    font-size: 16px;
    color: #00ff00;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
    font-family: 'Rajdhani', sans-serif;
}

.step-description {
    font-size: 13px;
    color: #b3b3b3;
    margin: 0;
}

.step-status {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 0, 0, 0.2);
    border-top-color: #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.step.active .step-loader {
    display: block;
}

.step.completed .step-loader {
    display: none;
}

.step.completed .step-status::after {
    content: '✓';
    color: #00ff00;
    font-size: 20px;
    font-weight: 700;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(255, 0, 0, 0.6);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-bar-container {
    margin-top: 24px;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0000 0%, #ff3333 50%, #ff0000 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}

/* ============================================
   LOADING OVERLAY (Legacy - kept for compatibility)
   ============================================ */

.download-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.download-overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-content {
    text-align: center;
    color: #ffffff;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 0, 0, 0.2);
    border-top-color: #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.overlay-message {
    font-size: 18px;
    color: #ffffff;
    margin: 0;
    font-family: 'Rajdhani', sans-serif;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.download-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(17, 17, 17, 0.95);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.download-toast.active {
    opacity: 1;
    transform: translateY(0);
}

.download-toast-success {
    border-color: rgba(0, 255, 0, 0.3);
}

.download-toast-success .toast-icon {
    color: #00ff00;
}

.download-toast-error {
    border-color: rgba(255, 0, 0, 0.5);
}

.download-toast-error .toast-icon {
    color: #ff0000;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
}

.toast-close {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #ffffff;
}

/* ============================================
   SIDEBAR
   ============================================ */

.download-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #111111 0%, #0a0a0a 100%);
    border-right: 1px solid rgba(255, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
}

.download-sidebar::-webkit-scrollbar {
    width: 6px;
}

.download-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.download-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 0, 0.3);
    border-radius: 3px;
}

.download-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 0, 0.5);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 0, 0, 0.05);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo i {
    font-size: 32px;
    color: #ff0000;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.logo-main .highlight {
    color: #ff0000;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.logo-subtitle {
    font-size: 11px;
    color: #b3b3b3;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-toggle {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
}

.sidebar-toggle:hover {
    background: rgba(255, 0, 0, 0.3);
    transform: scale(1.1);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #b3b3b3;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 500;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ff0000;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-item:hover {
    color: #ffffff;
    background: rgba(255, 0, 0, 0.1);
    padding-right: 20px;
}

.sidebar-item:hover::before {
    transform: scaleY(1);
}

.sidebar-item.active {
    color: #ffffff;
    background: rgba(255, 0, 0, 0.15);
    border-right: 3px solid #ff0000;
}

.sidebar-item.active::before {
    transform: scaleY(1);
}

.sidebar-icon {
    font-size: 20px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-text {
    flex: 1;
}

.sidebar-badge {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    color: #ff0000;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.sidebar-item.active .sidebar-badge {
    background: rgba(255, 0, 0, 0.3);
    color: #ffffff;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 0, 0, 0.2);
    margin: 12px 24px;
}

.sidebar-section {
    padding: 8px 0;
}

.sidebar-section-title {
    padding: 8px 24px;
    font-size: 11px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 0, 0, 0.2);
    margin-top: auto;
}

.sidebar-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666666;
    font-family: 'Rajdhani', sans-serif;
}

.sidebar-info i {
    font-size: 16px;
    color: #ff0000;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Toggle - Hidden by default */
.mobile-menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 12px;
    display: none !important; /* Hidden by default */
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Show only on mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
}

.mobile-menu-toggle:hover {
    background: rgba(255, 0, 0, 0.3);
    transform: scale(1.05);
}

.mobile-menu-toggle.active {
    background: rgba(255, 0, 0, 0.4);
}

/* Adjust layout when sidebar is present */
.dashboard-layout {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

.download-sidebar.collapsed {
    transform: translateX(-100%);
}

.download-sidebar.collapsed + .dashboard-layout {
    margin-left: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .download-sidebar {
        transform: translateX(-100%);
    }
    
    .download-sidebar.active {
        transform: translateX(0);
    }
    
    .dashboard-layout {
        margin-left: 0;
    }
    
    .dashboard-content {
        padding: 24px;
        padding-top: 80px;
    }
    
    .dashboard-title {
        font-size: 32px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-description {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .download-card {
        padding: 24px;
    }
    
    .download-toast {
        left: 16px;
        right: 16px;
        min-width: auto;
    }
    
    .sidebar-toggle {
        display: none;
    }
}

