/* Update Dialog Styles */
.update-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.update-dialog {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
}

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

.dialog-header {
    display: flex;
    align-items: center;
    padding: 24px 24px 20px 24px;
    border-bottom: 1px solid #eff2f5;
    gap: 16px;
    background: #f8f9fa;
}

.browser-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.browser-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dialog-title h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 2px 0;
    color: #1e2329;
}

.dialog-title p {
    font-size: 13px;
    color: #808a9d;
    margin: 0;
    font-weight: 400;
}

.dialog-content {
    padding: 24px;
    background: white;
    overflow-y: auto;
    max-height: calc(85vh - 100px);
}

.update-step {
    text-align: left;
}

.update-step.hidden {
    display: none;
}

.step-icon {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.step-icon svg {
    width: 48px;
    height: 48px;
}

.update-step h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1e2329;
}

.update-step p {
    font-size: 14px;
    color: #58667e;
    margin-bottom: 16px;
    line-height: 20px;
}

.update-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0 20px 0;
    border: 1px solid #eff2f5;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eff2f5;
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-row span:first-child {
    color: #808a9d;
    font-size: 13px;
}

.info-row span:last-child {
    color: #1e2329;
    font-weight: 600;
    font-size: 13px;
}

.dialog-btn-primary {
    background: #3861fb;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.2s ease;
    min-width: 120px;
}

.dialog-btn-primary:hover:not(:disabled) {
    background: #2952e8;
}

.dialog-btn-primary:active:not(:disabled) {
    background: #1e40c8;
}

.dialog-btn-primary:disabled {
    background: #eff2f5;
    color: #b1b5c3;
    cursor: not-allowed;
}

.timer-text {
    font-size: 12px;
    color: #808a9d;
    margin-top: 12px;
    text-align: center;
}

.timer-text span {
    font-weight: 600;
    color: #3861fb;
}

/* Progress Bar */
.progress-container {
    margin: 24px 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #eff2f5;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3861fb 0%, #7c3aed 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    font-size: 24px;
    font-weight: 700;
    color: #1e2329;
    margin-bottom: 8px;
}

.progress-detail {
    font-size: 13px;
    color: #808a9d;
}

/* Installing Animation */
.installing-animation {
    margin: 20px 0;
    display: flex;
    justify-content: flex-start;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #eff2f5;
    border-top-color: #3861fb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.install-steps {
    margin-top: 24px;
    text-align: left;
}

.install-item {
    padding: 10px 0;
    font-size: 13px;
    color: #58667e;
    border-bottom: 1px solid #eff2f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* Instruction Box */
.important-notice {
    font-size: 14px;
    color: #1e2329;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: left;
}

.instruction-box {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eff2f5;
    padding: 20px;
    margin: 16px 0;
    text-align: left;
}

.instruction-step {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

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

.step-number {
    width: 28px;
    height: 28px;
    background: #3861fb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 14px;
}

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

.step-content strong {
    display: block;
    font-size: 14px;
    color: #1e2329;
    margin-bottom: 4px;
    font-weight: 600;
}

.step-content p {
    font-size: 12px;
    color: #808a9d;
    margin: 4px 0 8px 0;
    line-height: 16px;
}

.command-box {
    background: #1e2329;
    border: 1px solid #373d47;
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
    display: flex;
    align-items: start;
    gap: 8px;
    position: relative;
}

.command-box code {
    flex: 1;
    color: #16c784;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 18px;
    word-break: break-all;
}

.copy-btn {
    background: #3861fb;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: #2952e8;
}

.copy-btn:active {
    background: #1e40c8;
}

.warning-box {
    background: #fff4e6;
    border: 1px solid #ffa726;
    border-left: 4px solid #ffa726;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 16px 0;
    text-align: left;
}

.warning-box strong {
    color: #1e2329;
    font-size: 13px;
    font-weight: 600;
}

/* Responsive for dialog */
@media (max-width: 768px) {
    .update-dialog {
        width: 95%;
        border-radius: 12px;
    }

    .dialog-header {
        padding: 20px;
    }

    .dialog-content {
        padding: 20px;
    }

    .browser-icon {
        width: 44px;
        height: 44px;
    }

    .dialog-title h2 {
        font-size: 18px;
    }

    .command-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .copy-btn {
        width: 100%;
    }
}
