/* Xiaomi Device Detail Modal Styles */

.device-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.device-modal.is-active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    color: #fff;
}

.close-modal {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Custom Scrollbar for Modal Body */
.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Version History Styles */
.version-tabs {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab {
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.tab.active {
    background: rgba(37, 99, 235, 0.15);
    color: #3b82f6;
    border-color: rgba(37, 99, 235, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

.hyperos-version-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.hyperos-version-item:hover {
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.hyperos-version-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hyperos-version-number {
    font-family: 'IBM Plex Sans', monospace;
    font-weight: 600;
    color: #f1f5f9;
    font-size: 1.1rem;
}

.hyperos-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.hyperos-badge-android,
.hyperos-badge-available {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.hyperos-badge-android {
    background: rgba(61, 133, 198, 0.15);
    color: #3d85c6;
}

.hyperos-badge-available {
    background: rgba(106, 168, 79, 0.15);
    color: #6aa84f;
}

.hyperos-download-btn {
    background: #2563eb;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.hyperos-download-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

@media (max-width: 640px) {
    .hyperos-version-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .hyperos-download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Download Links Modal */
.download-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.download-modal.is-active {
    display: flex;
}

.download-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    color: #fff;
    animation: modalSlideIn 0.3s ease-out;
}

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

.download-card-header {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.download-card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #fff;
}

.download-version-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.download-option-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.download-option-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.download-option-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
    display: block;
    color: #3d85c6;
}

.download-final-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: #3d85c6;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.download-final-btn:hover {
    background: #2980b9;
    box-shadow: 0 0 15px rgba(61, 133, 198, 0.3);
}

.close-download-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-download-modal:hover {
    color: #fff;
}
